The default Classic Commerce setup displays the add-to-cart button on the category page. The quantity selector is only available on the individual product page, or in the cart. This code adds a quantity selector onto the category page as well.
This code allows you to limit purchases to a multiple of products. For example, if you are selling wine you might only allow sales by the case or half case (so a multiple of 6 bottles).
This code sets a minimum order quantity before checkout is allowed to proceed. The checkout button is hidden and an error message is displayed. This example sets the minimum order to 12. The error message can be edited to suit.