Minimum Order Quantity Per Product

for osCommerce Online Merchant v2.2

Minimum Order Quantity Per Product, with admin control, cart and checkout warning and redirection This contribution allows you to set a minimum order quantity per product, which displays in the product listing, next to an input box allowing the customer to enter the quantity they require (see note below). It also displays a warning in the Shopping Cart if any of the current quantities are now less than the set minimum, and shows which items need to be corrected. If the customer continues to attempt to checkout, they are prevented from reaching the checkout confirmation stage, and redirected to the shopping cart with the above warning and indication of items to be corrected. Within the Admin section, you can set the minimum quantity for each item in the normal Catalog entry for that product. Within Configuration > Product Listing, you can set where the Quantity Number appears (next to the input box is the sensible option - my chosen Product Listing fields will be different to yours, so check this says something suitable for you). Also, in Configuration>Stock, you have the setting "Mark product under minimum order quantity", which allows you to choose the symbol used in the Shopping Cart to indicate which items are below the required quantity. The location of this in "Stock" made logical sense to me at the time... The code is language-independent in the usual way, for Catalog and Admin. Only English language files are included. This contribution builds upon "Quantity Box in Product Listing" by Acheron (specifically the product_listing.php file provided in that mod). The "Quantity Box in Product Listing" contribution creates an input box to allow the customer to enter the quantity before clicking Add to Cart, rather than the clumsy alternative of updating their cart afterwards. If you don't have that installed, please install it first before attempting to install this mod. For convenience, the latest and only version to date, is included as a zip, in this package. Note the screenshot inside that DOES NOT display this contribution's features. If you have a custom version of a quantity-being-ordered concept, you can probably customise this to fit around it (look at tep_draw_input_field in product_listing.php). Note: By a coincidence, after putting it off for ages, I started work on this around the same time as Mark Rickert wrote his version, called "Minimum Product Quantity with Admin". There's no causal connection between the two; I don't know how similar the code or features are, and I haven't tried installing his. I'm sure I would have used his had I known about it, but naturally I'm sticking with my own version now. You'll have to choose which one to install, or try them both (not at the same time!!) Possible future features: Create a column in the shopping cart to display minimum order quantity there (d'oh! A warning but no way to tell what the min. is...) Create a display field for minimum qty, and input box for req'd quantity, in Product_Info screen. Create an Admin switch to turn entire contribution on/off. Create an Admin switch to allow checkout despite warning. Screenshots.

Files