Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google XML Sitemap SEO


Jack_mcs

Recommended Posts

I am using Ultimate SEO URLs is that what is causing the issue?

 

The url in the sitemap is:

http://example.com/product_info.php?products_id=34995

 

 

Which is then take to the product at:

http://example.com/f...ce-p-34995.html

 

How do I keep my good URLs and have those URLS in google sitemaps xml?

The url in the sitemap is incorrect if Ultimate SEO is enabled. Be sure you are using version 2.2d and that you have the latest changes in the .htaccess files.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hello,

 

Great contrib, Jack!

 

But i'm having a small problem with the cronjob. This is the cron job:

 

/usr/local/bin/php -q -f /home/****/domains/cosmeanailart.nl/private_html/googlesitemap/index.php

 

The e-mail i receive from my hosting shows me an error:

Warning: require_once(includes/configure.php): failed to open stream: No such file or directory in /home/***/domains/cosmeanailart.nl/public_html/googlesitemap/index.php on line 47
Fatal error: require_once(): Failed opening required 'includes/configure.php' (include_path='.:/usr/local/lib/php') in /home/***/domains/cosmeanailart.nl/public_html/googlesitemap/index.php on line 47

 

What do I need to change to get the conjob work?

 

If you need additional information, please let me know.

 

Tjappie W

Some servers are set to where they need the php.ini file included in the command. I seem to recall posting a sample in this thread but that is something your host can (should) help you with.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The url in the sitemap is incorrect if Ultimate SEO is enabled. Be sure you are using version 2.2d and that you have the latest changes in the .htaccess files.

 

Thanks Jack,

 

Oh noes smile.png

 

I installed Ultimate SEO URLs 5 - by FWR Media not Ultimate SEO URLs that has the version 2.2d.

 

GAAAA this is the part about osCommerce that drives me NUTS!

 

Would you recommend I uninstall FWR Media version and install the other Add-On? If so do you know if it will it give me the same URL functionality and be compatible with your Google Sitemaps add-on letting the urls in the xml files be the actual links not pre-rewrite locations?

Link to comment
Share on other sites

 

Thanks Jack,

 

Oh noes smile.png

 

I installed Ultimate SEO URLs 5 - by FWR Media not Ultimate SEO URLs that has the version 2.2d.

 

GAAAA this is the part about osCommerce that drives me NUTS!

 

Would you recommend I uninstall FWR Media version and install the other Add-On? If so do you know if it will it give me the same URL functionality and be compatible with your Google Sitemaps add-on letting the urls in the xml files be the actual links not pre-rewrite locations?

All of my contributions are 100% compatible. If you want to use SEO5, there is a version of this contribution that has been copied and edited to allow SEO5 to work. I don't recall its name but it is mentioned in this thread somewhere or you can search the addons.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

All of my contributions are 100% compatible. If you want to use SEO5, there is a version of this contribution that has been copied and edited to allow SEO5 to work. I don't recall its name but it is mentioned in this thread somewhere or you can search the addons.

 

Thanks Jack,

 

I am going to remove SEO5 and install yours :)

Link to comment
Share on other sites

Happy pants dance :)

 

Your Ultimate SEO URLS is now installed and the Google Sitemaps XML urls are correct and google webmaster tools seems happy.

 

Thanks Jack!

Link to comment
Share on other sites

Happy pants dance smile.png

 

Your Ultimate SEO URLS is now installed and the Google Sitemaps XML urls are correct and google webmaster tools seems happy.

 

Thanks Jack!

You're welcome. :)

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...

When I run /googlesitemap/index.php in a browser it works fine and generates the updates in the xml files.

 

When I run it as a cron I get:

 

PHP Notice:  Use of undefined constant DIR_WS_HTTP_CATALOG - assumed 'DIR_WS_HTTP_CATALOG' in /home/alwaysbw/public_html/googlesitemap/index.php on line 45
PHP Warning:  require_once(includes/configure.php): failed to open stream: No such file or directory in /home/alwaysbw/public_html/googlesitemap/index.php on line 47
PHP Fatal error:  require_once(): Failed opening required 'includes/configure.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/alwaysbw/public_html/googlesitemap/index.php on line 47

 

Any idea why it's having issues?

Link to comment
Share on other sites

When I run /googlesitemap/index.php in a browser it works fine and generates the updates in the xml files.

 

When I run it as a cron I get:

 

Any idea why it's having issues?

It's because cron can't find the appropriate locations. I think I posted a way to fix this in his thread but your host is really the one that you should ask.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It's because cron can't find the appropriate locations. I think I posted a way to fix this in his thread but your host is really the one that you should ask.

 

 

Thanks! :)

Link to comment
Share on other sites

I just installed this contribution and it seems that I have a problem.

 

When I browse to www.mysite.com/googlesitemap/index.php I get an error. I tried (per the instructions) to start with Sitemap Style as Standard first, but I get the following error:

 

------------------------------------------------------------------------

1054 - Unknown column 'c.categories_status' in 'where clause'

 

SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered

FROM products p, categories c, products_to_categories p2c where c.categories_status='1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p.products_status='1'

ORDER BY products_ordered DESC

 

[TEP STOP]

-------------------------------------------------------------------------------------------------------------------

 

 

Then I switched to "Alternate" and I get the following now:

 

 

There are more and I can post them if needed, I just didn't want to flood this thread with wasted info.

 

--------------------------------------------------

Opening /sitemapproducts.xml

FS_CAT /mysiteroot/

Server http://www.mysite.com

Save Path /

WS_CAT /

 

 

Warning: fopen(/sitemapproducts.xml) [function.fopen]: failed to open stream: Permission denied in /mysiteroot/googlesitemap/sitemap.class_Alternate.php on line 353

 

ERROR: Google Product Sitemap Generation FAILED!

 

Opening /sitemapcategories.xml

FS_CAT /mysiteroot/

Server http://www.mysite.com

Save Path /

WS_CAT /

-----------------------------------------------------------------------------------

 

 

 

Did I do something wrong or is there a setting somewhere else that needs to be changed?

Edited by ggrant3
Link to comment
Share on other sites

I just installed this contribution and it seems that I have a problem.

 

When I browse to www.mysite.com/googlesitemap/index.php I get an error. I tried (per the instructions) to start with Sitemap Style as Standard first, but I get the following error:

 

------------------------------------------------------------------------

1054 - Unknown column 'c.categories_status' in 'where clause'

 

Then I switched to "Alternate" and I get the following now:

 

 

There are more and I can post them if needed, I just didn't want to flood this thread with wasted info.

 

--------------------------------------------------

Opening /sitemapproducts.xml

FS_CAT /mysiteroot/

 

Did I do something wrong or is there a setting somewhere else that needs to be changed?

For the first error, it is because a database field is missing. However, that field is not used in this contribuiton so you must not be using this one.

 

For the second error, it shows there is a problem in your configure file. This has been convered many times in this thread so you can look back at those posts, if needed. You should address the first problem first though since none of it will help if you are using a different contribution.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

For the first error, it is because a database field is missing. However, that field is not used in this contribuiton so you must not be using this one.

 

That's weird because I got the files from this Google Sitemap it is v 1.5 and it lists this url for the support thread in the readme file.

 

Is there a way to erase that line in a particular file then?

 

For the second error, it shows there is a problem in your configure file. This has been convered many times in this thread so you can look back at those posts, if needed. You should address the first problem first though since none of it will help if you are using a different contribution.

Edited by ggrant3
Link to comment
Share on other sites

 

That's weird because I got the files from this Google Sitemap it is v 1.5 and it lists this url for the support thread in the readme file.

Assuming my version here was somehow different, I downloaded the last version from the link you provided, unarchived it and searched all of the files for categories_status but nothing was found.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Assuming my version here was somehow different, I downloaded the last version from the link you provided, unarchived it and searched all of the files for categories_status but nothing was found.

 

I'm lost then. Because I just downloaded the files from that same link this morning. But I did notice something in the readme file. At the top it says:

----------------------------------------------------------------------

Google XML Sitemap SEO

 

Contribution by: Jack_mcs

http://addons.oscommerce.com/info/6583

Jack_mcs's support thread: http://www.oscommerce.com/forums/topic/330175-google-xml-sitemap-seo/

 

 

Modified and pdated by Spoofy:

The purpose of modification was to get rid of all the hard-coded database queries and the links.

 

By simply calling application_top we can include most of the code which already exists.

 

Furthermore, the contribution works with FWR Media's Ultimate SEO URLs 5. The urls generated in sitemap

are no longer hard coded so they generate the search engine friendly URLs.

 

This version is based on V 1.5 released by Jack_mcs

 

Important Note: I have not updated the Alternate sitemap class. This will be on my to do list.

-------------------------------------------------------------------------------

 

Then towards the bottom in the readme file it says:

 

----------------------------------------------------------------------------------------------------------

Updating from previous Installations:

(This applies in case you are using the original version (1.5) provided by Jack_mcs

---------------------------------------------------------------------------------------------------------

 

But on that contribution page, it shows only you as the author for all the versions listed.So I can't see how I downloaded something else.

 

Is there an "original version 1.5" that I should be using?

 

Does the file that you just downloaded from the link I listed have that information in the readme file?

Link to comment
Share on other sites

I'm lost then. Because I just downloaded the files from that same link this morning. But I did notice something in the readme file. At the top it says:

 

Please point out exactly where you are seeing categories_status in any of the files in that package, along with the line number and I will take another look. Maybe my search function is failing for some reason.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Please point out exactly where you are seeing categories_status in any of the files in that package, along with the line number and I will take another look. Maybe my search function is failing for some reason.

 

I don't see it anywhere.

 

But I just restored my db and reimported the .sql file and I get the same error. I'm wondering if the files I downloaded are the correct ones. Unless I am doing something wrong with the .sql file (which wouldn't surprise me :) )

 

I have been going to my db and importing the file, is that right? I get a "success" message so I figured that was the way to do it.

 

Do you see the parts in the readme file that I pointed out (about how the instructions were for the modified files from your v 1.5)?

Link to comment
Share on other sites

I don't see it anywhere.

Since that database field, categories_status, is not in the files of this contribution, the problem cannot be with this contribution. You'll need to ask i the general support forum for help with the problem.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have a questions regarding permissions (v 1.4 if it matters).

 

I have the sitemap working fine, but in regards to the cron job for /mysiteroot/html/googlesitemap/index.php:

 

I am getting an error saying Permission Denied, when the cron tries to run the file.

 

So what should the permission for that file be?

 

I have the root ("dummy files" - per Chemo's Install instructions) set to 777, but for the googlesitemap folder I have it set to 705 and the index.php file inside that folder is set to 604

Link to comment
Share on other sites

In short, you set the permissions to what is correct for your server. You should never set permissions to 777 unless your server requires it. If you don't know what they should be you'll need to ask your host since there are many possibilites.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi! I've noticed many people just like me having problem with everything working fine except for the Google Pages Sitemap:

ERROR: Google Pages Sitemap Generation FAILED!

 

I have spent hours and hours reading through this forum and searching Google but nobody seem to have solved it anywhere. My guess is that it has something to do with that I have two languages. Anyway, I have gone through the code and noticed that in the function "GeneratePagesSitemap()" it never enters the for-loop since count($pages) was always equal to zero. When I hard code this to a number higher than 1, e.g. "$pages = 20;" I finally get a successfull result on everything.

 

Now my sitemappages.xml look like this:

----------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="gss.xsl"?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

<url>

<loc></loc>

<lastmod></lastmod>

<changefreq>weekly</changefreq>

<priority>.1</priority>

</url>

</urlset>

----------------------------------

 

Does anyone know if this looks like a valid sitemappages.xml file? If not, could you give me an example on how it should look like so I can type it manually?

 

/Johan

Edited by Johan-_-_
Link to comment
Share on other sites

Hi! I've noticed many people just like me having problem with everything working fine except for the Google Pages Sitemap:

ERROR: Google Pages Sitemap Generation FAILED!

 

I have spent hours and hours reading through this forum and searching Google but nobody seem to have solved it anywhere. My guess is that it has something to do with that I have two languages. Anyway, I have gone through the code and noticed that in the function "GeneratePagesSitemap()" it never enters the for-loop since count($pages) was always equal to zero. When I hard code this to a number higher than 1, e.g. "$pages = 20;" I finally get a successfull result on everything.

 

Now my sitemappages.xml look like this:

----------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="gss.xsl"?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

<url>

<loc></loc>

 

Does anyone know if this looks like a valid sitemappages.xml file? If not, could you give me an example on how it should look like so I can type it manually?

No, it is not valid - the location is empty. I don't know why the pages map isn't working for you. Probably some difference in the way your shop is setup.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Ok, thanks for the information. You addon is great, it's just so frustrating when you can't get it to work and have tried everything. My output in standard mode is:

Opening /customers/3/7/f/shop.se//httpd.www/sitemapproducts.xml

FS_CAT /customers/3/7/f/shop.se//httpd.www/

Server http://www.shop.se

Save Path /customers/3/7/f/shop.se//httpd.www/

WS_CAT /

Write /customers/3/7/f/shop.se//httpd.www/sitemapproducts.xml

Generated Google Product Sitemap Successfully

 

Opening /customers/3/7/f/shop.se//httpd.www/sitemapcategories.xml

FS_CAT /customers/3/7/f/shop.se//httpd.www/

Server http://www.shop.se

Save Path /customers/3/7/f/shop.se//httpd.www/

WS_CAT /

Write /customers/3/7/f/shop.se//httpd.www/sitemapcategories.xml

Generated Google Category Sitemap Successfully

 

Opening /customers/3/7/f/shop.se//httpd.www/sitemapmanufacturers.xml

FS_CAT /customers/3/7/f/shop.se//httpd.www/

Server http://www.shop.se

Save Path /customers/3/7/f/shop.se//httpd.www/

WS_CAT /

Write /customers/3/7/f/shop.se//httpd.www/sitemapmanufacturers.xml

Generated Google Manufacturers Sitemap Successfully

 

ERROR: Google Pages Sitemap Generation FAILED!

 

Opening /customers/3/7/f/shop.se//httpd.www/sitemapindex.xml

FS_CAT /customers/3/7/f/shop.se//httpd.www/

Server http://www.shop.se

Save Path /customers/3/7/f/shop.se//httpd.www/

WS_CAT /

Write /customers/3/7/f/shop.se//httpd.www/sitemapindex.xml

Generated Google Sitemap Index Successfully

 

 

My FS_CAT doesn't seem to be ok, I read somewhere in this thread that is should be:

FS_CAT /customers/3/7/f/shop.se//httpd.www/googlesitemap

so I guess that the error should be in my configure.php file. But I can't find anything wrong with that one either:

define('HTTP_SERVER', 'http://www.shop.se');

define('HTTPS_SERVER', 'https://www.shop.se');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', '.www.shop.se');

define('HTTPS_COOKIE_DOMAIN', '.www.shop.se');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/customers/3/7/f/shop.se//httpd.www/');

//define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/'); tried this, didn't work...

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

 

Alternate mode

In alternate mode nothing works, I get permission denied and I notice that it's missing a / before httpd.www which I havn't been able to add..

Opening /sitemapproducts.xml

FS_CAT /customers/3/7/f/shop.se//httpd.www/

Server http://www.shop.se

Save Path /

WS_CAT /

 

Warning: fopen(/sitemapproducts.xml): failed to open stream: Permission denied in /customers/3/7/f/shop.se/httpd.www/googlesitemap/sitemap.class_Alternate.php on line 353

ERROR: Google Product Sitemap Generation FAILED!

etc.

 

 

Any hints will be appreciated. Thanks...

Link to comment
Share on other sites

  • 4 weeks later...

Hi Jack,

 

Thanks for the updated contribution. Everything is working for except for the Pages sitemap. I have downloaded the latest version of the contribution and installed today.

I have changed the line of code at line 299 - $filename, as suggested in the begining of the discussion. It seems to return exactly the same result.

I have used the alternate file but that returns False on all sitemaps. I'm not completely sure if its a path problem?

Will it be a path problem if the other sitemaps are produced correctly?

 

My installation is osCommerce Online Merchant v2.3.1 does this make a difference?

Here's my output:

 

Opening /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapproducts.xml

FS_CAT /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

Server http://www.hopscotchhandmadegifts.co.uk

Save Path /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

WS_CAT /eshop/

Write /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapproducts.xml

Generated Google Product Sitemap Successfully

 

Opening /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapcategories.xml

FS_CAT /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

Server http://www.hopscotchhandmadegifts.co.uk

Save Path /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

WS_CAT /eshop/

Write /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapcategories.xml

Generated Google Category Sitemap Successfully

 

Opening /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapmanufacturers.xml

FS_CAT /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

Server http://www.hopscotchhandmadegifts.co.uk

Save Path /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

WS_CAT /eshop/

Write /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapmanufacturers.xml

Generated Google Manufacturers Sitemap Successfully

 

ERROR: Google Pages Sitemap Generation FAILED!

 

Opening /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapindex.xml

FS_CAT /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

Server http://www.hopscotchhandmadegifts.co.uk

Save Path /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/

WS_CAT /eshop/

Write /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapindex.xml

Generated Google Sitemap Index Successfully

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 25

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 30

)

 

[MANUFACTURERS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 1

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapproducts.xml

[status] => success

[file_exists] => true

)

 

[1] => Array

(

[file] => /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapcategories.xml

[status] => success

[file_exists] => true

)

 

[2] => Array

(

[file] => /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapmanufacturers.xml

[status] => success

[file_exists] => true

)

 

[3] => Array

(

[file] => /var/www/vhosts/hopscotchhandmadegifts.co.uk/httpdocs/eshop/sitemapindex.xml

[status] => success

[file_exists] => true

)

 

)

 

)

 

 

Best regards

 

Richard

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...