Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy_now button clears cart?


DogFoodIT

Recommended Posts

Posted

Hello all,

 

i have just been advised buy a customer that when shopping on the site there is a little issue with the BUY NOW button that is listed in the product listings,

 

the error is that when you click the buy now button to add the selected item to the shopping cart it redirects you to the cart page and says "there are no items in your cart"

 

now if i go to the products_info.php page and add to cart that way it works! go figure?

 

no the mods on this site are minimal so i can not see why this would be happening.

i have not been working on this site since the start so i'm not 100% sure to what has been changed.

i have installed oscThumbs(on), seo urls(off)

 

currently i have turned off the buy now button in admin to stop confusion for customers but i really need to have this working.

 

this site is a busy site and is live so fixing this issue is quite urgent so all suggestions and help is greatly appreciated.

 

http://www.petshops.com.au/catalog/index.php?cPath=21_81

 

osCommerce 2.2-MS2

PHP Version 5.2.10

 

kind regards,

 

Ben

Posted

Hello all,

 

i have just been advised buy a customer that when shopping on the site there is a little issue with the BUY NOW button that is listed in the product listings,

 

the error is that when you click the buy now button to add the selected item to the shopping cart it redirects you to the cart page and says "there are no items in your cart"

 

now if i go to the products_info.php page and add to cart that way it works! go figure?

 

no the mods on this site are minimal so i can not see why this would be happening.

i have not been working on this site since the start so i'm not 100% sure to what has been changed.

i have installed oscThumbs(on), seo urls(off)

 

currently i have turned off the buy now button in admin to stop confusion for customers but i really need to have this working.

 

this site is a busy site and is live so fixing this issue is quite urgent so all suggestions and help is greatly appreciated.

 

http://www.petshops.com.au/catalog/index.php?cPath=21_81

 

osCommerce 2.2-MS2

PHP Version 5.2.10

 

kind regards,

 

Ben

 

just to let you know if you ever have this issue i found a good little fix here:

 

http://www.ryu-mei.com/blogs/index.php?blog=2&title=oscommerce_buy_now_button&more=1&c=1&tb=1&pb=1

 


FOLDER: domaine.com/yourshop/includes/

FILE: Application_top.php, line 358, u have this line:

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

Replace it with:

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

 

it has worked for me without any issues....

thanks.

Posted

just to let you know if you ever have this issue i found a good little fix here:

 

http://www.ryu-mei.com/blogs/index.php?blog=2&title=oscommerce_buy_now_button&more=1&c=1&tb=1&pb=1

 


FOLDER: domaine.com/yourshop/includes/

FILE: Application_top.php, line 358, u have this line:

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

Replace it with:

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

 

it has worked for me without any issues....

thanks.

 

 

well looks like it does not work in IE for some reason? i have tested it in FF and works fine? does anyone have any ideas why?

Posted

OK to stop any confusion the whole this was just a setting in seo URL's

 

YOU HAVE TO HAVE THE W3C URL TURNED OFF IN THE SEO URL'S ADMIN SETTINGS.

 

NO NEED TO CHANGE ANY CODE...

Archived

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

×
×
  • Create New...