hi all,
maybe i'm missing something obvious but is there a way to add a quantity option (either drop down or type in) on the product info page?
thanks
john
hi all,
maybe i'm missing something obvious but is there a way to add a quantity option (either drop down or type in) on the product info page?
thanks
john
Anyone figure this out yet - i came close but get it to work correctly...
The key here is that the quantity has to be passed in to the cart.
from product_inf.tpl.php replace you place in cary <td></td> with something that looks like this:
This will add the text entry box that will pass the quantity to the cart when they select the add to cart button.Code:<td class="main" align="right"><? echo tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2'); ?><input type="hidden" name="cart_quantity" value=1 maxlength="6" size="4">&nbsp; <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>
met00
Did the above and it added box but will not read quantity and only adds 1 item no matter what quantity typed in. Wouldn't something in application_top need to be changed?
check application_top and make sure that $quantity is not being set to 1 by default (this is done for the "buynow" buttons). The code should look like:
Code:case 'add_product' : if ($quantity < 1) $quantity = 1;
Ok in oscmax catalog/includes/ application_top you need to find this line around line 413
Change +1 to +$quantityCode:$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);
So finished code looks like this.
Blayne PierceCode:$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+$quantity, $attributes);
It is in the QT Pro Mod section Works great now
Bookmarks