The Quantity Limits feature allows you to control how many products customers can purchase from your WooCommerce store. Set minimum and maximum quantity rules at the product level, order level, or category level to manage inventory, enforce wholesale minimums, or control purchasing behavior.
Key Capabilities
- Product-Level Limits: Set min/max quantities for individual products
- Variation-Level Limits: Apply different rules to specific product variations
- Order-Level Rules: Enforce minimum/maximum items per order or order totals
- Category-Level Rules (Pro): Apply quantity rules to entire product categories
- Step Quantities: Require products to be purchased in specific multiples (e.g., packs of 6)
- Validation Controls: Block checkout if rules aren’t met
Getting Started #
Enabling Quantity Limits
- Go to Swift Commerce → Quantity Limits in your WordPress admin
- The feature is enabled by default
- Configure your global settings, then set rules on individual products
- Click Save to apply changes
Setting Quantity Limits on Products #
The most common use of this feature is setting quantity rules directly on products. Here’s how to do it:
Step 1: Edit a Product
- Go to Products → All Products in your WordPress admin
- Click on the product you want to configure
- In the Product Data section, click the Quantity Limits tab
Step 2: Configure Product Rules
| Field | Description |
|---|---|
| Minimum Quantity | The minimum number of items required to add this product to cart. Leave empty for no minimum. |
| Maximum Quantity | The maximum number of items allowed per order. Leave empty for no maximum. |
| Quantity Step | Products must be purchased in multiples of this number. For example, set to 6 for six-packs. |
| Exclude from Order Rules | Check this to exclude the product from global order quantity/total rules. |
Step 3: Save the Product
Click Update to save your quantity limit settings.
Examples
| Scenario | Minimum | Maximum | Step |
|---|---|---|---|
| Wholesale minimum order | 12 | — | — |
| Limited edition (max 2 per customer) | — | 2 | — |
| Six-packs only | 6 | — | 6 |
| Wholesale with case quantities | 24 | — | 12 |
Variable Product Support #
Quantity limits work seamlessly with variable products. You can set rules at both the parent product level and for individual variations.
Parent Product Rules
Rules set on the parent variable product apply to all variations unless overridden.
Variation-Level Rules
To set different limits for specific variations:
- Go to the Variations tab in the product data
- Expand the variation you want to configure
- Look for the Quantity Limits fields below the pricing section
- Enter values for Min Qty, Max Qty, and Step (Multiples)
| Field | Description |
|---|---|
| Min Qty | Minimum quantity for this specific variation |
| Max Qty | Maximum quantity for this specific variation |
| Step (Multiples) | Multiples required for this variation |
Note: If a variation field is left empty, it will inherit the parent product’s rules.
General Tab #
Configure global display and validation options.
Display Options
| Setting | Description | Default |
|---|---|---|
| Show Product Notices | Display quantity limit information on product pages | On |
| Notice Style | Visual style for notices: Info (Blue), Warning (Yellow), Success (Green), or Neutral (Gray) | Info |
When enabled, customers will see helpful notices like “Minimum order quantity: 6” on product pages.
Validation Options
| Setting | Description | Default |
|---|---|---|
| Block Checkout on Violation | Prevent customers from completing checkout if quantity rules are not met | On |
| Combine Variation Quantities | Count all variations of a product together for maximum quantity limits | Off |
Combine Variation Quantities Example:
- Product has a max limit of 5
- Customer adds 3x Blue and 3x Red variations
- With setting OFF: Each variation is checked independently (both pass)
- With setting ON: Total is 6, which exceeds the max of 5 (blocked)
Products Tab #
This tab provides quick access to manage product-level quantity limits.
Quick Links
| Link | Description |
|---|---|
| View All Products | Opens the Products list where you can edit any product |
| Add New Product | Create a new product with quantity limits |
Available Product Options
| Option | Description |
|---|---|
| Minimum Quantity | Per-product minimum requirement |
| Maximum Quantity | Per-product maximum limit |
| Quantity Step | Per-product multiple requirement |
| Exclude from Order Rules | Per-product order rules exclusion |
Order Rules Tab #
Set global rules that apply to entire orders, regardless of individual product settings.
Order Quantity Limits
| Setting | Description |
|---|---|
| Minimum Items per Order | The minimum total number of items required to checkout |
| Maximum Items per Order | The maximum total number of items allowed per order |
Examples:
- Minimum of 5 items = Customers must have at least 5 products in their cart
- Maximum of 50 items = Limit bulk orders to 50 products
Order Total Limits
| Setting | Description |
|---|---|
| Minimum Order Total | The minimum cart value required to checkout (in your store currency) |
| Maximum Order Total | The maximum cart value allowed per order |
Examples:
- Minimum $50 = Enforce a minimum spend before checkout
- Maximum $10,000 = Limit high-value orders for fraud protection
Excluded Products
Some products shouldn’t count toward order rules. Use the search field to find and exclude products:
- Type a product name in the search field
- Click a product from the dropdown to add it to the exclusion list
- Excluded products appear as badges below the search
- Click the X on any badge to remove the exclusion
Use Cases:
- Exclude gift cards from minimum order totals
- Exclude shipping insurance from item counts
- Exclude free samples from quantity rules
Category Rules Tab (Pro) #
Apply quantity limits to entire product categories. Products inherit these rules unless they have their own settings.
Setting Category Rules
The Category Rules tab displays a table of all your product categories:
| Column | Description |
|---|---|
| Category | The category name |
| Products | Number of products in this category |
| Min Qty | Minimum quantity for products in this category |
| Max Qty | Maximum quantity for products in this category |
| Step | Multiples required for products in this category |
To set a rule:
- Find the category in the table
- Enter values in the Min Qty, Max Qty, or Step fields
- Rules save automatically when you leave the field
Rule Priority
When multiple rules might apply, this is the order of precedence:
- Variation-Level Rules (highest priority)
- Product-Level Rules
- Category-Level Rules (Pro)
- No Rule (lowest priority)
Example:
- Category “Beverages” has max_qty = 24
- Product “Premium Coffee” in that category has max_qty = 6
- Result: Premium Coffee uses max of 6 (product rule overrides category rule)
Messages Tab (Pro) #
Customize the error messages shown to customers when quantity rules are violated.
Product Messages
| Message Type | Placeholder | Description |
|---|---|---|
| Minimum Quantity | {min}, {product} | Shown when quantity is below minimum |
| Maximum Quantity | {max}, {product} | Shown when quantity exceeds maximum |
| Step Quantity | {step}, {product} | Shown when quantity isn’t a valid multiple |
Order Messages
| Message Type | Placeholder | Description |
|---|---|---|
| Min Order Quantity | {min} | Shown when cart has too few items |
| Max Order Quantity | {max} | Shown when cart has too many items |
| Min Order Total | {min} | Shown when cart value is too low |
| Max Order Total | {max} | Shown when cart value is too high |
Category Messages (Pro)
| Message Type | Placeholder | Description |
|---|---|---|
| Category Minimum | {min}, {category} | Shown when category quantity is below minimum |
| Category Maximum | {max}, {category} | Shown when category quantity exceeds maximum |
Example Custom Messages
| Default Message | Custom Message |
|---|---|
| “Minimum quantity for {product} is {min}.” | “Please order at least {min} units of {product} to continue.” |
| “A minimum of {min} items is required to checkout.” | “Your cart needs at least {min} items. Add more to proceed!” |
| “Minimum order total is {min}.” | “We require a ${min} minimum order. Add more items to checkout.” |
How Quantity Limits Work #
On the Product Page
- The quantity input field is automatically adjusted:
- Default value is set to the minimum quantity (if set)
- Step buttons increment by the step value
- Maximum is capped at the max quantity
- If notices are enabled, customers see helpful information about limits
Adding to Cart
- When a customer clicks “Add to Cart,” the quantity is validated
- If below minimum: Error message, item not added
- If above maximum: Error message, item not added
- If not matching step: Error message, item not added
- If valid: Item added to cart successfully
In the Cart
- Quantity fields respect min/max/step rules
- If customer manually enters an invalid quantity, it’s corrected
- Order totals are checked against order rules
At Checkout
- Final validation of all quantity rules
- If “Block Checkout on Violation” is enabled:
- Invalid quantities prevent checkout
- Clear error messages guide the customer
- If disabled: Customers can proceed (use cautiously)
Common Use Cases #
Wholesale Minimum Orders
Goal: Require wholesale customers to order at least 50 items.
Setup:
- Go to Order Rules Tab
- Set Minimum Items per Order: 50
- For retail products you want to exclude, check “Exclude from Order Rules” on each
Limited Edition Products
Goal: Limit purchases to 2 per customer.
Setup:
- Edit the limited edition product
- Set Maximum Quantity: 2
- Leave other fields empty
Bundle/Pack Quantities
Goal: Sell beverages only in six-packs.
Setup:
- Edit the beverage product
- Set Minimum Quantity: 6
- Set Quantity Step: 6
- Customer must order 6, 12, 18, etc.
Minimum Order Value
Goal: Require at least $50 to checkout.
Setup:
- Go to Order Rules Tab
- Set Minimum Order Total: 50
- Optionally exclude digital products/gift cards
Category-Wide Limits (Pro)
Goal: Limit alcohol purchases to 12 bottles per order.
Setup:
- Go to Category Rules Tab
- Find the “Wine” or “Alcohol” category
- Set Max Qty: 12
- All products in that category now have this limit
Troubleshooting #
Quantity Rules Not Applying
- Ensure Quantity Limits is enabled in General settings
- Check that the product has rules configured
- Clear any caching plugins
- Verify the product isn’t excluded from order rules
Customers Can Exceed Limits
- Check if “Block Checkout on Violation” is enabled
- Verify the quantity input on the frontend has proper min/max attributes
- Test in an incognito window to rule out caching
Step Quantities Not Working
- Ensure the Step value is greater than 1
- The minimum quantity should typically match or be a multiple of the step
- Example: If step is 6, set minimum to 6 (not 1)
Order Rules Being Ignored
- Check if the products in cart are marked “Exclude from Order Rules”
- Verify Order Rules are set in the Order Rules tab
- Confirm the settings were saved
Best Practices #
- Start with Product Rules: Set limits on specific products before using global order rules
- Use Clear Notice Messages: Enable product notices so customers understand limits before checkout
- Match Minimum to Step: If step is 6, make minimum 6 to avoid confusion
- Test Your Rules: Place test orders to verify rules work as expected
- Consider Customer Experience: Provide helpful error messages that explain what to do
- Use Exclusions Wisely: Exclude gift cards, shipping, and samples from order rules
Feature Comparison #
| Feature | Free | Pro |
|---|---|---|
| Product-level min/max quantity | ✓ | ✓ |
| Product-level quantity step | ✓ | ✓ |
| Variation-level quantity rules | ✓ | ✓ |
| Order minimum/maximum items | ✓ | ✓ |
| Order minimum/maximum total | ✓ | ✓ |
| Exclude products from order rules | ✓ | ✓ |
| Display quantity notices | ✓ | ✓ |
| Block checkout on violation | ✓ | ✓ |
| Combine variation quantities | ✓ | ✓ |
| Notice style options | ✓ | ✓ |
| Category-level quantity rules | — | ✓ |
| Custom error messages | — | ✓ |
| Category validation at checkout | — | ✓ |
| Category fields in category editor | — | ✓ |