Min/Max Quantities

The Min/Max Quantities extension for WooCommerce allows you to define minimum and maximum allowable product quantities per product, order or variation. It also lets you define a group quantity if your product must be bought in groups of x.

Installation ↑ Back to Top

To install the extension:

  1. Download the extension from your dashboard
  2. Upload the plugin folder to your /wp-content/plugins/ directory
  3. Activate ‘WooCommerce Min/Max Quantities’ from the Plugins menu within WordPress

Order-level Rules ↑ Back to Top

Go to WooCommerce > Settings. You will see the following settings:

All settings take numeric values and are optional.

  1. Minimum order quantity – Customer must purchase no less than this quantity of items to checkout.
  2. Maximum order quantity – Customer must purchase no more than this quantity of items to checkout.
  3. Minimum order value – Customer’s cart contents must cost more than this amount.
  4. Maximum order value – Customer’s cart contents must cost less than this amount.
Customers can make products exempt from these rules within their settings. See below.

Product-level Rules ↑ Back to Top

Edit a product within admin and look inside the product data panel. You will see the following:

Like the order settings, these are all optional.

  1. Minimum quantity – Customer must purchase more than this amount.
  2. Maximum quantity – Customer must purchase less or equal to this amount.
  3. Group of… – Users must purchase a multiple of this amount.
  4. Order rules: Do not count – Exclude orders from the counts of the above per-order rules.
  5. Order rules: Exclude – Exclude from the per-order rules entirely.

Variation-level Rules ↑ Back to Top

Variations inherit the main product settings (above), however you can define them per-variation too. To enable the settings to appear per-variation, check the Min/Max box:

Variation rules

Category-level Rules ↑ Back to Top

If you go to Products > Categories and edit a category, you’ll be able to set the “group of” option:

Screen Shot 2013-10-12 at 12.14.58

This lets you setup rules such as “Customers must buy products in X category in groups of X only”.

What the customer sees ↑ Back to Top

The extension modifies the frontend in the following ways:

  1. When adding items to the cart, if they have met the ‘maximum’ limits an error will be shown and the item not added to the cart.
  2. When using the quantity selectors on single product pages only, there will be a min, max, and step attribute added. So corrections are possible, min and max will not be used on the cart page.
  3. When viewing the cart, errors will be shown if any rules are not met.

An example cart error

Back to the top