Jump to content
Sign in to follow this  
FWR Media

[Contribution] Independent SEO URL Validation

Recommended Posts

Thanks,

 

Sorry for my worse English!

 

What happens is this:

 

If I change the path/address in the IE address bar (manual) , for example: tshirt-p-58.html into tshirt-p-58whatever.html (use letters no numbers)then the path won't or doesn't change back in tshirt-p-58.html. What I noticed, is that if you add numbers it will send you back to the index, as it should be.

 

I had expected a 404 or SEO or a little bit of magic from your patch to change the path again into tshirt-p-58.html .

 

Is this normal? Because seeing your explanation I thought I would get a 404?

 

 

 

Hopefully you understand me now :-)

 

 

I see .. no it wont.

 

You can't put stuff at the end. Why? ..

 

The seo url is 5 parts .. taking your url ..

 

Part 1 - http://www.mysite.com/shop/

Part 2 - original (this would be the product/category name)

Part 3 - -p- (This converts to product_info.php?products_id=)

Part 4 - 55 (This is the products id)

Part 5 - .html

 

By adding to the products_id like 55change you are effectively killing the products id. SEO URLs wouldn't know what to do with it.

 

but also remeber that SEO URLs should create the URL you shouldn't be adding to it, your category/product name should be enough. I know there was a mod to 2.1d that allowed manual changes in admin but I'm not a believer in it being a good idea.

 

Hope that helps.

Edited by uniqueandlovely

Share this post


Link to post
Share on other sites
Thanks,

 

Sorry for my worse English!

 

What happens is this:

 

If I change the path/address in the IE address bar (manual) , for example: tshirt-p-58.html into tshirt-p-58whatever.html (use letters no numbers)then the path won't or doesn't change back in tshirt-p-58.html. What I noticed, is that if you add numbers it will send you back to the index, as it should be.

 

I had expected a 404 or SEO or a little bit of magic from your patch to change the path again into tshirt-p-58.html .

 

Is this normal? Because seeing your explanation I thought I would get a 404?

Hopefully you understand me now :-)

 

I have replied to your PM you have Use Search-Engine Safe URLs (still in development) set to ON that is NOT ULTIMATE SEO URLs.

Share this post


Link to post
Share on other sites

Thanx for helping out, your advice to also flush all the cache(s) did it.

 

I have replied to your PM you have Use Search-Engine Safe URLs (still in development) set to ON that is NOT ULTIMATE SEO URLs.
Edited by uniqueandlovely

Share this post


Link to post
Share on other sites

Dear all,

 

First of all thank you for this contribution.

I wanted to submit the bug I actually have and share all infos I could to explain it.

 

I'm using seo 2.1d first version with Independent SEO Url Validation.

 

Urls are working fine but I have a little bug :

 

If I'm deciding to buy a product A ( "buy now" button ) I'm redirected to "my shopping cart" which will contain the product A. Then I'm clicking on "Continue shopping button" in order to come back to the categorie. Everything works as intended for the moment. But now If I want to buy product B ( "buy now" button ), I'm redirected to "my shopping cart" with two products A into it, when I wanted A and B.

Generated urls on the "buy now" buttons ( into the categorie after I clicked on "continue shopping" into my "shopping cart" ) have the product_id I just added to my "shopping cart" : that is, both products, A & B, have an ID that corresponds to product A.

 

If my setup is SEO 2.2e ( latest full package) only, I can't reach any page 2 or more pages, it's always redirecting me to page 1. If I'm adding Independent SEO Url Validation and commenting line starting by $this-> ValidateName ( which is the installing process when using SEO 2.2e) I have the product ID bug.

 

Help would be very much appreciated.

Thanks in advance

Share this post


Link to post
Share on other sites
Dear all,

 

First of all thank you for this contribution.

I wanted to submit the bug I actually have and share all infos I could to explain it.

 

I'm using seo 2.1d first version with Independent SEO Url Validation.

 

Urls are working fine but I have a little bug :

 

If I'm deciding to buy a product A ( "buy now" button ) I'm redirected to "my shopping cart" which will contain the product A. Then I'm clicking on "Continue shopping button" in order to come back to the categorie. Everything works as intended for the moment. But now If I want to buy product B ( "buy now" button ), I'm redirected to "my shopping cart" with two products A into it, when I wanted A and B.

Generated urls on the "buy now" buttons ( into the categorie after I clicked on "continue shopping" into my "shopping cart" ) have the product_id I just added to my "shopping cart" : that is, both products, A & B, have an ID that corresponds to product A.

 

If my setup is SEO 2.2e ( latest full package) only, I can't reach any page 2 or more pages, it's always redirecting me to page 1. If I'm adding Independent SEO Url Validation and commenting line starting by $this-> ValidateName ( which is the installing process when using SEO 2.2e) I have the product ID bug.

 

Help would be very much appreciated.

Thanks in advance

 

2.1d should be fine. What happens with 2.1d if you set FWR validation to OFF in admin?

Share this post


Link to post
Share on other sites
2.1d should be fine. What happens with 2.1d if you set FWR validation to OFF in admin?

 

 

I still have the product_ID bug. As i stated in my post, if i'm using SEO 2.2e without "Independent SEO URL Validation" I dont have this bug. I have the problem reported earlier in this forum thread which is we cant go to page 2 into catégories, it's always redirecting me to page 1.

 

2.1 d + FWR ON -> product_id bug

2.1d + FWR OFF -> product_id bug

2.2e -> categorie page 2 bug

2.2e + FWR OFF -> categorie page 2 bug

2.2e + FWR ON -> product_id bug

Edited by spcs

Share this post


Link to post
Share on other sites
I still have the product_ID bug. As i stated in my post, if i'm using SEO 2.2e without "Independent SEO URL Validation" I dont have this bug. I have the problem reported earlier in this forum thread which is we cant go to page 2 into catégories, it's always redirecting me to page 1.

 

2.1 d + FWR ON -> product_id bug

2.1d + FWR OFF -> product_id bug

2.2e -> categorie page 2 bug

2.2e + FWR OFF -> categorie page 2 bug

2.2e + FWR ON -> product_id bug

 

I think this is an & problem related to seo.class.php(earlier versions) do you have W3C options ON?

 

Try the following changes (They won't break anything .. promise :D ): -

 

catalog/includes/classes/seo.class.php

 

Find ..

 

			case ($this->attributes['USE_SEO_REDIRECT'] == 'true'):

 

Replace with ..

 

case ($this->attributes['USE_SEO_REDIRECT'] == 'true'):

$url = str_replace('&', '&', $url);

 

catalog/includes/functions/general.php

 

find function tep_redirect

 

In the function find ..

 

	header('Location: ' . $url);

 

Change to ..

$url = str_replace('&', '&', $url); //FWR mod

header('Location: ' . $url);

 

Note: I had to use quote instead of code for the above as CODE turned & into &

 

Retest.

Edited by Babygurgles

Share this post


Link to post
Share on other sites
I think this is an & problem related to seo.class.php(earlier versions) do you have W3C options ON?

 

Try the following changes (They won't break anything .. promise :D ): -

 

catalog/includes/classes/seo.class.php

 

Find ..

 

			case ($this->attributes['USE_SEO_REDIRECT'] == 'true'):

 

Replace with ..

catalog/includes/functions/general.php

 

find function tep_redirect

 

In the function find ..

 

	header('Location: ' . $url);

 

Change to ..

Note: I had to use quote instead of code for the above as CODE turned & into &

 

Retest.

 

 

I have w3c on, testing now.

 

Thank you for your help:)

Share this post


Link to post
Share on other sites
I have w3c on, testing now.

 

Thank you for your help:)

 

same issue using 2.1d ( first version ) or 2.2e ( with lines starting by "$this->ValidateName" commented out )

 

the continue boutton url when i'm into the shopping cart ( after i added the product A ) is

 

http://www.shop.com/categorie-c-11.html?so...roducts_id=4242 (4242 = A product id )

 

We could have a workaround modifying the continue boutton itself with "java script:history.back(1)" , but that's a work around, that doesn't solve this actual issue.

Share this post


Link to post
Share on other sites
same issue using 2.1d ( first version ) or 2.2e ( with lines starting by "$this->ValidateName" commented out )

 

the continue boutton url when i'm into the shopping cart ( after i added the product A ) is

 

http://www.shop.com/categorie-c-11.html?so...roducts_id=4242 (4242 = A product id )

 

We could have a workaround modifying the continue boutton itself with "java script:history.back(1)" , but that's a work around, that doesn't solve this actual issue.

 

Does it work with W3C OFF?

Share this post


Link to post
Share on other sites

actually .. what's this "Continue shopping button"?

 

That's not standard osC as far as I'm aware.

Share this post


Link to post
Share on other sites
actually .. what's this "Continue shopping button"?

 

That's not standard osC as far as I'm aware.

 

same issue with W3C off

 

go on the demo page

 

http://demo.oscommerce.com/

 

You want to buy a product, you click on "buy now" button for this product

 

you are redirected to the shopping cart

 

http://demo.oscommerce.com/shopping_cart.php

 

then you have this continue button in the middle of the page !

Edited by spcs

Share this post


Link to post
Share on other sites
same issue with W3C off

 

go on the demo page

 

http://demo.oscommerce.com/

 

You want to buy a product, you click on "buy now" button for this product

 

you are redirected to the shopping cart

 

http://demo.oscommerce.com/shopping_cart.php

 

then you have this continue button in the middle of the page !

 

LOL .. errrm :blush: .. I seem to have lost that button on all of my RC2/2a .. off to test brb

Share this post


Link to post
Share on other sites
LOL .. errrm :blush: .. I seem to have lost that button on all of my RC2/2a .. off to test brb

 

during all my checks regarding this bug, i noticed that some people have issues with this button : it disapear with IE or firefox.

You should have line 209 shopping_cart.php :

 

<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?>

Share this post


Link to post
Share on other sites
during all my checks regarding this bug, i noticed that some people have issues with this button : it disapear with IE or firefox.

You should have line 209 shopping_cart.php :

 

<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?>

 

What version of osC are you using please?

Share this post


Link to post
Share on other sites
What version of osC are you using please?

 

not the latest one but the one before 2.2rc2 i believe ( I still have to find time to move to 2.2 rc2a )

Share this post


Link to post
Share on other sites
not the latest one but the one before 2.2rc2 i believe ( I still have to find time to move to 2.2 rc2a )

 

 

Well, I've tried this with 2.1d and 2-2.2e (nothing to do with independent validation) it seems to me atm that there is a fundamental problem with ULTIMATE SEO URLs and RC2 (maybe RC1 as well).

 

But you say that 2-2.2e worked for you (without validation)?

Share this post


Link to post
Share on other sites
Well, I've tried this with 2.1d and 2-2.2e (nothing to do with independent validation) it seems to me atm that there is a fundamental problem with ULTIMATE SEO URLs and RC2 (maybe RC1 as well).

 

But you say that 2-2.2e worked for you (without validation)?

 

 

2-2.2e is working for me without validation and with Independent SEO Url, to fix the "continue shopping" bug that I mentioned earlier into the thread there is a work around :

 

http://addons.oscommerce.com/info/2986

 

I dont know why this guy did this addon, but that's a workaround to solve the products_id bug.

 

My current setup is 2-2.2e with "Independent SEO Url" and the continue shopping fix, everything is working fine.

 

I had one bug with 2.1d SEO and Independent SEO Url which was where sometimes on the category box on the left between navigation and categories i had "CCCCCCCCCCCCCCC", dunno why. :)

 

btw, thank a lot for your help on this ! and I hope to have better relation with google now :)

 

did you find back the continue shopping button on your setup ?

Edited by spcs

Share this post


Link to post
Share on other sites
2-2.2e is working for me without validation and with Independent SEO Url, to fix the "continue shopping" bug that I mentioned earlier into the thread there is a work around :

 

http://addons.oscommerce.com/info/2986

 

I dont know why this guy did this addon, but that's a workaround to solve the products_id bug.

 

I don't see how it is working for you. I just installed a vanilla RC2a with no SEO URLs at all and if you add to cart something in a product list (no attribs) then press "continue shopping" ALL products in that product list that you return to have a "buy now" link with the product_id of the product in the cart.

 

No it has BOTH 2 lots of products_id the real one and the shopping_cart one.

Edited by Babygurgles

Share this post


Link to post
Share on other sites
No it has BOTH 2 lots of products_id the real one and the shopping_cart one.

 

It's seems that the continue shopping button is adding a products_id= in the url when it shouldn't because you are from a category!

 

the continue button url should contain products_id only when you have clicked on buy now button from the product page itself.

 

There is an issue somewhere :)

Edited by spcs

Share this post


Link to post
Share on other sites
It's seems that the continue shopping button is adding a products_id= in the url when it shouldn't because you are from a category!

 

the continue button url should contain products_id only when you have clicked on buy now button from the product page itself.

 

There is an issue somewhere :)

 

I think I've located the problem

 

catalog/includes/modules/products_listing.php

 

Line 133(ish)

 

tep_get_all_get_params(array('action'))

 

Should be ..

 

tep_get_all_get_params(array('action', 'products_id'))

Share this post


Link to post
Share on other sites
I think I've located the problem

 

catalog/includes/modules/products_listing.php

 

Line 133(ish)

 

tep_get_all_get_params(array('action'))

 

Should be ..

 

tep_get_all_get_params(array('action', 'products_id'))

 

Your fix seems to be working !!

 

nice catch :)

 

thank you a lot again for your time and your help on this.

 

As it could affect few people, we should submit this bug with your fix :)

Edited by spcs

Share this post


Link to post
Share on other sites

As it could affect few people, we should submit this bug with your fix

 

Have done. But it's not a fix until Harald says it's a fix ;)

Share this post


Link to post
Share on other sites
Your fix seems to be working !!

 

nice catch :)

 

thank you a lot again for your time and your help on this.

 

As it could affect few people, we should submit this bug with your fix :)

 

posted on the french oscommerce forum replying to my post with a link to this forum you name + fix

 

http://www.oscommerce-fr.info/forum/index....st&p=269362

 

 

thank you again :)

Edited by spcs

Share this post


Link to post
Share on other sites
As it could affect few people, we should submit this bug with your fix

 

Have done. But it's not a fix until Harald says it's a fix ;)

 

 

ok let's say with your workaround :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×