Guest Posted May 27, 2008 Posted May 27, 2008 I'm using contrib "Add quantity box to product info page" which works great on the product info page, however, I can't seem to get this to work on the products_new.php page. I am able to get the box to appear, but when I enter in a number like 7 and add it to the cart it's only putting 1 in the cart. I'm very confused since the code is identical and it's still looking at application_top, so I'm not sure what it's not working. Any ideas? Nate Quote
Guest Posted May 28, 2008 Posted May 28, 2008 Well I think I figured it out, I just don't know how to fix it... On the new products page it's pulling from Buy It Now, which is this in application_top // performed by the 'buy now' button in product listings and review page case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; Now if I change the +1 to +$HTTP_POST_VARS['quantity'] when something is added to the cart it just says 'your cart is empty,' I notice that for buy it not it says HTTP_GET_VARS and not HTTP_POST_VARS, but changing it to +$HTTP_GET_VARS['quantity'] didn't work either. I'll keep guessing and checking w/the code, but if anyone knows the right line it would be appreciated. Nate Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.