Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google XML Sitemap SEO


Jack_mcs

Recommended Posts

Jack, could you please provide the change for the manufacturers sql query in googlesitemap/sitemap.class.php?

This has not been tested but I think it is correct. In googlesitemap/index.php, change

 if ($google->GenerateManufacturerSitemap()){

to

 if ($google->GenerateManufacturerSitemap($languages_id)){

and change

	function GenerateManufacturerSitemap(){
       $sql = "SELECT manufacturers_id as mID, date_added, last_modified as last_mod, manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " order by manufacturers_name DESC";

to

	function GenerateManufacturerSitemap($language_id){
       $sql = "SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = " . (int)$language_id . " order by manufacturers_name DESC";

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

Jack, does the code have an option to add to the robots.txt file? Maybe I just missed it. Like...

 

Sitemap: http://www.example.tld/sitemapindex.xml

 

That way the sitemaps would be available to any other bot.

Add the above to the bottom of the robots file.

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

This has not been tested but I think it is correct. In googlesitemap/index.php, change ...

 

It appears that it is failing...

 

ERROR: Google Manufacturers Sitemap Generation FAILED!

 

and:

[MANUFACTURERS] => Array
               (
                   [sTATUS] => success
                   [NUM_ROWS] => 0
               )

 

I have uploaded an empty sitemapmanufacturers.xml file to a server before testing. All other sitemaps created successfully.

Absinthe Original Liquor Store

Link to comment
Share on other sites

It appears that it is failing...

 

ERROR: Google Manufacturers Sitemap Generation FAILED!

The

order by manufacturers_name

should be

order by m.manufacturers_name

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 is still failing I'm afraid... ERROR: Google Manufacturers Sitemap Generation FAILED!

 

this is the code:

	function GenerateManufacturerSitemap($languages_id){
       $sql = "SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = " . (int)$language_id . " order by m.manufacturers_name DESC";

Absinthe Original Liquor Store

Link to comment
Share on other sites

It is still failing I'm afraid... ERROR: Google Manufacturers Sitemap Generation FAILED!

 

this is the code:

	function GenerateManufacturerSitemap($languages_id){
       $sql = "SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name
               FROM " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = " . (int)$language_id . " order by m.manufacturers_name DESC";

I don't have time to work on it now but you can try running it directly from phpmyadmin to see if the comman will work. Change it to the following, replacing the 1 with the language id you want to use.

SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name FROM manufacturers m left join manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id 1 order by m.manufacturers_name DESC;

If that fails, assuming I didn't make a typo, then there is a problem with your manufacturers table.

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, the following did not work - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 order by m.manufacturers_name DESC LIMIT 0, 30' at line 1

SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name FROM manufacturers m left join manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id 1 order by m.manufacturers_name DESC;

so I changed it to this (where mi.languages_id = 1) and it worked just fine - Showing rows 0 - 3 (4 total, Query took 0.0006 sec)

SELECT m.manufacturers_id as mID, m.date_added, m.last_modified as last_mod, m.manufacturers_name FROM manufacturers m left join manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = 1 order by m.manufacturers_name DESC;

 

So, what does it tell us?

Absinthe Original Liquor Store

Link to comment
Share on other sites

OK, the following did not work - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 order by m.manufacturers_name DESC LIMIT 0, 30' at line 1

 

So, what does it tell us?

Yes, that was a typo in my example. The change you made is correct. But that, with that change, should be the same as what is in the code so I don't know why it is failing. I'm sure it is something simple since that is a minor change to already working code. When I get a chance I will look at it but that could be quite some time.

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

  • 2 weeks later...

Hi Jack,

Thanks very much for your work on this add on.

 

I have version 1.4.1 installed and it seems to work ok. This (and your latest version 1.5) produces sitemaps tagged as <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

 

However, Google says that Sitemap Protocol 0.84 is now deprecated (see http://www.google.com/schemas/sitemap/0.84/ ). Google now adheres to Sitemap Protocol 0.9 as defined by sitemaps.org

 

Are there plans to upgrade this add on to protocol 0.9?

 

Also, is it essential I upgrade my version 1.4.1 to 1.5? In other words are there bugs in 1.4.1 render it obsolete?

Cheers

Link to comment
Share on other sites

  • 2 weeks later...

hi jack,

 

installed the contribution. it works fine ecept the fat that my /sitemapindex.xml is empty. it shows 0 components in it. i was expecting to see the information from the INFORMATION box?

 

Google Sitemap http://mydomain.co.uk/sitemapindex.xml

Number of sitemaps in this Google sitemap index: 0

Click on the table headers to change sorting.

 

can you tell me what is wrong

 

thanks

valeri

Link to comment
Share on other sites

installed the contribution. it works fine ecept the fat that my /sitemapindex.xml is empty. it shows 0 components in it. i was expecting to see the information from the INFORMATION box?

 

Google Sitemap http://mydomain.co.uk/sitemapindex.xml

Number of sitemaps in this Google sitemap index: 0

Click on the table headers to change sorting.

Maybe you didn't set the permissions on the file correctly? What does the test diagnostic report?

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,

the permission for the file is set to 777

not sure how to do the diagnostics report

Enable that setting in admin->Configuration->Google XML SEO and manually run the script.

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

  • 2 weeks later...

I have tried all of the solutions in the previous posts but am still having an issue. Here is my output:

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Product Sitemap Generation FAILED!

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Category Sitemap Generation FAILED!

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Pages Sitemap Generation FAILED!

 

Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT / Opening D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xmlFS_CAT D:/Users/A/adorablebaby/t1.adorablebabyshop.com/Server http://t1.adorablebabyshop.comSave Path D:/Users/A/adorablebaby/t1.adorablebabyshop.com/WS_CAT /

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xml) [function.fopen]: failed to open stream: Permission denied in D:\Users\A\adorablebaby\t1.adorablebabyshop.com\googlesitemap\sitemap.class.php on line 347

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 3130

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 178

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xml

[status] => failure

[file_exists] => true

)

 

[1] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapcategories.xml

[status] => failure

[file_exists] => false

)

 

[2] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemappages.xml

[status] => failure

[file_exists] => true

)

 

[3] => Array

(

[file] => D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapindex.xml

[status] => failure

[file_exists] => true

)

 

)

 

)

 

 

 

 

The path is not being picked up for some reason. Give this a try. At around line 266, find this line

		  $this->savepath = DIR_FS_CATALOG . (substr(DIR_FS_CATALOG, 0, -1) !== '/') ? '/' : '';

Below it, paste the following:

		  $this->savepath = DIR_FS_CATALOG . (substr(DIR_FS_CATALOG, 0, -1) !== '/') ? '/' : '';
									  echo 'set '.$this->savepath.'<br>';

Upload and see what happens. If that still fails, remove that change and use this instead

$this->savepath = '/home/topgoth/public_html/';

Please post the results of the first one either so I can get an idea of what the problem is.

 

Jack

Link to comment
Share on other sites

I have tried all of the solutions in the previous posts but am still having an issue. Here is my output:

 

Warning: fopen(D:/Users/A/adorablebaby/t1.adorablebabyshop.com/sitemapproducts.xml) [function.fopen]: failed to open stream: Permission denied in

The problem is that the sitemap files can't be opened. Are you sure they have been uploaded? Have you changed the permissions (or changed them from read only if Windows)? If those are OK, you will need to ask your host to look at it. It might be that they have fopen disabled.

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

  • 2 weeks later...

I'm new to this and I was wondering if there are any more detailed instructions on this installation for beginners? The instructions in the package are a bit vague for me.

No, the 5 steps, 3 actually since two are setup, is about as simple as any contribution gets. Perhaps asking a question regarding the actual problem you are having will result in better help.

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

No, the 5 steps, 3 actually since two are setup, is about as simple as any contribution gets. Perhaps asking a question regarding the actual problem you are having will result in better help.

 

Can you explain how i do this step...

 

Run the included google_xml_sitemap_seo.sql file using phpmyadmin.

 

 

Do i go to my cpanel and select phmyadmin and then what?

 

Thanks.

Link to comment
Share on other sites

Can you explain how i do this step...

 

Run the included google_xml_sitemap_seo.sql file using phpmyadmin.

 

 

Do i go to my cpanel and select phmyadmin and then what?

 

Thanks.

The select your database on the left, then the SQL tab on the right. Remove the contents of the text area and put the contents of google_xml_sitemap_seo.sql in it. Press GO.

 

Look for the return message above that text area when the procedure is complete.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

jack,

can you calrify when submitting the site maps to google, do i need to submit the index map too or only the products, categories, pages?

i have submited all including index

thanks

I sent all of mine, AND put them in my robots.txt file.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Hi fellas

 

I need advice on this contribution before removing Dynamic Sitemap and install Google XML Sitemap SEO.

 

I have recently changed hosting company due to old one wont allo Mod_Rewrite and now I have managed to turn on my Ultimate SEO URLs. However I noticed current Dynamic Sitemap addon generates different links to those been rewrited by SEO URLs.

 

I checked on google webmastertools and seems google bot is still able to follow those links without error. Thank God :D

 

I want to maximise my website SEO and seems would be good to replace my old Dynamic Sitemap by Google XML Sitemap SEO.

 

Now, I have a couple questions:

1. Does the sitemap created by Google XML Sitemap SEO fully compatiable with other search engines?

2. Does Google XML Sitemap SEO also automaticly submit sitemap to all major Search Engines such as Google, Bing and Yahoo? (I am asking cos Dynamic Sitemap does submit to Google, Bing, Yahoo, Ask.com upon completion automaticly.)

 

THanks

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