Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automating add can't add more than one per item


tohvanah

Recommended Posts

Posted

I'm passing product IDs in an html variable to this php script:

$queryString = $_SERVER['QUERY_STRING'];
require('includes/application_top.php');
$cart->add_cart($queryString, 1, array(6 => 15));

When you add an item, that already exists in the Cart, I would like the quantity increased by 1.

 

Right now, executing a second or more times does nothing, to the item already added to the cart initially by this method.

Posted

fixed.

 

changed the pertinent line to:

 

 

$cart->add_cart($queryString, $cart->get_quantity(tep_get_uprid($queryString, array(6 => 15)))+1, array(6 => 15));

Archived

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

×
×
  • Create New...