Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


Guest

Recommended Posts

Ok, the php sitemaps work fine for me.

How can i edit the file "googleSitemapProducts.php", so that my Allproducts.php (a list with links to all products) is also added to the sitemap?

Since the allproducts.php isn?t a real product page it won?t be added by itself.

 

Thank you!

Link to comment
Share on other sites

Aloha..... Have a problem here.

 

Just installed this puppy and am getting this error.

 

Fatal error: Cannot instantiate non-existent class: url_rewrite in /home/tokey666/public_html/demogoria/shop/includes/functions/html_output.php on line 71

 

Either way, with Search Engine Friendly URLS (still in development) turned on OR off, I still get the same error.

 

Makes me sad. I was really looking forward to this.

 

Any help/suggestions?

Link to comment
Share on other sites

Aloha..... Have a problem here.

 

Just installed this puppy and am getting this error.

 

Fatal error: Cannot instantiate non-existent class: url_rewrite in /home/tokey666/public_html/demogoria/shop/includes/functions/html_output.php on line 71

 

Either way, with Search Engine Friendly URLS (still in development) turned on OR off, I still get the same error.

 

Makes me sad. I was really looking forward to this.

 

Any help/suggestions?

 

Hi,

 

Firstly, Search Engine Friendly URLs (still in development) should be turned OFF.

 

Do you use Chemo's Ultimate SEO URLs? If not, maybe it isn't seeing that you don't have it installed and trying to use it anyway.

 

Does anyone else have any ideas?

I will try and have a look into it some time today and see how I go.

 

Cheers,

Chris

Link to comment
Share on other sites

Hi,

 

Firstly, Search Engine Friendly URLs (still in development) should be turned OFF.

 

Do you use Chemo's Ultimate SEO URLs? If not, maybe it isn't seeing that you don't have it installed and trying to use it anyway.

 

Does anyone else have any ideas?

I will try and have a look into it some time today and see how I go.

 

Cheers,

Chris

 

Man I'm an idot. I have Seach Engine Friendly URL installed, not Chemos. I installed that a while ago and just got it confused when I installed this one! Geeze. :) Thanks though!

Link to comment
Share on other sites

Hi everyone...

 

I have an error which I have read other people have had.. but can't find a solution that works for me.. but perhaps I'm missign something.

 

when i go to www.domainname.com/googlesitemap/index.php i get all the right messages..

 

Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

 

Generated Google Sitemap Index Successfully

 

CONGRATULATIONS! All files generated successfully.

 

etc.

 

When I go to www.domainname.com/sitemapindex.xml i get:

 

The XML page cannot be displayed

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

 

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

 

XML document must have a top level element. Error processing resource 'http://www.domainname.com/sitemapindex.xml'.

 

Earlier in this forum someone said you can try and change soem code in includes/boxes/categories but my code seems to be somewhat different so can't find which bit to change. Coudl this be the problem?

 

I tried uploading to google.. error:

 

Sitemap Errors

Empty Sitemap

 

Your Sitemap does not contain any URLs. Please validate and resubmit your Sitemap.

 

Any ideas?

 

Thank you!

Link to comment
Share on other sites

Hi! Have seen you discuss this problem before...but i cant find a solution fort it. Anyone who know??

 

Getting this message:

 

 

Warning: fopen(/home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapproducts.xml): failed to open stream: No such file or directory in /home/stylings/public_html/bokshopen-se/googlesitemap/sitemap.class.php on line 581

ERROR: Google Product Sitemap Generation FAILED!

 

 

Warning: fopen(/home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapcategories.xml): failed to open stream: No such file or directory in /home/stylings/public_html/bokshopen-se/googlesitemap/sitemap.class.php on line 581

ERROR: Google Category Sitemap Generation FAILED!

 

 

Warning: fopen(/home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapindex.xml): failed to open stream: No such file or directory in /home/stylings/public_html/bokshopen-se/googlesitemap/sitemap.class.php on line 581

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 83

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 15

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapproducts.xml

[status] => failure

[file_exists] => false

)

 

[1] => Array

(

[file] => /home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapcategories.xml

[status] => failure

[file_exists] => false

)

 

[2] => Array

(

[file] => /home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapindex.xml

[status] => failure

[file_exists] => false

)

 

)

 

)

Link to comment
Share on other sites

Hi! Have seen you discuss this problem before...but i cant find a solution fort it. Anyone who know??

 

Getting this message:

Warning: fopen(/home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapproducts.xml): failed to open stream: No such file or directory in /home/stylings/public_html/bokshopen-se/googlesitemap/sitemap.class.php on line 581

ERROR: Google Product Sitemap Generation FAILED!

Warning: fopen(/home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapcategories.xml): failed to open stream: No such file or directory in /home/stylings/public_html/bokshopen-se/googlesitemap/sitemap.class.php on line 581

ERROR: Google Category Sitemap Generation FAILED!

Warning: fopen(/home/FA04-28-12-60_g9un49pqm4vfgqge6r8n/bokshopen.se/public_html/sitemapindex.xml): failed to open stream: No such file or directory in /home/stylings/public_html/bokshopen-se/googlesitemap/sitemap.class.php on line 581

ERROR: Google Sitemap Index Generation FAILED!

 

 

Use the new version of the Sitemap. It is MUCH easier to get working.

 

Regards,

Chris

Link to comment
Share on other sites

Anyone got this to output chemo seo url into the site map. Google will probley see this as double content, I would think.

 

Hi,

 

I cant remember which version I am using, but they definately do chemo's SEO URL's.

 

The new one I put in there should also use Chemo's SEO URL's as it was written by Chemo.

 

Try using the new version of the XML Sitemap feed, as it is MUCH better, and it runs on the fly.

 

Also, check whether you are actually using Chemo's SEO URL's or another one.

 

Regards,

Chris

Link to comment
Share on other sites

Hey Chris...grab a copy of this and upload it as a package (pretty please) :)

 

A suggested filename would be googleSitemapManufacturers.php

 

<?php
/**
 * Google Sitemap Generator - Manufacturers
 * 
 * Script to generate a Google sitemap (categories) for osCommerce based stores
 *
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version 1.1
 * @link http://www.oscommerce-freelancers.com/ osCommerce-Freelancers
 * @copyright Copyright 2006, Bobby Easland 
 * @author Bobby Easland 
 * @filesource
 */

/*
 * Include the application_top.php script
 */
include_once('includes/application_top.php');

/*
 * Send the XML content header
 */
header('Content-Type: text/xml');

/*
 * Echo the XML out tag
 */
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<?php

/*
 * Define the uniform node function 
 */
function GenerateNode($data){
	$content = '';
	$content .= "\t" . '<url>' . "\n";
	$content .= "\t\t" . '<loc>'.trim($data['loc']).'</loc>' . "\n";
	$content .= "\t\t" . '<lastmod>'.trim($data['lastmod']).'</lastmod>' . "\n";
	$content .= "\t\t" . '<changefreq>'.trim($data['changefreq']).'</changefreq>' . "\n";
	$content .= "\t\t" . '<priority>'.trim($data['priority']).'</priority>' . "\n";
	$content .= "\t" . '</url>' . "\n";
	return $content;
} # end function

/*
 * Define the SQL for the categories query 
 */
$sql = "SELECT * FROM " . TABLE_MANUFACTURERS . "	ORDER BY last_modified DESC, date_added DESC, manufacturers_name ASC";

/*
 * Execute the query
 */
$query = tep_db_query($sql);

/*
 * If there are returned rows...
 * Basic sanity check 
 */
if ( tep_db_num_rows($query) > 0 ){
	/*
	 * Initialize the container
	 */
	$container = array();

	/*
	 * Loop query result and populate container
	 */
	while( $result = tep_db_fetch_array($query) ){
		$container[$result['manufacturers_id']] = max( $result['lsat_modified'], 
																									 $result['date_added']
																		 							);
	} # end while

	/*
	 * Free the resource...could be large
	 * ...clean as we go
	 */
	tep_db_free_result($query);

	/*
	 * Sort the container based on last mod date
	 */
	arsort($container);
} # end if

/*
 * Loop the result set
 * Basic sanity check
 */
if ( sizeof($container) > 0 ){
	$total = sizeof($container);
	$_total = $total;
	foreach( $container as $mID => $last_mod ){
		$location = tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $mID, 'NONSSL', false);
		$changefreq = 'weekly';
		$priority = max( number_format($_total/$total, 1, '.', ','), .1);
		$_total--;		
		$container = array('loc' => htmlspecialchars(utf8_encode($location)),
											 'lastmod' => date ("Y-m-d", strtotime($last_mod)),
											 'changefreq' => $changefreq,
											 'priority' => $priority
											);
		/*
		 * Echo the generated node
		 */
		echo generateNode($container);
	} # end while
} # end if

/*
 * Close the urlset
 */
echo '</urlset>';

/*
 * Include the application_bottom.php script 
 */
include_once('includes/application_bottom.php');
?>

Link to comment
Share on other sites

Which version should i use?

 

To Everyone, I have now uploaded a new package in the contribution area with the Manufacturers sitemap feed inside (as well as containing the sitemap feed for products, categories, and articles).

 

Please download and submit to Google.

 

Here it is: http://www.oscommerce.com/community/contributions,3233

 

So in response to bokshopen.se - download the latest one that I have uploaded.

 

Cheers,

Chris :)

Link to comment
Share on other sites

Need a little help here. Applied this contribution(Google XML Sitemap Feed w/admin) tonite and was able to get everything setup properly. I ran the test script and got the CONGRATULATIONS setup message. Everything looked great even on the admin side. I then went in to Tools, Google XML Feed and clicked the first "Click Here" link, for the 1st option (sorry...can't recall exact message as I have since pulled this contribution)...and that's when things seem to have gone haywire. Nothing really happened upon that click that I saw, unless in the background, but now when looking at my site, the layout is adjusted for some boxes, and all kinds of links are being displayed wth incorrect descriptions(i.e BOX_INFORMATION_PRIVACY instead of Privacy). This is all over my website and not with just links, but field lables also.

 

Now... I am no php guru here, but have applied successfully other contributions, and this one seemed easy enough. Like I say everything worked properly except once I hit that "Click Here" link in the Tools link. Since then, I have taken out all files related to this contribution and manually edited entries to revert to old code and I still cannot get things back to normal.

 

Is there a way to revert back, without having to restore from a backup? As with all other contributions, I was expecting to just replace the new files with old, and all work properly...boy was I wrong with this one....some file that I have no idea of seems to be throwing everything out of whack!....If there is a file that I have missed which has been updated via clicking "Here", please let me know.

 

 

Thanks in advance for any help you can provide to get us back to square one.....

Edited by golfman2006
Link to comment
Share on other sites

Need a little help here. Applied this contribution(Google XML Sitemap Feed w/admin) tonite and was able to get everything setup properly. I ran the test script and got the CONGRATULATIONS setup message. Everything looked great even on the admin side. I then went in to Tools, Google XML Feed and clicked the first "Click Here" link, for the 1st option (sorry...can't recall exact message as I have since pulled this contribution)...and that's when things seem to have gone haywire. Nothing really happened upon that click that I saw, unless in the background, but now when looking at my site, the layout is adjusted for some boxes, and all kinds of links are being displayed wth incorrect descriptions(i.e BOX_INFORMATION_PRIVACY instead of Privacy). This is all over my website and not with just links, but field lables also.

 

Now... I am no php guru here, but have applied successfully other contributions, and this one seemed easy enough. Like I say everything worked properly except once I hit that "Click Here" link in the Tools link. Since then, I have taken out all files related to this contribution and manually edited entries to revert to old code and I still cannot get things back to normal.

 

Is there a way to revert back, without having to restore from a backup? As with all other contributions, I was expecting to just replace the new files with old, and all work properly...boy was I wrong with this one....some file that I have no idea of seems to be throwing everything out of whack!....If there is a file that I have missed which has been updated via clicking "Here", please let me know.

Thanks in advance for any help you can provide to get us back to square one.....

 

Hi,

 

Please use the NEWest version of the Contrib, as it is MUCH easier to get working. You basically copy them straight to your catalog folder, and then submit to Google. You dont need to change anything.

 

I am a bit lost with what you were saying about your problem, so I probably am not the best person to help you with it. But you should be just able to delete the CRON jobs you created and then use the new version.

 

Cheers,

Chris

Link to comment
Share on other sites

I've just copy your files to catalog root, and submit to google the link as:

www.100asa.it/googleSitemapCategories.php , but Google sitemap give me ERROR!

Skype: centoasa

Skype: remigioruberto

Link to comment
Share on other sites

Hi,

 

Please use the NEWest version of the Contrib, as it is MUCH easier to get working. You basically copy them straight to your catalog folder, and then submit to Google. You dont need to change anything.

 

I am a bit lost with what you were saying about your problem, so I probably am not the best person to help you with it. But you should be just able to delete the CRON jobs you created and then use the new version.

 

Cheers,

Chris

 

Not really sure where to begin, but thanks for the reply. I just want to revert back my site back prior to this contribution, but everytime I try to copy over the folder googlesitemap, with prior googlesitemap folder from backup two days ago, files are not changing to the original, rather staying the same as before. Same issue with sitemapcategories.xml, sitemapproducts.xml and sitemapindex.xml files off of the domain/catologue.

 

We inherited this site from another person who apparently had googlesitemap previously setup as that folder existed already. I am thinking something with that prior setup may be causing the issue now.

 

I am not familiar with CRON jobs, but my website host says we have that set to false. Still, I am not abe to revert back the way the site used to look.

 

So with that, is there something in th googlesitemap folder that is causing the files sitemapcategories.xml, sitemapproducts.xml and sitemapindex.xml files to be overrwritten? For example, I have a backup of everything as of last friday, but when I copy over the files into my domain via FTP, the sitemapcategories.xml, sitemapproducts.xml and sitemapindex.xml files stay the same instead of reverting back. The reason I know this is because the file sizes are different. The index.php file looks good, so what other files are causing this incorrect display?

Link to comment
Share on other sites

Not really sure where to begin, but thanks for the reply. I just want to revert back my site back prior to this contribution, but everytime I try to copy over the folder googlesitemap, with prior googlesitemap folder from backup two days ago, files are not changing to the original, rather staying the same as before. Same issue with sitemapcategories.xml, sitemapproducts.xml and sitemapindex.xml files off of the domain/catologue.

 

We inherited this site from another person who apparently had googlesitemap previously setup as that folder existed already. I am thinking something with that prior setup may be causing the issue now.

 

I am not familiar with CRON jobs, but my website host says we have that set to false. Still, I am not abe to revert back the way the site used to look.

 

So with that, is there something in th googlesitemap folder that is causing the files sitemapcategories.xml, sitemapproducts.xml and sitemapindex.xml files to be overrwritten? For example, I have a backup of everything as of last friday, but when I copy over the files into my domain via FTP, the sitemapcategories.xml, sitemapproducts.xml and sitemapindex.xml files stay the same instead of reverting back. The reason I know this is because the file sizes are different. The index.php file looks good, so what other files are causing this incorrect display?

 

 

Whoo hoo....issue resolved!....I gues last night in my tired stuper, I copied over the wrong english.php file which threw everything out of whack....I have since gone through all edited files yesterday and discovered this.....now, just need to re-apply this great contribution, which I will do based on the latest version.....thanks again!

Link to comment
Share on other sites

Whoo hoo....issue resolved!....I gues last night in my tired stuper, I copied over the wrong english.php file which threw everything out of whack....I have since gone through all edited files yesterday and discovered this.....now, just need to re-apply this great contribution, which I will do based on the latest version.....thanks again!

 

I love it when I do not even need to saying anything and it gets fixed hehe.

Link to comment
Share on other sites

I've just copy your files to catalog root, and submit to google the link as:

www.100asa.it/googleSitemapCategories.php , but Google sitemap give me ERROR!

 

Google say me: URL NOT FOUND (row 514) and "it's not possible read your sitemap" (row 514)

Skype: centoasa

Skype: remigioruberto

Link to comment
Share on other sites

Google say me: URL NOT FOUND (row 514) and "it's not possible read your sitemap" (row 514)

Hi,

 

If you look at the bottom of the page when you open it up in a web browser, it will say "Only one top level element is allowed in an XML document".

 

The solution to this has been listed several times in the last couple of pages of this thread. Open up the sitemap in a text editor and remove the line that includes application_bottom.php

 

Regards,

Chris

Link to comment
Share on other sites

Sorry, I've read almost of this thread, but I've not see this tip.

I've just modify all files, and submit again to Google... I hope!

Thank's again

:-)

Skype: centoasa

Skype: remigioruberto

Link to comment
Share on other sites

I've spent a lot of time reading this thread, but I'm very confused about this contribution.

 

I downloaded the latest file (On the Fly Google Sitemaps by stonebridgecomputing, July 11th 2006) & installed it. The modules are called googleSitemapArticles, googleSitemapProducts, googleSitemapCategories, googleSitemapManufacturers & googleSitemapTopics.

 

When I run googleSitemapProducts.php I get an error as shown below:

 

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.

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

Only one top level element is allowed in an XML document. Error processing resource 'http://www.mydomain.com/catalog/g...

 

</urlset><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

----------^

ss="e">

<lastmod>2006-05-19</lastmod>

 

I see that this error is mentioned as "previously dealt with" in the thread several times, but I've not been able to find anything relevant despite searching the topic. The only time I have come across this the post had no replies to it.

 

What confuses me is I keep seeing references to "777 read/write access' to XML files in other posts on this contribution. The contribution I downloaded just had 5 php files, so I'm not sure what I've got to modify. Am I missing some files perhaps?

 

Also, I have this contribution on 2 sites, one gives the above error, the other seems to be OK, but Google won't accept it as a valid XML feed! I've inspected the second site & the feed seems perfect.... I'm confused.

 

Both sites run Chemos Ultimate SEO URLs

 

Any help would be truly appreciated.

Link to comment
Share on other sites

I've spent a lot of time reading this thread, but I'm very confused about this contribution.

 

I downloaded the latest file (On the Fly Google Sitemaps by stonebridgecomputing, July 11th 2006) & installed it. The modules are called googleSitemapArticles, googleSitemapProducts, googleSitemapCategories, googleSitemapManufacturers & googleSitemapTopics.

 

When I run googleSitemapProducts.php I get an error as shown below:

 

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.

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

Only one top level element is allowed in an XML document. Error processing resource 'http://www.mydomain.com/catalog/g...

 

</urlset><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

----------^

ss="e">

<lastmod>2006-05-19</lastmod>

 

I see that this error is mentioned as "previously dealt with" in the thread several times, but I've not been able to find anything relevant despite searching the topic. The only time I have come across this the post had no replies to it.

 

What confuses me is I keep seeing references to "777 read/write access' to XML files in other posts on this contribution. The contribution I downloaded just had 5 php files, so I'm not sure what I've got to modify. Am I missing some files perhaps?

 

Also, I have this contribution on 2 sites, one gives the above error, the other seems to be OK, but Google won't accept it as a valid XML feed! I've inspected the second site & the feed seems perfect.... I'm confused.

 

Both sites run Chemos Ultimate SEO URLs

 

Any help would be truly appreciated.

 

 

Hi, It is answered in page 25 with these posts (and posts surrounding them):

http://www.oscommerce.com/forums/index.php?s=&...st&p=883097

http://www.oscommerce.com/forums/index.php?s=&...st&p=886157

Basically, open up the sitemap files and comment out where it includes application_bottom. Thats it.

Where I said "previously dealt with" (which you commented on), the solution was directly there. It was as clear as clear can be. I had completely spelt it out. With those posts I made with the solutions, people also replied stating that that solution worked. I do not know how you read it all and did not see the solution.

 

 

As for the 777 read/write access thing, do NOT worry about it. That is for the previous version (the version that wasn't on the fly, which had to use CRON jobs and generate XML files separately etc). This new version is much simpler, thanks for Chemo.

 

Cheers,

Chris :)

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