Documentation / Sell a product in packs of six

HS Min/Max Quantities · Development version 0.12.0

Sell a product in packs of six

Let shoppers buy 6, 12, 18 or 24 mugs. Reject quantities outside that range or between those pack sizes.

Before you start

Activate WooCommerce and HS Min/Max Quantities. Use a published simple product with enough stock for the example and a store-management account. Work on a test site first. Other active rules and stock limits may restrict the quantities further.

1. Create and name the rule

  1. Open HookSpark → Min/Max and create a rule.
  2. Enter Sell in packs of 6 as the rule name. This is your internal label: use a name that will make sense in the rule list later.
  3. Choose the individual-product scope. Search for your product by entering at least three characters, then select the result. Typing a name without selecting a result is not enough.
Rule editor with Demo Mug selected and an unsaved preview showing multiples of six
Figure 1. Demo Mug with a draft pack-size rule and its live preview. The switch is off: this example has not been saved or activated. Select the image to view it at full size.

2. Enter the purchase limits

FieldValueWhat it does
Minimum quantity6Reject fewer than six units.
Maximum quantity24Reject more than twenty-four units.
Pack multiple6Allow whole packs: 6, 12, 18, 24.
Starting quantity6Suggest six units for a new purchase. This is not a separate purchase limit.
Minimum 6, maximum 24, pack multiple 6 and starting quantity 6 in the actual plugin
Figure 2. Minimum 6, maximum 24, pack size 6 and starting quantity 6. Select the image to view it at full size.

Leave an optional limit empty when you do not need it. Do not use zero as a substitute for an empty field. A minimum or maximum must leave at least one valid multiple in the range: minimum 7, maximum 11 and multiple 6 leave no valid quantity.

3. Review, enable and save

Read the unsaved preview. It should describe individual quantities between 6 and 24 in multiples of 6. The preview explains your draft; it does not save it or prove that every other rule is compatible.

Turn on Enable this rule (“Abilita questa regola”) and select Save rule (“Salva regola”). If a field error appears, correct the highlighted field and save again. Reopen the saved rule and check its values. An inactive rule can be saved and edited, but does not restrict purchases.

4. Check the customer journey

TryExpected for this rule alone
Add 6 unitsAllowed.
Change the cart to 5 or 7Rejected: below minimum or not a multiple. Read the quantity feedback.
Change the cart to 12Allowed; the rule error should clear.
Change to 30Rejected: above maximum.
Proceed with 12 and a test payment methodThe rule permits checkout, subject to the other store requirements.

Repeat as a guest and as the intended customer when you add audience restrictions. A product page that looks correct is not sufficient: always verify cart updates and checkout.

Next: target products and customers or configure variations and overlapping rules.


Back to all guides · Troubleshooting

Start from the product editor

Save your product, then open Product data → Min/Max. Review the related rules or choose Create rule for this product. This opens the rule editor with the product preselected; nothing is saved or activated until you complete the rule and save it.

For a specific variation, open Variations, expand it and use its own panel. The shortcut selects that variation. Summaries use saved catalog data; customer conditions, selected attributes and cart contents still need checking. These panels support the classic WooCommerce product editor.

Screenshot preview

Open full-size image in a new tab