Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Updating cart item to quantity 0 not working?


yinny

Recommended Posts

Posted

In the shopping cart view (shopping_cart.php), if I put a quantity of 0 and click update I want to have the product removed from the cart. Instead, the value is set back to what it was previously. Any other number entered for the quantity works fine, just not 0.

 

Some customers don't see the remove checkbox and get frustrated that they cant' figure out how to remove items from the cart since it won't take a 0.

 

Can someone point me in the right direction??? thanks.

Posted

found it..........

 

edit catalog/includes/classesshopping_cart.php and add this line..........

 

if ($quantity==0) $this->remove($products_id);

 

before this line..........

 

if (empty($quantity)) return true; // nothing needs to be updated if theres no quantity, so we return true..

Archived

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

×
×
  • Create New...