Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo


Recommended Posts

What's your shops ul? What's in the .htaccess file?

i am test it on localhost.

 

and my .htaccess file consist..

 

Options +FollowSymLinks
RewriteEngine On
RewriteBase /shum12/

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}

 

 

Now i am getting error 500

Thanks

Link to comment
Share on other sites

Hi!

 

I've a problem. When I enable the SEO URL and clicking one of the categories, I always redirected to index.php. What can happend?

 

Thank you for help.

First, read the section in the instructions about testing your installation. If that doesn't fix it, you could read the many, many, many posts on this problem or post your .htacess file and url here.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hello

 

I've recently installed this contrib.. it's great, but those who have non-english characters like accents on it's categories could bring us some dificulty using it..

 

My store is in Spanish, and I use accents like áéíóú on my product name and category name, and although most of the times this is not a problem because SEO URL v2.1 cuts them off (making Libro Pequeño as libro-pequeo), categories who got accents within it's name present a huge problem.

 

Take this for example:

Item title: Autoadhesivo Padre Pío (protegeme)

Standard OsC URL: www.viareggio.cl/product_info.php?cPath=28&products_id=163

SEO URL: viareggio.szita.net/san-pío-de-pieltrecina-autoadhesivo-padre-protegeme-p-163.html

(For testing purposes, I've created a sandbox test environment where SEO is implemented)

 

Second URL ends up with a loop error..

 

Category name is San Pío de Pietrelcina. SEO trim's the name as viareggio.szita.net/pieltrecina-c-28.html, BUT inside that category items URL become as /san-pío-de-pieltrecina-autoadhesivo-padre-protegeme-p-163.html

 

Any suggestions for a workaround?

 

Thanks.

Edited by cszita
Link to comment
Share on other sites

hello

i am using "Ultimate_SEO_URLSv21d_UPDATED-23-NOV-2008". it works fine for me.but their is a minor problem

 

"add to cart" button on Product_listing page doesn't working,when i click on it it direct to the shopping cart with message "Your Shopping Cart is empty!"

How to overcome this problem??

 

another question ..is there any way to remove the oscid link from URL without enable th"force cookies use"??

Thanks..

Link to comment
Share on other sites

hi

 

i updated to the lastest seo url package d_5. My sage pay server is throwing this error message.Has anybody come across this before and how to fix it..

 

 

"Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL."

 

kind regards

 

nafri

Link to comment
Share on other sites

"Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL."

That's not part of this contribution. It looks like part of the code added for that payment module.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

That's not part of this contribution. It looks like part of the code added for that payment module.

 

thanks for replying..

 

protx direct works perfectly fine.. but i cant seem to get the official sage pay server module to work.

 

It was working prefectly fine till i updated the seo url contrib to the latest..dont understand why it stopped working ...?

 

nafri

Link to comment
Share on other sites

hello
i am using "Ultimate_SEO_URLSv21d_UPDATED-23-NOV-2008". it works fine for me.but their is a minor problem

"add to cart" button on Product_listing page doesn't working,when i click on it it direct to the shopping cart with message "Your Shopping Cart is empty!"
How to overcome this problem??

another question ..is there any way to remove the oscid link from URL without enable th"force cookies use"??
Thanks..[

Above is My own question..and i found its solution Myself.i dnt know my solution is completely right or not..but its works fine for me..

ANS:

Just leave the html_output.php file intact..do not make changes in it for "Seo URLs"

 

if anybody face any problem with my answer, pls do reply me

Thanks..

Link to comment
Share on other sites

Hi guys

 

I had a Ultimate Seo Urls 2.7 and i upgraded it to 2.2d_5 version. I have i strange problem that happends in both versions.

 

In products_new i have 20 products in 2 pages. First page is displaying fine, but when you click "2" page or "next" button its moving you to :

http://www.mysite.com/index.php?page=2 .

I trying to find a solutions for that but coudnt find much information.

If anynody had same problem i would be greatfull in you can post it here.

 

Thanks

Link to comment
Share on other sites

Just leave the html_output.php file intact..do not make changes in it for "Seo URLs"

That will basically disable the contribution so it is not a good solution.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi guys

 

I had a Ultimate Seo Urls 2.7 and i upgraded it to 2.2d_5 version. I have i strange problem that happends in both versions.

 

In products_new i have 20 products in 2 pages. First page is displaying fine, but when you click "2" page or "next" button its moving you to :

http://www.mysite.com/index.php?page=2 .

That was a known problem with the earlier versions but should be fixed in the latest version. See this thread for what to check. Also be sure you have performed all of the update instructions. I suggest you run the uninstall option in admin to be sure cache is cleared.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi guys,

 

I have the same problem as mentioned by mam911 in his post.

 

In the documentation it says:

 

Add cPath to product URLs? *NEW*

 

* Default Setting: false

* This setting enables/disables the option of adding the cPath parameter to the end of product pages.

* Example: some-product-p-1.html?cPath=xx

 

some-product-p-1.html?cPath=xx is exactly what I need in order to show the customers in which category they are. When I enter "some-product-p-1.html?cPath=xx" manually it shows up correct, with corresponding category-tab highlighted.

 

Can anyone help on this?

 

Best regards

 

Matthias

Link to comment
Share on other sites

Hi guys,

 

I have the same problem as mentioned by mam911 in his post.

 

In the documentation it says:

 

 

 

some-product-p-1.html?cPath=xx is exactly what I need in order to show the customers in which category they are. When I enter "some-product-p-1.html?cPath=xx" manually it shows up correct, with corresponding category-tab highlighted.

 

Can anyone help on this?

 

Best regards

 

Matthias

 

That is a standard function of series 2 seo urls, if your current version does not have it you can use 2.1d ORIGINAL updated or Ultimate Seo Urls 5 ( different support thread )

Link to comment
Share on other sites

some-product-p-1.html?cPath=xx is exactly what I need in order to show the customers in which category they are. When I enter "some-product-p-1.html?cPath=xx" manually it shows up correct, with corresponding category-tab highlighted.

 

Can anyone help on this?

The answer depends on what version you are using. Please, everyone, always state the version being used.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the great contribution. Almost everything works but one little (annoying) thing.

 

If I wanna go to my catalog in admin I'm getting the following error:

 

Warning: include(includes/functions/cache.php) [function.include]: failed to open stream: No such file or directory in /******/******/******/******/******/******/******/Shoptest/OS/catalog/includes/application_top.php on line 120

Warning: include() [function.include]: Failed opening 'includes/functions/cache.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /******/******/******/******/******/******/******/Shoptest/OS/catalog/includes/application_top.php on line 120

Warning: require(includes/classes/navigation_history.php) [function.require]: failed to open stream: No such file or directory in /******/******/******/******/******/******/******/Shoptest/OS/catalog/includes/application_top.php on line 126

Fatal error: require() [function.require]: Failed opening required 'includes/classes/navigation_history.php' (include_path='.:/usr/share/php:/usr/share/pear') in /******/******/******/******/******/******/******/Shoptest/OS/catalog/includes/application_top.php on line 126

 

I don't know what is causing this. I've checked if the files 'cache.php', 'navigation_history.php' are in the same folder as the above code says, and they do..

 

I don't really know what is causing this hehe. Thanks for future help. :) Appreciated!

Link to comment
Share on other sites

If I wanna go to my catalog in admin I'm getting the following error:

This contribution doesn't make any changes admin that would cause that.

Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The answer depends on what version you are using. Please, everyone, always state the version being used.

You are right - I'm sorry.

 

I had Ultimate SEO v2.1 installed on osCommerce 2.2-MS2. Module worked just great and it rewrited the products-url to "product-p-123.html". The path was added to the products-url ("product-p-123.html?cPath=21"), so the categorie-tabs are highlighted accordingly. Sadly only the categories-name was never shown in the URL. Instead it rewrited the categories to "-c-21.html". Which generally is not that big of a problem, but I searched from time to time in order to get it right. But before everything else is not working - I thought - leave it as is :rolleyes:.

 

Now yesterday I found the latest version of Ultimate SEO v. 22d5 and tried it out. Happily the products-url showed up as in previously version and more importantly to me, the categories-name was shown as "category-c-21.html". In the admin-panel I noticed some new features, such as "W3C-valid strings" and "Filter Short Words", but all of the sudden I couldn't find the "?cPath=XX" any longer. At this time, I wasn't aware of the possibility, that this feature might have discontinued in order to maybe have W3C-valid strings, or for other SEO-aims.

 

Facing this situation :rolleyes: I played around with the new "add category parent"-options:

 

- Add category parent to product URLs (i.e. - parent-some-product-p-1.html)

Everything (except special character conversion) works as it supposed to be: The category shows in the URL, but still the category tabs are not shown accordingly.

 

 

- Add category parent to begining of URLs (i.e. - parent-category-c-1.html)

This changed nothing to my products-url and naturally the category-tabs were not highlighted. If I click the category tabs, the category-URL shows correctly as "category-c-21.html", but if I click a produc, the URL shows as "product-p-123.html".

 

So finally I would like to stick to this great version of the contribution, but need to add the "?cPath=XX" to the products-URL. I need to add this parameter "?cPath=XX" to the URL.

Link to comment
Share on other sites

So finally I would like to stick to this great version of the contribution, but need to add the "?cPath=XX" to the products-URL. I need to add this parameter "?cPath=XX" to the URL.

I removed that option since it made no since from an SEO perspective, which is the main reason for this contribution. Having the name of the category is much better than having a number. Is there some functional reason why you need the number shown? I'll add it back in if I missed some reason for having it. If not, you should use the include category option.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack, this would be the right thread then for me to ask about the links categorys for the sso using the parent category as well as the final category.

 

I am not on the latest version of this and when I have updated in the past I have had problems because things were missing from the seo class file, inparticular FAQ desk and Newsdesk urls.

 

having compared the code theres a few differences, in particular no code for the FAQ or Newsdesk contributions and a few others.

 

I am going to have a go at using your code and merging it with the code I have already for the faq and newsdesk. I may get some problems with this, and whilst I can always put things back to how they were, I would like to have things working with the improvements(although I dont actually understand what they are as yet), will you be able to advise me as its not all your code?

 

Thought I better ask first as you give your time freely on so many contributions, and I certainly appreciate you cant keep going off the beaten track.

 

 

Thanks

Getting better with mods but no programmer am I.

Link to comment
Share on other sites

Hi Jack, I was unable to post the seoclass file I have now here so I sent it in a pm, my worry is coverting across.

some of the main differences below, but there were others, but some just look liked it was the order they were placed in rather than anything else, and i started to get confused on what I needed and didnt need etc, so thought I would ask and post the whole file here as i couldnt post it here I took the liberty to pm you, please acctpt my apologies but I wasnt sure how to explain it either.

 

 

the version I have as code differences aswell as those for newsdesk and faqdesk, the other differences were:-

 

validatealidate clause:-

 

	$url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], '.html', $separator);
                           $this->ValidateName($url, "p", $p2[1], $connection, $separator);

  function Validatename($url, $type, $realID, $connection, $separator)
 { 
   $origUrl = strip_tags($this->requested_page());  //get the actual page requested
   $parts = explode("-", $origUrl); 

   if ($parts[count($parts) - 2] == $type)  //make sure it is the correct type for this link
   {
     if (($pos = strpos($parts[count($parts) - 1], ".html")) !== FALSE)
      $id = substr($parts[count($parts) - 1], 0, $pos);       //strip .html 

     $catalog = DIR_WS_HTTP_CATALOG;
     if ($catalog[0] == '/')
       $catalog = substr(DIR_WS_HTTP_CATALOG, 1);             //strip leading slash if present

     if (strpos($origUrl, $catalog) !== FALSE)
       $origUrl = substr($origUrl, strlen($catalog));         //remove the catalog from the url string

     if (!empty($origUrl) && $id === $realID && $origUrl !== $url) //ID's match but not the text
     {
        $url = $this->base_url . $url;
        $link = $this->add_sid($url, true, $connection, $separator); //build the correct link with SID
  			//header("HTTP/1.0 301 Moved Permanently");             //let the SE's know to not use this link
 			 //header("Location: $link");                            //redirect to the real page 
     } 
   }
 } 

also attribute fix:-

                               case 'products_id':

                   //BOF: Attribute Fix
                   if ($this->is_attribute_string(urldecode($p2[1]))){
                       $prodID = urldecode($p2[1]);
                       //Split the attributes from the product ID:
                       $prodAttr = substr( $prodID, strpos($prodID, "{"));
                       $prodID = substr( $prodID, 0, strpos($prodID, "{"));
                       $p2[1] = $prodID;
                       $container["options"] = $prodAttr;
                   }
                   //EOF: Attribute Fix

Getting better with mods but no programmer am I.

Link to comment
Share on other sites

I am going to have a go at using your code and merging it with the code I have already for the faq and newsdesk. I may get some problems with this, and whilst I can always put things back to how they were, I would like to have things working with the improvements(although I dont actually understand what they are as yet), will you be able to advise me as its not all your code?

No, I don't have those contributions installed in a test shop so it isn't something I can easy check for testing. I will probably add support for them in a later version but I don't know when that might be.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, I don't have those contributions installed in a test shop so it isn't something I can easy check for testing. I will probably add support for them in a later version but I don't know when that might be.

 

No problems Jack.

 

I will have a look and see from time to time to see if I can get it working with the new stuff, I am guessing that the validate code and the fix attribute code isnt needed isnt needed given they are not in your new seo.class but I dont understand what these actually do.

 

Also the seo class contains many different contributions, would it be easier to have a modular approach?

 

In that if you want certain seo urls to work, you will need code A in this section and code B in this section and so?

 

And with a common core of code that has to be in regardles to make everything else work?

 

For example, my news desk contribution works okay so i am guessing my seoclass as it stands is okay but I dont know what is common or not.

 

think I may have answered my own question to some degree, I will go away and see if i can strip the files seo.class files down to a common core and work backwards putting things back in.

 

htaccess file requires this code

RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}

 RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}

 RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}

 RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}

 

seo.class requires this code

	if ( defined('FILENAME_NEWSDESK_INFO') ) $seo_pages[] = FILENAME_NEWSDESK_INFO;
      if ( defined('FILENAME_NEWSDESK_INDEX') ) $seo_pages[] = FILENAME_NEWSDESK_INDEX;
	if ( defined('FILENAME_NEWSDESK_REVIEWS_INFO') ) $seo_pages[] = FILENAME_NEWSDESK_REVIEWS_INFO;
	if ( defined('FILENAME_NEWSDESK_REVIEWS_ARTICLE') ) $seo_pages[] = FILENAME_NEWSDESK_REVIEWS_ARTICLE;		                
	            if ( defined('FILENAME_LINKS') ) $seo_pages[] = FILENAME_LINKS;

 

and

'newsdesk_id' => '-n-',
							                                                   'newsPath' => '-nc-',
							                                                  'newsdesk_reviews_id' => '-nri-',
							                                                  'newsdesk_article_id' => '-nra-',


and
case 'newsdesk_id':
                                       switch(true){
                                               case ($page == FILENAME_NEWSDESK_INFO):
                                                       $url = $this->make_url($page, $this->get_newsdesk_name($p2[1]), $p2[0], $p2[1], '.html', $separator);
                                                       break;
											case ($page == FILENAME_NEWSDESK_REVIEWS_INFO):
                                                       $url = $this->make_url($page, $this->get_newsdesk_name($p2[1]), 'newsdesk_reviews_id', $p2[1], '.html', $separator);
                                                       break;
											case ($page == FILENAME_NEWSDESK_REVIEWS_ARTICLE):
                                                       $url = $this->make_url($page, $this->get_newsdesk_name($p2[1]), 'newsdesk_article_id', $p2[1], '.html', $separator);
                                                       break;
                                               default: 
                                                       $container[$p2[0]] = $p2[1];
                                                       break;
                                       } # end switch
                                       break;
			case 'newsPath':
                                       switch(true){
                                               case ($page == FILENAME_NEWSDESK_INDEX):
                                                       $url = $this->make_url($page, $this->get_newsdesk_categories_name($p2[1]), $p2[0], $p2[1], '.html', $separator);
                                                       break;
                                               default: 
                                                       $container[$p2[0]] = $p2[1];
                                                       break;
                                       } # end switch

Getting better with mods but no programmer am I.

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