Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


Guest

Recommended Posts

Hmmm,

 

I've just realised that this will only work if you have one or two levels of categories. Some sort of recursive arrangement may be needed to make it more generic, but I don't know enough about how Ultimate SEO works to know what to feed it. Anyone??

 

Hickory Dickory

Link to comment
Share on other sites

Hello I would like to install this contribution but i would like to ask if this contribution (Google XML Sitemap Feed) works without having install before the ULTIMATE SEO URL contribution or Search Engine Friendly contribution?

 

 

Could you please give me an answer?

Link to comment
Share on other sites

  • 2 weeks later...

Hello all!

 

Special thanks for this amazing contribution. I get it working for the products and categories.

 

However, I would like to know if there is a way to make other sitemaps for the rest of the site. For instance, I have included a section which is called "News". This information is not in the database. What would be the best way to let Google and other search engines aware of these additional pages, not included in the sitemap?

Link to comment
Share on other sites

Hi all,

It took me two days to read postings and playing with several errors. Finally the MXL files has been created and appear without errors.

Although I was able successfully create XML files, the index.php still sown same errors :

=============================

Notice: Constant MODULE_SHIPPING_CANADAPOST_ZONE already defined in C:\Inetpub\wwwroot\mysite.com\googlesitemap\index.php on line 46

 

Notice: Constant MODULE_SHIPPING_CANADAPOST_CP_HANDLING already defined in C:\Inetpub\wwwroot\ mysite.com\googlesitemap\index.php on line 46

 

Notice: Constant SHIPPING_HANDLING already defined in C:\Inetpub\wwwroot\ mysite.com\googlesitemap\index.php on line 46

 

Notice: Constant MODULE_SHIPPING_CANADAPOST_SORT_ORDER already defined in C:\Inetpub\wwwroot\ mysite.com\googlesitemap\index.php on line 46

 

Notice: Undefined variable: cache_dir in C:\Inetpub\wwwroot\ mysite.com\includes\seo_cache.php on line 44

 

Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

 

Generated Google Sitemap Index Successfully

 

CONGRATULATIONS! All files generated successfully.

 

If you have not already submitted the sitemap index to Google click the link below.

Before you do I HIGHLY recommend that you view the XML files to make sure the data is correct.

 

http://www.google.com/webmasters/sitemaps/...ttp%3A%2F%2Fwww. mysite.com%2Fsitemapindex.xml

 

For your convenience here is the CRON command for your site:

php C:\Inetpub\wwwroot\ mysite.com\googlesitemap/index.php

=================================

I have no idea what may cause above errors.

 

I am on IIS server - sucks anyway. My store is outside the catalog - means no Catalog folder.

I installed the very first of Chemo?s contribution, and replaced index.php, sitemap.class.php - using his hierarchically posted contrib. I finished on his last one - which is: http://www.oscommerce.com/commuGoogle XML Sitemap Feed v1.3

The only changes I made in :sitemap.class.php

 

-arround 255:

function GoogleSitemap($host, $user, $db, $pass){

$this->DB = new MySQL_Database($host, $user, $db, $pass);

$this->filename ="/../sitemap";

//$this->savepath = DIR_FS_CATALOG;

$this->savepath = '/';

$this->base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

$this->debug = array();

} # end class constructor

 

Maybe it will help somebody.

 

Andrew

 

P.S. Chemo ? THANKS FOR YOUR CONTRIBUTIONS they are great !

Link to comment
Share on other sites

Hi all,

It took me two days to read postings and playing with several errors. Finally the MXL files has been created and appear without errors.

Although I was able successfully create XML files, the index.php still sown same errors :

=============================

Notice: Constant MODULE_SHIPPING_CANADAPOST_ZONE already defined in C:\Inetpub\wwwroot\mysite.com\googlesitemap\index.php on line 46

 

Notice: Constant MODULE_SHIPPING_CANADAPOST_CP_HANDLING already defined in C:\Inetpub\wwwroot\ mysite.com\googlesitemap\index.php on line 46

 

Notice: Constant SHIPPING_HANDLING already defined in C:\Inetpub\wwwroot\ mysite.com\googlesitemap\index.php on line 46

 

Notice: Constant MODULE_SHIPPING_CANADAPOST_SORT_ORDER already defined in C:\Inetpub\wwwroot\ mysite.com\googlesitemap\index.php on line 46

 

Notice: Undefined variable: cache_dir in C:\Inetpub\wwwroot\ mysite.com\includes\seo_cache.php on line 44

 

Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

 

Generated Google Sitemap Index Successfully

 

CONGRATULATIONS! All files generated successfully.

 

If you have not already submitted the sitemap index to Google click the link below.

Before you do I HIGHLY recommend that you view the XML files to make sure the data is correct.

 

http://www.google.com/webmasters/sitemaps/...ttp%3A%2F%2Fwww. mysite.com%2Fsitemapindex.xml

 

For your convenience here is the CRON command for your site:

php C:\Inetpub\wwwroot\ mysite.com\googlesitemap/index.php

=================================

I have no idea what may cause above errors.

 

I am on IIS server - sucks anyway. My store is outside the catalog - means no Catalog folder.

I installed the very first of Chemo?s contribution, and replaced index.php, sitemap.class.php - using his hierarchically posted contrib. I finished on his last one - which is: http://www.oscommerce.com/commuGoogle XML Sitemap Feed v1.3

The only changes I made in :sitemap.class.php

 

-arround 255:

function GoogleSitemap($host, $user, $db, $pass){

$this->DB = new MySQL_Database($host, $user, $db, $pass);

$this->filename ="/../sitemap";

//$this->savepath = DIR_FS_CATALOG;

$this->savepath = '/';

$this->base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

$this->debug = array();

} # end class constructor

 

Maybe it will help somebody.

 

Andrew

 

P.S. Chemo ? THANKS FOR YOUR CONTRIBUTIONS they are great !

 

Hi,

 

Completely scrap the XML Sitemap feed that you have installed, and install the latest one that I put in the contrib area (that Chemo wrote). It does not generate any XML files like the old version did. It is all on the fly, and it is the easiest to install. Simply copy the files into where your catalog is, try opening them up in a web browser to see if it works, and if it does, submit those php files to Google sitemaps. That is it. It is simple.

 

Cheers,

Chris

Link to comment
Share on other sites

  • 2 weeks later...
Hi,

 

Completely scrap the XML Sitemap feed that you have installed, and install the latest one that I put in the contrib area (that Chemo wrote). It does not generate any XML files like the old version did. It is all on the fly, and it is the easiest to install. Simply copy the files into where your catalog is, try opening them up in a web browser to see if it works, and if it does, submit those php files to Google sitemaps. That is it. It is simple.

 

Cheers,

Chris

 

 

Where are these new downlaods?

Link to comment
Share on other sites

I want to install this contribution but I'm not sure how to do it.

 

I have copied the following files to my catalog folder:

googlesitemapcategories.php

googlesitemapmanufacturers.php

googlesitemapproducts.php

 

As suggested in the instruction, I tried to run those php files from my browser and got this error message:

 

XML Parsing Error: syntax error

Location: http://www.myStore.com/googleSitemapCategories.php

Line Number 1, Column 62:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

-------------------------------------------------------------^

 

The other two php files also give the same error messages.

 

Also, what do I need to do after submitting the urls of those three php files to google. How would I

know that the installation is successful ?

 

I hope I can get some help or hints here.

 

Thank you so much in advanced

N

Link to comment
Share on other sites

We tried using the products site map file for Google but we're getting errors becuase we have over 50,000 products. It says in the description that it has the ability to create split feeds for this but we can not seem to get it to work. Is there anything we need to do to enable this feature?

Bill Broadbent

Custom Avenue

Link to comment
Share on other sites

We tried using the products site map file for Google but we're getting errors becuase we have over 50,000 products. It says in the description that it has the ability to create split feeds for this but we can not seem to get it to work. Is there anything we need to do to enable this feature?

 

What errors are there? Please explain more of what is happening.

Link to comment
Share on other sites

What errors are there? Please explain more of what is happening.

 

Here is the error from Google:

 

Line:

65535

Too many URLs

Your Sitemap contains too many URLs. Please create multiple Sitemaps with up to 50000 URLs each and submit all Sitemaps.

 

Thanks.

Bill Broadbent

Custom Avenue

Link to comment
Share on other sites

I want to install this contribution but I'm not sure how to do it.

 

I have copied the following files to my catalog folder:

googlesitemapcategories.php

googlesitemapmanufacturers.php

googlesitemapproducts.php

 

As suggested in the instruction, I tried to run those php files from my browser and got this error message:

 

XML Parsing Error: syntax error

Location: http://www.myStore.com/googleSitemapCategories.php

Line Number 1, Column 62:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

-------------------------------------------------------------^

 

The other two php files also give the same error messages.

 

Also, what do I need to do after submitting the urls of those three php files to google. How would I

know that the installation is successful ?

 

I hope I can get some help or hints here.

 

Thank you so much in advanced

N

 

After disabling the 'includes application_bottom.php', the contribution works very nicely ...

N

Link to comment
Share on other sites

After installing this contribution I clicked on the Google Sitemaps tab in my Tools section of admin and I am getting a pop up window with this message:

 

Warning: main(includes/languages/english/FILENAME_GOOGLE_SITEMAPS): failed to open stream: No such file or directory in /home/cust2/user1285208/html/catalog/sitemaps.index.php on line 33

 

Fatal error: main(): Failed opening required 'includes/languages/english/FILENAME_GOOGLE_SITEMAPS' (include_path='.:/usr/share/pear') in /home/cust2/user1285208/html/catalog/sitemaps.index.php on line 33

 

Does anyone have any idea what's going on. I looked into the english file and there is nothing that says FILENAME_GOOGLE_SITEMAPS. I'm sure this is the problem but am lost on why this is happening. Please help. Thanks.

Link to comment
Share on other sites

After installing this contribution I clicked on the Google Sitemaps tab in my Tools section of admin and I am getting a pop up window with this message:

 

Warning: main(includes/languages/english/FILENAME_GOOGLE_SITEMAPS): failed to open stream: No such file or directory in /home/cust2/user1285208/html/catalog/sitemaps.index.php on line 33

 

Fatal error: main(): Failed opening required 'includes/languages/english/FILENAME_GOOGLE_SITEMAPS' (include_path='.:/usr/share/pear') in /home/cust2/user1285208/html/catalog/sitemaps.index.php on line 33

 

Does anyone have any idea what's going on. I looked into the english file and there is nothing that says FILENAME_GOOGLE_SITEMAPS. I'm sure this is the problem but am lost on why this is happening. Please help. Thanks.

 

Can someone look at this and let me know what they think the probelm is? Thanks

Link to comment
Share on other sites

Can someone look at this and let me know what they think the probelm is? Thanks

 

Hi,

 

You do not seem to be using any of Chemo's Sitemap feeds, as they did not integrate into the Admin section from what I understand.

 

Remove the sitemap you have set up, and then install Chemo's on the fly ones which I put in the contrib area.

 

Regards,

Chris

Link to comment
Share on other sites

Hi,

 

You do not seem to be using any of Chemo's Sitemap feeds, as they did not integrate into the Admin section from what I understand.

 

Remove the sitemap you have set up, and then install Chemo's on the fly ones which I put in the contrib area.

 

Regards,

Chris

 

Hi Chris,

 

Do you have any ideas on what I can do about my sites with over 50,000 products?

 

Thanks.

Bill Broadbent

Custom Avenue

Link to comment
Share on other sites

Hi Chris,

 

Do you have any ideas on what I can do about my sites with over 50,000 products?

 

Thanks.

 

Nope - haven't had a chance to look into it yet - sorry.

 

Will try and look into it a bit today but no guarentees.

 

Cheers,

Chris

Link to comment
Share on other sites

Nope - haven't had a chance to look into it yet - sorry.

 

Will try and look into it a bit today but no guarentees.

 

Cheers,

Chris

 

Ok I uninstalled the one with the admin feature and installed this one and now I am getting this error.

 

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

 

 

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

 

End tag 'b' does not match the start tag 'br'. Error processing resource 'http://www.inbedsleepwear.com/catalog/googleSitem...

 

articles_last_mod ASC<br><br><small><font color="#ff0000">[TEP STOP]</font></small>&...

 

Anyone know how to fix this? Thanks

 

MQ

Link to comment
Share on other sites

Ok I uninstalled the one with the admin feature and installed this one and now I am getting this error.

 

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

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

 

End tag 'b' does not match the start tag 'br'. Error processing resource 'http://www.inbedsleepwear.com/catalog/googleSitem...

 

articles_last_mod ASC<br><br><small><font color="#ff0000">[TEP STOP]</font></small>&...

 

Anyone know how to fix this? Thanks

 

MQ

 

Good God, nevermind, its working fine, I guess that one wouldn't work because I don't have articles or topics only products and etc.

 

I do have one question thought I am a little confused about. Do I just type in the url with the .php extension on Google or do I have to use the .xml? I am confused on this one because Google says that only .xml is supported. Anyway if anyone could tell me that would be FANTASTIC! Thanks.MQ

Link to comment
Share on other sites

Good God, nevermind, its working fine, I guess that one wouldn't work because I don't have articles or topics only products and etc.

 

I do have one question thought I am a little confused about. Do I just type in the url with the .php extension on Google or do I have to use the .xml? I am confused on this one because Google says that only .xml is supported. Anyway if anyone could tell me that would be FANTASTIC! Thanks.MQ

 

Yeah that TEP STOP error occurs if you install a sitemap for articles or topics and you dont have any articles or topics. Yes I know... not a very informative error message. Never mind.

 

As for submitting to Google, just submit it WITH the .php extension. When google says that it only supports .xml, it is meaning that it only supports a file that outputs in xml format, which is what the php files do.

 

Cheers,

Chris

Link to comment
Share on other sites

Hi Chris,

 

Do you have any ideas on what I can do about my sites with over 50,000 products?

 

Thanks.

 

Ok, I have thought about it and I have a possible solution for you.

This sitemap doesn't automatically break up the results, so my thought is to do the following (there might be a nicer way to do it, but this should work anyway):

 

1) duplicate your sitemapProducts.php file (and name it sitemapProducts1.php and sitemapProducts2.php).

2) open up sitemapProducts1.php and find the following code:

$sql = "SELECT products_id as pID,

products_date_added as date_added,

products_last_modified as last_mod,

products_ordered

FROM " . TABLE_PRODUCTS . "

WHERE products_status = '1'

ORDER BY products_last_modified DESC,

products_date_added DESC,

products_ordered DESC";

 

Replace that code with this:

 

$sql = "SELECT products_id as pID,

products_date_added as date_added,

products_last_modified as last_mod,

products_ordered

FROM " . TABLE_PRODUCTS . "

WHERE products_status = '1'

ORDER BY products_last_modified DESC,

products_date_added DESC,

products_ordered DESC

LIMIT 0,49999";

 

The limit above will only return the first 50,000 links.

 

3) Open up sitemapProducts2.php and change that same SQL code, but make it LIMIT 50000,99999

4) Run both of them in Internet Explorer and see if it works

5) Submit both to Google and see how you go.

 

Let me know whether this works or not. It is the easiest method I could think of.

 

Cheers,

Chris

Edited by stonebridgecomputing
Link to comment
Share on other sites

Yeah that TEP STOP error occurs if you install a sitemap for articles or topics and you dont have any articles or topics. Yes I know... not a very informative error message. Never mind.

 

As for submitting to Google, just submit it WITH the .php extension. When google says that it only supports .xml, it is meaning that it only supports a file that outputs in xml format, which is what the php files do.

 

Cheers,

Chris

 

Thanks for the help!

 

MQ

Link to comment
Share on other sites

Here is sitemap for FAQ Desk

 

http://www.oscommerce.com/community/contributions,3233

 

(FAQ seck contribution http://www.oscommerce.com/community/contri...earch,faq+desk)

 

{I 'm becoming a coder !!! :D Before use osCommerce, i don't know anything about code. But when i try to develop my site, i learn very much about php code. It's so great :-D}

Paint for VietNamese :

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...