Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


749 replies to this topic

#41 Wendy James

  • Community Member
  • 4,131 posts
  • Real Name:Wendy James
  • Gender:Female
  • Location:Alabama USA

Posted 05 June 2005, 07:57

Chemo, on Jun 5 2005, 01:34 AM, said:

Try this while in terminal:
crontab -e 0 0 * * * php /path/to/googlesitemap/index.php
Of course, change the path to the correct one! :)

Bobby

<{POST_SNAPBACK}>



Thanks Bobby, I tried that again... it was what I was doing before but now I am seeing it say the url at the top of my telnet window
[ wrote 2 lines ] in the middle,
crontab: installing new crontab
"/tmp/crontabblahblah":1: bad minute
errors in crontab file, can't install.
do you want to retry the same edit?
at the bottom

I think it is time for me to take a break =)
Wendy James

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

#42 misa

  • Community Member
  • 169 posts
  • Real Name:Rob

Posted 05 June 2005, 08:02

and this:

Fatal error: Call to undefined function: tep_session_is_registered() in /home/bruinenfit.nl/public_html/shop/includes/functions/html_output.php on line 65


I've got https

#43 Chemo

  • Banned
  • 2,486 posts
  • Real Name:Bobby
  • Location:/usa/kentucky/richmond/

Posted 05 June 2005, 08:05

Hey Rob...we've already covered that error with tep_session_is_registered. You did at least read the first page or so before posting that didn't you?

I am working on another release and will have it uploaded directly.

Bobby

#44 Chemo

  • Banned
  • 2,486 posts
  • Real Name:Bobby
  • Location:/usa/kentucky/richmond/

Posted 05 June 2005, 08:31

New version uploaded with the fixes thus far...

1) Fixed tep_session_is_registered() error
2) Fixed file save path
3) Added debug code

Now, if there is something wrong I want to see that debug output. :)

Bobby

#45 theman

  • Community Member
  • 163 posts
  • Real Name:AL S

Posted 05 June 2005, 08:34

Chemo, on Jun 5 2005, 01:31 AM, said:

Contributions that I have developed:
31 Released and counting...

<{POST_SNAPBACK}>

i think time to update your sig :)

#46 Chemo

  • Banned
  • 2,486 posts
  • Real Name:Bobby
  • Location:/usa/kentucky/richmond/

Posted 05 June 2005, 08:37

...not yet. I still need to release a few:

1) Ultimate SEO URLs v2.1 and v3.0
2) HTML Email Template Engine
3) Optimized category menu
4) ....and a few others

I'll update it at 40 or so :)

Bobby

#47 Tomcat

  • Community Member
  • 192 posts
  • Real Name:-
  • Gender:Male
  • Location:Tuscany - Italy

Posted 05 June 2005, 08:54

Chemo, on Jun 5 2005, 09:37 AM, said:

...not yet.  I still need to release a few:

1) Ultimate SEO URLs v2.1 and v3.0
2) HTML Email Template Engine
3) Optimized category menu
4) ....and a few others

I'll update it at 40 or so :)

Bobby

<{POST_SNAPBACK}>


Now...
Do you ever sleep ?
How many of you behind "Chemo" ? :D

Thanks Bobby
Outside links in signatures are not allowed!

#48 misa

  • Community Member
  • 169 posts
  • Real Name:Rob

Posted 05 June 2005, 08:59

Ok............everything is fine now. No errors left and submitted to Google.

Thanks (donation is on his way)

#49 Chemo

  • Banned
  • 2,486 posts
  • Real Name:Bobby
  • Location:/usa/kentucky/richmond/

Posted 05 June 2005, 09:00

...I wish there were at least 2 more of me.

BTW, I wanted to say that there may be an issue with Ultimate SEO URLs < v2.0b and the feed. The issue is most likely the cache that is needed to generate the URLs.

However, I am literally within hours of releasing v2.1 which has some really nice options like the ability to RUN WITHOUT THE CACHE. This will ensure complete compatibility with this feed (and any other feed like admin side Froogle, etc).

So, if you have SEO URLs installed be sure to VIEW THE GENERATED XML files for data integrity.

And what do you think about that documentation?? :)

Bobby

Edited by Chemo, 05 June 2005, 09:02.


#50 Phocea

  • Community Member
  • 159 posts
  • Real Name:Greg

Posted 05 June 2005, 09:54

Chemo, great contrib and the install / documentation looks great.

There is indeed a small glitch with the SEO urls, in the categories xml .. the first 4 listed use the SEO, then it reverts to the c_path one.

No problem in the products however.

Are you planning on making this multi language compatible ? The index should then one file for each category in their own languages and one files for each products/language combination also.

Since there is still no solution for good SEO in differetn language I guess that appending the ?language=xx at the end of each URL should suffice...
Any plans on this ?

#51 joop

  • Community Member
  • 76 posts
  • Real Name:Joop Buis

Posted 05 June 2005, 11:47

In order to make this by the way excellent contribution to work with the "other" (topic 129041) SEO URL's contribution i had to make some little changes.

I hope it's not a problem i post them here and perhaps you can do something with it.



In googlesitemap/index.php around line 58:

// SEO OTHER BEGIN
if ( file_exists(DIR_WS_CLASSES . 'seo.class.php') ){
require_once(DIR_WS_CLASSES . 'seo.class.php');
$seo_urls = new SEO_URL($languages_id);
} else if ( file_exists(DIR_WS_CLASSES . 'url_rewrite.php') ){
require_once(DIR_WS_CLASSES . 'url_rewrite.php');
$other_rewrite = true;
}
// SEO OTHER END


In google/sitemap.class.php just below function GenerateProductSitemap(){


// SEO OTHER BEGIN
global $other_rewrite;

if (!$other_rewrite) {
$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_ordered DESC";
} else {
$sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_name, ptc.categories_id
FROM " . TABLE_PRODUCTS . " AS p LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " AS ptc
ON ptc.products_id=p.products_id
LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " AS pd
ON pd.products_id=p.products_id
WHERE p.products_status='1'
ORDER BY p.products_ordered DESC";
}
// SEO OTHER END
if ( $products_query = $this->DB->Query($sql) ){
$this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success';
$this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query);
$container = array();
$number = 0;
$top = 0;
while( $result = $this->DB->FetchArray($products_query) ){
$top = max($top, $result['products_ordered']);
// SEO OTHER BEGIN
if (!$other_rewrite)
$location = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false);
else
$location = tep_href_link(FILENAME_DEFAULT, 'cPath=' . tep_get_product_path($result['pID']) . '/' . $result['products_name'], 'NONSSL', false);
// SEO OTHER END
$lastmod = tep_not_null($result['last_mod']) ? $result['last_mod'] : $result['date_added'];
$changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ;
$ratio = $result['products_ordered']/$top;
$priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', '');

#52 mark27uk3

  • Community Member
  • 1,547 posts
  • Real Name:Mark
  • Gender:Male
  • Location:24-7 Mobile Accessories

Posted 05 June 2005, 12:53

Hi,

I have installed this contrib and this may sound like a really stoopid question but when you setup the cron job would this be the correct path if my store is in root

Quote

public_html/googlesitemap/index.php

Also how would I know that it has run okay, would I have to wait until midnight??

Mark
Lifes a bitch, then you marry one, then you die!

#53 misa

  • Community Member
  • 169 posts
  • Real Name:Rob

Posted 05 June 2005, 13:16

Google has visited my page but is giving the following message:

Invalid date
An invalid date was found. Please validate your Sitemap before resubmitting



Could someone tell me wat to change (Dutch site)

#54 bruyndoncx

  • Community Member
  • 2,307 posts
  • Real Name:Carine Bruyndoncx
  • Gender:Female
  • Location:Belgium/ Antwerp/ Turnhout/ Arendonk

Posted 05 June 2005, 13:37

Misa, I just submitted mine, can you tell how long it took for google to visit your site ?
Hava a nice day !
Carine Bruyndoncx

KEUKENLUST, Everything but the kitchensink !

#55 joop

  • Community Member
  • 76 posts
  • Real Name:Joop Buis

Posted 05 June 2005, 13:55

About 3 hours and i had the same problem with the invalid date !

But he is getting slower and slower.

Edited by joop, 05 June 2005, 13:57.


#56 misa

  • Community Member
  • 169 posts
  • Real Name:Rob

Posted 05 June 2005, 14:22

4 hours here, what is getting slower Joop?

#57 joop

  • Community Member
  • 76 posts
  • Real Name:Joop Buis

Posted 05 June 2005, 14:41

Google,

I resubmitted my page and the first time it took him 5 mins to download it but the second time is still pending for more than 2 hours.

#58 misa

  • Community Member
  • 169 posts
  • Real Name:Rob

Posted 05 June 2005, 14:44

But Joop,

Did you get the same error with invalid date? and what didi you do about it?

Your site is also in the Netherlands?.....or is this not the reason?

#59 bruyndoncx

  • Community Member
  • 2,307 posts
  • Real Name:Carine Bruyndoncx
  • Gender:Female
  • Location:Belgium/ Antwerp/ Turnhout/ Arendonk

Posted 05 June 2005, 14:53

for the datestamp, it is expecting either just a date, or a datetimestamp including the offset to GMT time.

If you append 'O' (uppercase O not zero) it will add eg +02:00 for servers based in the netherlands ...

  'lastmod' => date ("Y-m-d\TH:i:sO", strtotime($lastmod)),
I've made this correction, now waiting on google ...

Carine

Edited by bruyndoncx, 05 June 2005, 14:54.

Hava a nice day !
Carine Bruyndoncx

KEUKENLUST, Everything but the kitchensink !

#60 misa

  • Community Member
  • 169 posts
  • Real Name:Rob

Posted 05 June 2005, 14:57

In which file do I have to make the change then?