Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cart adding way too many items


Guest

Recommended Posts

Posted

I want to display a quantity box in the product info pages. I have entered the following text:

 

Product Info.php:

<td class="main" align="right"><?php echo osc_draw_hidden_field('products_id', $Qproduct->valueInt('products_id')) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?><input type="text" name="quantity" value="1" maxlength="2" size="2"></td>

 

and application-top

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']);

 

The box shows up, but when I enter that i want "2" of a product, the cart adds 63 and so on. Whats wrong?

Archived

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

×
×
  • Create New...