Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


Guest

Recommended Posts

Hi,

ive followed the install and allseemed to go well. But,

this is the output from the products.

 

<loc>http://www.fish4ituk.co.uk/catalog2/product_info.php?products_id=550</loc>

<lastmod>2005-04-25</lastmod>

<changefreq>weekly</changefreq>

<priority>1.0</priority>

 

 

and the categories.

 

<loc>http://www.fish4ituk.co.uk/catalog2/index.php?cPath=29</loc>

<lastmod>2004-01-16</lastmod>

<changefreq>weekly</changefreq>

<priority>0.5</priority>

 

i know this isnt right but i havent a clue why.

keep smiling

colin

Link to comment
Share on other sites

Hi,

My apologies,

I had a look at the thread above from fatmcgav.

I clicked the attached link and his lines showed the actual product name.

Mines doesn?t.

Cheers

Keep smiling

colin

Link to comment
Share on other sites

Ah ha.

Is this contrib in the contrib section or do you have a link.

And.

Forgive my ignorance, what does it do.

 

keep smiling

Colin

Link to comment
Share on other sites

Ok.

 

Found them on line 372-405-449

 

'lastmod' => date ("Y-m-d\TH:i:sO", strtotime($lastmod)),

 

Please correct me if it's wrong.

I just got feedback from google :(

It appears the 'O' option doesn't generate the GMT time offset in teh correct format for google. It gives eg '+0100' while google expects '+01:00'.

 

I'm just gonna drop the time portion for now ... I think just as chemo did in the recent upload.

 

Carine

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi Bobby,

 

I've installed the newest release of this contribution. If i go to https://www.kitchenniche.ca/googlesitemap/index.php it says that everything was successful, however if i go for example to http://www.kitchenniche.ca/sitemapindex.xml there is nothing but:

 

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.kitchenniche.ca/sitemapindex.xml'.

 

Did i miss something?

 

Thanks in advance

 

Sandra

HIM - Dark Light - Out on 26/09/05
Link to comment
Share on other sites

I just got feedback from google  :(

It appears the 'O' option doesn't generate the GMT time offset in teh correct format for google. It gives eg '+0100' while google expects '+01:00'.

 

I'm just gonna drop the time portion for now ... I think just as chemo did in the recent upload.

 

Carine

Carine,

 

I tried a few different things and the one that worked for everyone was just dropping it all the way back to the basic YYYY-MM-DD. Google gives examples with this format and is by far the simplest...and we know it works.

 

Try it out and see what you think...

 

BTW, I'm almost done with the multi-lingual code.

Hi Bobby,

 

I've installed the newest release of this contribution. If i go to https://www.kitchenniche.ca/googlesitemap/index.php it says that everything was successful, however if i go for example to http://www.kitchenniche.ca/sitemapindex.xml  there is nothing but:

 

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.kitchenniche.ca/sitemapindex.xml'.

 

Did i miss something?

 

Thanks in advance

 

Sandra

That is a strange issue...if it gives those success messages the files should be written to file correctly.

 

Bobby

Link to comment
Share on other sites

Chemo

 

Nice work. The documentation is clean and extensive. I reconfigured 'sitemap.class.php' to support SEF (because that is what I use...) and added links in 'index.php' for the upload and XML files. Here is the code for the links. It is pretty straightforward, but I'm here and...

 

if ($submit){
echo 'CONGRATULATIONS! All files generated successfully.' . "\n\n";
echo 'If you have not already submitted the sitemap index to Google click the link below.' . "\n";
echo 'Before you do I HIGHLY recommend that you view the XML files to make sure the data is correct.' . "\n\n";
echo '<a href="' . $google->GenerateSubmitURL() . '">' . $google->GenerateSubmitURL() . '</a>' . "\n\n";
echo 'For your convenience here is the CRON command for your site:' . "\n";
echo 'php ' . dirname($_SERVER['SCRIPT_FILENAME']) . '/index.php' . "\n\n";
echo 'Here is your sitemap index: <a href="' . $google->base_url . 'sitemapindex.xml">' . $google->base_url . 'sitemapindex.xml' . '</a>' . "\n";
echo 'Here is your product sitemap: <a href="' . $google->base_url . 'sitemapproducts.xml">' . $google->base_url . 'sitemapproducts.xml' . '</a>' . "\n";
echo 'Here is your category sitemap: <a href="' . $google->base_url . 'sitemapcategories.xml">' . $google->base_url . 'sitemapcategories.xml' . '</a>' . "\n";
} else {
print_r($google->debug);
}

· willross

··········

Link to comment
Share on other sites

Real nice Will! I didn't make them clickable links because the original purpose was to have them display as part of the CRON email...when they become clickable in most email applications.

 

So, why not upload a version with SEF support? Be sure to comment it as thoroughly as possible and make it clear in the release notes that it is for SEF.

 

Bobby

Link to comment
Share on other sites

If i use Firefox and go to http://www.kitchenniche.ca/sitemapindex.xml ] http://www.kitchenniche.ca/sitemapindex.xml [/url] i get this:

 

With this XML-File are no Style-Informations linked.

 

<html>

<body/>

</html>

 

The above don't help me very much but maybe you know what's wrong.

 

Thanks a lot

Edited by kitchenniche
HIM - Dark Light - Out on 26/09/05
Link to comment
Share on other sites

Sandra,

 

I assure you that if I knew the answer I would offer you the best support possible. However, I don't.

 

I can tell you that the data is not being passed to the save function properly. Why it is not passing the data is beyond me and to be honest can't debug it unless I had hands on code so to speak.

 

Bobby

Link to comment
Share on other sites

Chemo

 

Sorry about the CRON mixup. Maybe it could be written to display links only if HTML. I should have looked closer.

 

I will add the SEF mod here so that it doesn't interfere with versions... It is actually two small changes to 'GenerateProductSitemap'. A new version of SEF will be released soon too. It will be called 'SEF-X'. It is my take on SEF's mod_rewrite idea and can be seen here: http://shoptoo.palaia.us/

· willross

··········

Link to comment
Share on other sites

Sandra,

 

I assure you that if I knew the answer I would offer you the best support possible.  However, I don't.

 

I can tell you that the data is not being passed to the save function properly.  Why it is not passing the data is beyond me and to be honest can't debug it unless I had hands on code so to speak.

 

Bobby

 

That's ok, thanks anyway.

 

Maybe it is something to do with the "Ultimate SEO Contribution" which does not work correctly: If i make changes like adding a new product, i get the following error above the categories-box:

 

Warning: in_array(): Wrong datatype for second argument in /home/kitchenn/public_html/includes/boxes/categories.php on line 50

 

I then have to go to my admin/Configuration/PageCacheSettings/DeleteCacheFiles/ and click on True, then, the error is gone.

 

Anyways, i try to install the Google-sitemap contribution again, maybe i'll have more luck this time.

 

Sandra

HIM - Dark Light - Out on 26/09/05
Link to comment
Share on other sites

Sandra,

 

Not to split hairs but Ultimate SEO URLs works correctly...it's the category box that is throwing the error. The support thread has addressed this issue at least 8 or 9 times with the suggested correction.

 

What you are experiencing with the Google XML Sitemap contribution has absolutely nothing to do with Ultimate SEO URLs...not even close.

 

Bobby

Link to comment
Share on other sites

That's ok, thanks anyway.

 

Maybe it is something to do with the "Ultimate SEO Contribution" which does not work correctly: If i make changes like adding a new product, i get the following error above the categories-box:

 

Warning: in_array(): Wrong datatype for second argument in /home/kitchenn/public_html/includes/boxes/categories.php on line 50

 

I then have to go to my admin/Configuration/PageCacheSettings/DeleteCacheFiles/ and click on True, then, the error is gone.

 

Anyways, i try to install the Google-sitemap contribution again, maybe i'll have more luck this time.

 

Sandra

 

hooops, I meant the "page-cache-contribution" and not the "Ultimate-SEO"

HIM - Dark Light - Out on 26/09/05
Link to comment
Share on other sites

Will:

 

Thanks a lot, i do not get those errors anymore! :thumbsup:

 

Bobby:

 

Sorry, i didn't even meant the "SEO-URL-Contribution" i meant the Page-Cache-Contribution... but it seems like it is nothing to do with that.

HIM - Dark Light - Out on 26/09/05
Link to comment
Share on other sites

I'm still dumbfounded as to your problem...there is something stopping the data from being transferred to the save function.

 

Maybe if we get time later get with me on instant messenger and we'll spend a few trying to debug it.

 

For everyone else that has this installed: when you get your notification from Google that the feed was accepted be sure to post it!

 

Bobby

Link to comment
Share on other sites

Chemo,

 

10000x Thank you, I uploaded your contrib. and it went all correct (I wish all the contribs. instruction were as well written as yours!!!) :thumbsup:

 

I uploaded my sitemap to google, I will check back to you the moment it is accepted

 

Denice

( :D second time I'm smilling like this after uploading a contrib, normally I look like this after installing a new contrib :wacko: )

Link to comment
Share on other sites

Hey Bobby,

 

Is this contrib written in such a way that it is looking for specific fields in the product tables? Mine fails on the product sitemap but successful with the category sitemap and sitemap index. My products table is nowhere close to stock so if this is the case, I would need to edit the file to reflect the product fields I have deleted and the ones I have added.....

 

Thanks!

Link to comment
Share on other sites

Hi Bobby, any clues to the following

I've been scratching my head on this one. Hopefuly somebody can explain what's happening. When I run the script, the output is successful but instead of creating the three files in my root dir named:

 

sitemapproducts.xml

sitemapcategories.xml

sitemapindex.xml

 

i get three files in my root dir named:

 

googlesitemapsitemapproducts.xml

googlesitemapsitemapcategories.xml

googlesitemapsitemapindex.xml

 

it appears to be amending the name of the googlesitemap directory to my files. I haven't edited any of the code. The googlesitemap directory is in my root dir, and it runs without error. Just the naming of the files is wrong.

 

Cheers

Matt

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.
Note: Your post will require moderator approval before it will be visible.

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