Multiples of X for Magento 2
This is a very simple module that forces customers to order products in multiples of X (e.g. 5, 10, 15).
How It Works
The module adds a new product attribute in the 'General' tab, called 'Multiples Of X' - default set to 1. For example, set it to 5. This forces products to be ordered in quantities of 5, 10, 15. A warning message is shown if it isn't.
Note: the lowest possible Multiples Of X will act as a Minimal Qty. For example, if your Multiples Of X = 5, but your Minimum Qty = 2, then of course "2" can never be ordered, because "2" is not a multiple of "5". And thus acts like a minimal quantity, forcing you to order at least "5".
- adds attribute to General tab on products
- enable module per store via config setting
- product-specific Multiples Of X setting
After downloading your order:
- Copy the files from the downloadable .zip to the Magento root
- Check that the extension files exist under /app/code/Appmerce/MultiplesOfX
Run the following commands on the Magento root:
- php bin/magento setup:upgrade
- php bin/magento cache:flush
- php bin/magento cache:clean
- php bin/magento indexer:reindex
- php bin/magento setup:di:compile
Enable the extension by going to
Go to Stores > Configuration > Appmerce > Multiples of X
- Set the extension to Enabled
- Decide if you want to allow orders below the minimum batch_qty
Go to Catalog > Products and edit or add a product
- At the bottom of the main section, there is a new field called "Multiples of X"
- Enter a value to restrict orders to batches of quantity X
- Leave empty if you don't want to use it
A new product attribute was created upon installation. If you wish to edit it, go to Stores > Attributes > Product, and find the 'batch_qty' attribute.