Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


Guest

Recommended Posts

Great!  That is progress!

 

Now, let's work on those paths for the files.  Maybe I didn't make it clear enough in the install file.

 

The dummy files should be uploaded to the CATALOG directory wherever that may be...whether it is in the root or in a directory.

 

Are the dummy files in the store root?

 

 

yup

dummy files were moved to the store root when u told me too

Link to comment
Share on other sites

oops, except that the link is not clickable and has extra vharacters in it... not sure why it pasted right

 

says

http%3A%2F%2Fhomeandgardengiftsandcollectibles.com%2Fsitemapindex.xml

The reason it's like that is because it's encoded...being part of the parameter requires this.

 

BTW, I checked your XML files and everything looks good. Go back to the install directions and pick it back up with the CRON setup...you are almost there!

 

Bobby

Link to comment
Share on other sites

Thank you so much Bobby, this is an awesome contribution as always. Really appreciate it.

 

Going to have to wait on the cron thing. I have to use telnet? and I have no idea how. lol Hubbie does but he is watching Dennis Leary and won't budge. lol =) Will definately let you know how it goes though.

 

Again, great job and thanks!

Wendy James

 

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

Link to comment
Share on other sites

yup

dummy files were moved to the store root when u told me too

OK...so now you have the following structure:

 

domain.com/catalog/googlesitemap/

domain.com/catalog/sitemapindex.xml

domain.com/catalog/sitemapproducts.xml

domain.com/catalog/sitemapcategories.xml

 

The 3 dummy files have been CHMOD'd to 777 and verified to be 777.

 

Can you confirm this? Go back through and actually confirm one time for me...

 

BTW, thank you for working through this. Once we get this worked out for you I'll incorporate the changes to the code and re-upload another version.

 

Bobby

Link to comment
Share on other sites

OK...so now you have the following structure:

 

domain.com/catalog/googlesitemap/

domain.com/catalog/sitemapindex.xml

domain.com/catalog/sitemapproducts.xml

domain.com/catalog/sitemapcategories.xml

 

The 3 dummy files have been CHMOD'd to 777 and verified to be 777.

 

Can you confirm this?  Go back through and actually confirm one time for me...

 

BTW, thank you for working through this.  Once we get this worked out for you I'll incorporate the changes to the code and re-upload another version.

 

Bobby

yup

 

you can verify it as well if you want :P

 

http://www.soularclothing.com/catalog/googlesitemap/

http://www.soularclothing.com/catalog/sitemapindex.xml

http://www.soularclothing.com/catalog/sitemapproducts.xml

http://www.soularclothing.com/catalog/sitemapcategories.xml

 

and im happy to help

Link to comment
Share on other sites

Well, hubbie didn't know as much as I thought. I got to the telnet thing, tried setting it up but it keeps telling me

 

crontab: installing new crontab

"/tmp/crontab.xxxx2cEQpr":0: bad minute

errors in contab file, can't install

so you want to retry the same edit?

 

It is times like this I wish I had a host with a clicky click controp panel instead of a hands on geeks paradise you have to know what you are doing panel. lol

 

I am not sure if this error is on my part or not. I know nothing about telnet but i got further than the hubbie. :lol:

Wendy James

 

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

Link to comment
Share on other sites

hmmm my window thing said

 

file:whatever(same as above) and Modified

 

then said i had email but i dont lol so not sure if it worked or not

Wendy James

 

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

Link to comment
Share on other sites

Well, hubbie didn't know as much as I thought. I got to the telnet thing, tried setting it up but it keeps telling me

 

crontab: installing new crontab

"/tmp/crontab.xxxx2cEQpr":0: bad minute

errors in contab file, can't install

so you want to retry the same edit?

 

It is times like this I wish I had a host with a clicky click controp panel instead of a hands on geeks paradise you have to know what you are doing panel. lol

 

I am not sure if this error is on my part or not. I know nothing about telnet but i got further than the hubbie.  :lol:

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

Edited by Chemo
Link to comment
Share on other sites

I am getting the following error:

 

1146 - Table 'bruinenf8.cache' doesn't exist

 

DELETE FROM cache WHERE cache_expires <= '2005-06-05 09:29:01'

 

[TEP STOP]

Link to comment
Share on other sites

Bobby, one quick note.

 

In order to run the script I had to change this in sitemap.class.php:

function GoogleSitemap($host, $user, $db, $pass){
 $this->DB = new MySQL_Database($host, $user, $db, $pass);
 $this->filename = "sitemap";
 $this->savepath = DIR_FS_CATALOG . DIR_WS_HTTP_CATALOG;
 $this->base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} # end class constructor

 

to this:

 

function GoogleSitemap($host, $user, $db, $pass){
 $this->DB = new MySQL_Database($host, $user, $db, $pass);
 $this->filename = "sitemap";
 //$this->savepath = DIR_FS_CATALOG . DIR_WS_HTTP_CATALOG;
  $this->savepath = DIR_FS_CATALOG;
 $this->base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} # end class constructor

 

otherwise I had some catalog//catalog string in file path for ../googlesitemap/index.php

 

Cheers

Franco

Outside links in signatures are not allowed!

Link to comment
Share on other sites

I am getting the following error:

 

1146 - Table 'bruinenf8.cache' doesn't exist

 

DELETE FROM cache WHERE cache_expires <= '2005-06-05 09:29:01'

 

[TEP STOP]

In googlesitemap/index.php find this code:

if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){
include(DIR_WS_CLASSES . 'cache.class.php');
$cache = new cache($languages_id);
}

if ( file_exists('includes/seo_cache.php') ){
include('includes/seo_cache.php');
$cache->get_cache('GLOBAL');
}

and change it to this:

/*
if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){
include(DIR_WS_CLASSES . 'cache.class.php');
$cache = new cache($languages_id);
}

if ( file_exists('includes/seo_cache.php') ){
include('includes/seo_cache.php');
$cache->get_cache('GLOBAL');
}
*/

 

Bobby, one quick note.

 

In order to run the script I had to change this in sitemap.class.php:

function GoogleSitemap($host, $user, $db, $pass){
 $this->DB = new MySQL_Database($host, $user, $db, $pass);
 $this->filename = "sitemap";
 $this->savepath = DIR_FS_CATALOG . DIR_WS_HTTP_CATALOG;
 $this->base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} # end class constructor

 

to this:

 

function GoogleSitemap($host, $user, $db, $pass){
 $this->DB = new MySQL_Database($host, $user, $db, $pass);
 $this->filename = "sitemap";
 //$this->savepath = DIR_FS_CATALOG . DIR_WS_HTTP_CATALOG;
  $this->savepath = DIR_FS_CATALOG;
 $this->base_url = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} # end class constructor

 

otherwise I had some catalog//catalog string in file path for ../googlesitemap/index.php

 

Cheers

Franco

That makes sense...I'll change it directly.

 

Bobby

Link to comment
Share on other sites

if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){

include(DIR_WS_CLASSES . 'cache.class.php');

$cache = new cache($languages_id);

}

 

if ( file_exists('includes/seo_cache.php') ){

include('includes/seo_cache.php');

$cache->get_cache('GLOBAL');

}

 

and change it to this:

CODE

/*

if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){

include(DIR_WS_CLASSES . 'cache.class.php');

$cache = new cache($languages_id);

}

 

if ( file_exists('includes/seo_cache.php') ){

include('includes/seo_cache.php');

$cache->get_cache('GLOBAL');

}

*/

 

Same error

Link to comment
Share on other sites

1146 - Table 'cache' doesn't exist

 

DELETE FROM cache WHERE cache_expires <= '2005-06-05 09:29:01'

 

[TEP STOP]

 

This the error message.

Link to comment
Share on other sites

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

 

 

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

Now...

Do you ever sleep ?

How many of you behind "Chemo" ? :D

 

Thanks Bobby

Outside links in signatures are not allowed!

Link to comment
Share on other sites

...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
Link to comment
Share on other sites

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 ?

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