Products that are sold in packs or fixed amounts are hard to order with a free quantity field: shoppers enter amounts you do not offer, or do not know which amounts make sense. This module shows a dropdown with the allowed quantities instead. The steps can be the same for the whole store or be defined per product.
Features
- Dropdown with fixed quantities instead of the quantity input on the product page, on the cart page and in the mini cart.
- Steps defined globally as a comma-separated list, or per product in a product attribute of your choice.
- Steps below the product’s minimum quantity allowed in the shopping cart are left out automatically, and the smallest remaining step is preselected on the product page.
- Steps are always listed in ascending order.
Configuration
Go to Stores > Configuration > Infrangible Solutions > Catalog Product Quantity Steps > General:
- “Enable” switches the dropdown on.
- “Steps”: the list of steps, separated by comma, used for all products.
- “Attribute”: a product attribute that holds the steps per product (also comma-separated). When an attribute is selected, the steps are read only from this attribute; products without a value keep the normal quantity field.
All settings can be changed per website and store view.
Good to know
The module changes how shoppers enter the quantity; it does not add an extra check of the steps when items are added to the cart in other ways. It is built for the standard Magento frontend (Luma and Luma-based themes). “Catalog Product Qty” can additionally show the total price for the chosen quantity.
Installation
Install the module with Composer in your Magento root directory:
composer require infrangible/m2-catalog-product-qty-stepsThen enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.