
Originally Posted by
StoreOwner
bumpity
OK, the bumpity made me laugh so I decided to jump in and tell you what to do.
Edit your includes/modules/YOUR_TEMPLATE/product_listing.php and find (around) line 88:
Code:
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
$lc_align = '';
Add after:
Code:
// BOF dropdown 1/2
$optvalues = '';
for ($i = 1; $i < 16; $i++) {
$optvalues .= '<option value="' . ((zen_get_buy_now_qty($_GET['products_id'])) * $i) . '">'. ((zen_get_buy_now_qty($_GET['products_id'])) * $i) .'</option>';
}
// EOF dropdown 1/2
Next, find:
Code:
if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
$lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
}
and replace with:
Code:
if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
// BOF dropdown 2/2
//$lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
$lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<select name="cart_quantity">'. $optvalues .'</select>' . (zen_get_products_quantity_order_min((int)$_GET['products_id']) || zen_get_products_quantity_order_units((int)$_GET['products_id']) ? zen_get_products_quantity_min_units_display((int)$_GET['products_id']) : '') . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
// EOF dropdown 2/2
}
And last - go to admin->Configuration->Product Listing and set:
Display Product Add to Cart Button: 2
Display Multiple Products Qty Box Status and Set Button Location: 0
This should do the trick, although I haven't really tested it so make sure it works for ALL cases.
Regards,
Leonard