Guest Posted March 6, 2008 Posted March 6, 2008 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?
burt Posted March 6, 2008 Posted March 6, 2008 You are adding the product id onto the number of products ordered: tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$HTTP_POST_VARS['products_id'] ! http://www.oscommerce.com/forums/index.php?s=&...t&p=1210986
Recommended Posts
Archived
This topic is now archived and is closed to further replies.