Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ultimate SEO URLs problems on shopping cart


Guest

Recommended Posts

Hello

 

I am a newbie here and I am facing a problem in my store. I will appreciate you very much if you can help me to solve it.

 

I have just installed Ultimate SEO URLs in my store and it seems that I have got it working. But I found a problem on my Shopping Cart after this contribution’s installation. The Buy Now! Button is not working.

 

When I view in my categories and click Buy Now! Button to add products it shows up a notice “Your Shopping Cart is empty!” and when clicking Continue to next step, a member (if log in already) will log out automatically.

 

While using Add to Cart Button, it’s working well. But when add another one by click Buy Now Button, it’s the same result as above and also the shopping cart is cleaned even the products added by Add to Cart Button.

 

I am thinking if it’s the problem of cookies but since I am not familiar with codes. So would please anyone can help me to test and indicate how I can solve it.

 

Thanks all guys in advance.

 

My store: www.watchescn.net

Link to comment
Share on other sites

No answers?

 

I turned off SEO URLS and everything goes back well.

 

I have the same problem and I know why but how to prevent it ?

 

Because & will be converted to & (see your url with shopping_cart), and add to cart works with post variables so this problem does not occur. So in stead of '&osCid' you see '&osCid', the program thinks variable osCid (with the old session_id) does not exist and generates a new session_id. So the contents of the shopping cart and all other session variables are gone because they are stored in the old session. When you remove amp; manually in the url you will see your cart contents and you are loggeg in again !

 

I think SEO is doing this in .htaccess in some way because I debugged in the redirect function just before the redirect to shopping_cart etc. and the problem & was not there at that point.

 

And when you try for example the search function with many & in it, you don't get that problem .... so who has the solution ?????

Link to comment
Share on other sites

No answers?

 

I turned off SEO URLS and everything goes back well.

 

Because you don't need the parameter ...sort4a&... by buy now, you can solve this problem (not the real solution) in catalog/includes/application_top.php as follows :

 

find this part :

 

case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

} else {

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

}

}

// FS start

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

tep_redirect(tep_href_link($goto));

// FS stop

break;

 

and change the statements as I did between FS start and stop ...

 

I shal post this problem in the Dutch forum too ..... because I did not found an answer too

Link to comment
Share on other sites

Thanks for your kind reply. I waited for days and only got your answers. Thanks very much.

 

Anyhow, Buy Now button is now working after your way.

Link to comment
Share on other sites

Thanks for your kind reply. I waited for days and only got your answers. Thanks very much.

 

Anyhow, Buy Now button is now working after your way.

 

This problem occurs only (two of my customers have this problem now, many other customers don't have this problem) when a string with parameters is given in a program e.g. 'a=4&b=5' is converted to parameters 'a' and 'amp;b' by PHP !

 

Who has any idea why this happens (in PHP is defined convert & to &) ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...