Please give an advice if below code is correct to achieve the drop down quantities on product info page.
Original code from tpl_product_info_display.php
Code:
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
Replace with below code:
Code:
/* Drop Down Quantity Box - Begin */
for ($i=0; $i<7; $i++) {
$qty_array[] = array('id' => $i+1, 'text' => $i+1);
}
$the_button = PRODUCTS_ORDER_QTY_TEXT . zen_draw_pull_down_menu('cart_quantity', $qty_array, 1) .'<br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
/* Drop Down Quantity Box - End */
Please correct me if I'm wrong.
Bookmarks