Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

Recommended Posts

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

I noticed in my admin/who's online/ that spiders crawl sites like this:

 

www.kitchenniche.ca /canadian-bear-claws-salad-pasta-hands-p-502.html?language=en

 

Is it possible to get rid of the "language=en" ? Is there an easy way to remove all other languages than english?

 

I also noticed that spiders crawl sites like this:

 

www.kitchenniche.ca/product_info...canadian-bear-claws-salad-pasta-hands-p-502.html

 

the "product_info" shouldn't be there.

 

If i go to both of the above sites, they are there but the actual URL would : www.kitchenniche.ca/canadian-bear-claws-salad-pasta-hands-p-502.html

 

Is there a way to change that or am i missing something?

 

thanks in advance,

 

sandra

 

ps: thanks for such great contributions like this!

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

I think this has been asked before but I am struggling to find the anwser

 

Love the contribution by the way

my site is here

 

I have the same product in a few categories

 

if you go to serach by printer - epson - STYLUS 400 and put the universal refill kit in the cart by clicking buy now - the page gets redirected back to the canon category. Is there any way that I can get it redirected back to the page that it was clicked from?

 

 

As you can see if a customer is purchasing 3 different colours for their printer then it would be preferable for them to just click on each colour rather than have to go and find the printer again.

 

I have been told in anouther forum that the SEO URLs is hiding the category information for your universal product, which applies to multiple categories.

 

Can anyone help out?

Link to comment
Share on other sites

In application_top.php find this code:

      $goto = basename($PHP_SELF);
     if ($HTTP_GET_VARS['action'] == 'buy_now') {
       $parameters = array('action', 'pid', 'products_id', 'pName');
     } else {
       $parameters = array('action', 'pid');
     }
   }

and change it to this:

      $goto = basename($_SERVER['REQUEST_URI']);
     if ($HTTP_GET_VARS['action'] == 'buy_now') {
       $parameters = array('action', 'pid', 'products_id', 'pName');
     } else {
       $parameters = array('action', 'pid');
     }
   }

The issue is most likely due to the fact that PHP_SELF is translating to index.php. In addition, you might need to change this code:

         if ( (defined('SEO_URLS') && SEO_URLS == 'true') && (defined('SEO_URLS_TYPE') && SEO_URLS_TYPE == 'Rewrite') ){
         $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);
       $cPath_array = tep_parse_category_path($cPath);
       $cPath = implode('_', $cPath_array);	
       tep_redirect(tep_href_link($goto, 'cPath=' . $cPath . '&' . tep_get_all_get_params($parameters)));
        } else {
                            	 tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
        }

to this:

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

...since the cPath is already being parsed in the code higher up.

 

Bobby

Link to comment
Share on other sites

Chemo,

 

I tried your suggestions but that code didn't work. It got redirected to a page that wasn't there.

 

I tried just replacing the first code that you suggested and instead of adding just one product it added some random number of 118.

Link to comment
Share on other sites

I cannot get this contrib working for two of my sites that have in upwards of 27000 products. The categories are 4 levels deep as well... Would this cause problems Chemo? Click hereto visit site.

 

I have this contribution working flawlessly on 4 of my sites without a hitch but these two sites I have it just won't work :( Any help would be appreciated.

 

MLHmptn

Link to comment
Share on other sites

Chemo,

 

I tried your suggestions but that code didn't work.  It got redirected to a page that wasn't there.

 

I tried just replacing the first code that you suggested and instead of adding just one product it added some random number of 118.

Get with me on instant messenger and we'll debug the code...then you come back and post the solution.

I cannot get this contrib working for two of my sites that have in upwards of 27000 products.  The categories are 4 levels deep as well... Would this cause problems Chemo?  Click hereto visit site.

 

I have this contribution working flawlessly on 4 of my sites without a hitch but these two sites I have it just won't work :(  Any help would be appreciated.

 

MLHmptn

A catalog of that size will most likely have issues due to the way the constants are defined / evaluated. I am working on the next version that solves this issue and will run on stores that have the largest of catalogs...although it will introduce additional queries. However, I am of the opinion that the additional resourcces needed (queries) are justified by the increased relevancy of the URLs.

 

The version I'm working on now will lay the foundation for the v3.X series but will be released as v2.1

 

So far I have reached the following milestones:

 

1) Abstraction of the code - it's now a class that can be used store wide (catalog side, admin side feeds, etc.)

2) Simplied install - all code is central to the class so requires less editing to function

3) Choice of cache or not - will now run on any size catalog (unlimited prods / cats)

4) Built in support for prods, cats, manufacturers, articles, topics, and information pages

5) Integration with automatic redirect script

6) Integration with cache class (and choice to use or not)

 

Currently, I am evaluating the performance and scalability of the code (load testing). Thus far I have verified that the performance is excellent in terms of speed and scalability. Initial data indicates about a 3.5ms per URL generation with cache and 7ms using the database query method. No matter how you slice it the performance is fast....

 

Hang tight and the new code will be released in a week or so. Or, you can get a preview copy and install it yourself to evaluate. Your choice...

 

Bobby

Link to comment
Share on other sites

Chemo,

 

Great! I can't wait to see the final code. Where would one grab the preview version at? I am interested in testing it if you need some feedback? I thought it was due to the quantity of products. Like I say I have it working flawlessly on 4 of my sites at the moment without a hitch. Your contributions are the BOMB! Your advanced cache class has made major speed improvements for all of my stores and your Ultimate SEO URL's has improved my rankings considerably on the search engines! Thank you for all your hardwork! I have made a donation in the amount of $50.00 today for you as well. Thank you again!

With Regards,

 

MLHmptn

 

Get with me on instant messenger and we'll debug the code...then you come back and post the solution.

 

A catalog of that size will most likely have issues due to the way the constants are defined / evaluated.  I am working on the next version that solves this issue and will run on stores that have the largest of catalogs...although it will introduce additional queries.  However, I am of the opinion that the additional resourcces needed (queries) are justified by the increased relevancy of the URLs.

 

The version I'm working on now will lay the foundation for the v3.X series but will be released as v2.1

 

So far I have reached the following milestones:

 

1) Abstraction of the code - it's now a class that can be used store wide (catalog side, admin side feeds, etc.)

2) Simplied install - all code is central to the class so requires less editing to function

3) Choice of cache or not - will now run on any size catalog (unlimited prods / cats)

4) Built in support for prods, cats, manufacturers, articles, topics, and information pages

5) Integration with automatic redirect script

6) Integration with cache class (and choice to use or not)

 

Currently, I am evaluating the performance and scalability of the code (load testing).  Thus far I have verified that the performance is excellent in terms of speed and scalability.  Initial data indicates about a 3.5ms per URL generation with cache and 7ms using the database query method.  No matter how you slice it the performance is fast....

 

Hang tight and the new code will be released in a week or so.  Or, you can get a preview copy and install it yourself to evaluate.  Your choice...

 

Bobby

Link to comment
Share on other sites

Hello first of all thanks a lot for this very nice and pretty c'trib,

It seems to work ok, install was easy and well documented.

But nevertheless I am experiencing some minor problems.

I have a main link in the categorie box called -homepage-

(index.php?cPath=0)

When i click on this link it shows me the main categories.

These all have a cpaths starting with index.php?cPath=0_....

But all of these cpaths starting with 0 give me a page not found

Is there anything i have done wrong?

Kind regards

 

Hakan Haknuz

Link to comment
Share on other sites

I am trying to do a upgrade from 1.4 to 2.X and I am on step two where you call the install_seo.php and when I try to call the URL I get this error:

 

Fatal error: Call to a member function on a non-object in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 47

 

I am sure this has probably been brought up before but I searched back quite a bit and couldn't find anything. So some insight on this issue would be great.

 

Thanks

Link to comment
Share on other sites

I retro graded back to v1.4 since I couldn't get 2.X to work. Now with all the older files removed and the 1.4 uploaded I am getting this error. Now I don't know if I was getting this before since I went right to the upgrade, but anyways here is what I am getting.

 

Warning: fopen(/ public_html / store /cacheseo_english.cache): failed to open stream: No such file or directory in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 199

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 200

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 201

 

Warning: main(/ public_html / store /cacheseo_english.cache): failed to open stream: No such file or directory in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 204

 

Warning: main(/ public_html / store /cacheseo_english.cache): failed to open stream: No such file or directory in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 204

 

Warning: main(): Failed opening '/ public_html / store /cacheseo_english.cache' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 204

 

 

 

 

So any help to get this and 2.X going would be great.

Link to comment
Share on other sites

I'm nearly done with the development on the next release but need a store with articles and/or information pages installed to finish up.

 

I decided to hold off on the v3.X release and continue with v2.1 for now. Basically, it has all the planned v3.X features EXCEPT the ability to choose additional keywords.

 

Performance wise it has built in support for admin side feeds, better performance (especially on large stores), improved install procedure, integration with redirect script, and a few other goodies.

 

The last thing I need to do is finish the code for articles and information pages...I'd like to have native support rather than an addon.

 

Any takers?

 

Bobby

Link to comment
Share on other sites

I'm nearly done with the development on the next release but need a store with articles and/or information pages installed to finish up.

 

Any takers?

 

Do you mean people to help who have a site with articles/info pages? I have info pages on mine, but not the Articles contribution. Let me know.

 

Susan

Link to comment
Share on other sites

Long time no speak, Susan! How are things going with the site and SEO URLs?

 

I prefer to have a site with both installed so I can get them done in one coding session. However, if I can't find one of those illusive animals your site will do nicely.

 

Bobby

Link to comment
Share on other sites

Nevermind, I don't have time for games. I think I asked nicely after my problem was overlooked twice in the same day. I am not going to kiss your ass for help to feed you ego if that's is what your asking. If you can't see the ? and the thanks in my last post then it's obvious your not willing to offer help anyways.

 

 

Thanks

Link to comment
Share on other sites

Could anyone please help me shed some light on the problem I'm having with this. I beleive it might have to do with the path of the cache file and how the path is in the admin.

 

I retro graded back to v1.4 since I couldn't get 2.X to work. Now with all the older files removed and the 1.4 uploaded I am getting this error. Now I don't know if I was getting this before since I went right to the upgrade, but anyways here is what I am getting.

 

Warning: fopen(/ public_html / store /cacheseo_english.cache): failed to open stream: No such file or directory in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 199

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 200

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 201

 

Warning: main(/ public_html / store /cacheseo_english.cache): failed to open stream: No such file or directory in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 204

 

Warning: main(/ public_html / store /cacheseo_english.cache): failed to open stream: No such file or directory in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 204

 

Warning: main(): Failed opening '/ public_html / store /cacheseo_english.cache' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/XXXXXXX/public_html/store/includes/seo_cache.php on line 204

 

 

 

 

So any help to get this and 2.X going would be great.

Link to comment
Share on other sites

Ok a update to the above post. I deleted the path in admin for the cache and left it blank and saved it that way. They error message I was getting from above as gone away, but I don't think it still installed correctly. Is thier a way to test this?

 

Thanks

Link to comment
Share on other sites

Ok trying to upgrade this again and going by the instructions when trying to call the install_seo.php I'm getting this error:

 

Fatal error: Call to a member function on a non-object in /home/texascam/public_html/store/includes/seo_cache.php on line 47

 

Has anyone come across this issue before that could lead me some help?

 

 

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