Quantity Box in Product Listing v1.0 by Aaron Hiatt aaron@scaredrabbit.com ======================================== This Contribution will add a quantity box above your "Add to Cart" button in the Product Listing (product_listing.php) page. This module works for Version MS2.2 and may have bugs but it works perfectly on my end. If you have any enhancements or changes please feel free to make them here at the Contribution site. ======================================== All you need to do is make the following simple changes: 1) in catalog/includes/modules/product_listing.php find: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>'; break; } replace with: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<form name="cart_quantity" method="post" action="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'). '"><input type="hidden" name="products_id" value="' . $listing['products_id'] . '"><input type="text" name="quantity" value="1" maxlength="5" size="5"><br>' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</form>'; break; } 2) in catalog/includes/application_top.php find: $HTTP_POST_VARS['id']))+1 replace with: $HTTP_POST_VARS['id']))+$quantity ----------------------------------- That's it. You're done!