MarcusD Posted August 2, 2003 Posted August 2, 2003 hi, how can i realize that? i think about a editable textfield, where the customers can place their wished volume, instead of update the cart entrys. anyone got an idea thanks marcus
Rumble Posted August 2, 2003 Posted August 2, 2003 Hi, Open your product_info.php page and before the 'in cart' button add this code Quantity <input type="text" name="quantity" value="1" maxlength="4" size="3"> so it looks something like <td align="right" class="main">Quantity <input type="text" name="quantity" value="1" maxlength="4" size="3"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> Back up b4 you try! Reddy to Rumble Thank you osCommerce and all who Contribute to her!
MarcusD Posted August 3, 2003 Author Posted August 3, 2003 ... it doesn't works... if i enter a value, there will be added just one to cart... i'm using ms1 cu'n thnx marcus
Rumble Posted August 3, 2003 Posted August 3, 2003 Hi, You also have to change the application_top.php file, find the following lines; case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $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['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; and change to case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; Reddy to Rumble Thank you osCommerce and all who Contribute to her!
MarcusD Posted August 3, 2003 Author Posted August 3, 2003 thank thats it i just didn't find it with out ur hint thank u
Recommended Posts
Archived
This topic is now archived and is closed to further replies.