Quantity rules
Limit quantities in Shopify checkout with Cart Validator: a maximum or minimum per product or variant, or sales only in multiples of a pack size.
Three rule types count how many of a product are in the cart. Each rule covers one product or one variant, so add a rule for each product you want to limit.
| Rule | Field | Checkout stops when |
|---|---|---|
| Maximum quantity | Highest quantity per order | The cart holds more of the product than this. |
| Minimum quantity | Lowest quantity per order | The cart holds the product, but fewer than this. |
| Quantity in multiples | Sold in multiples of | The quantity isn't a multiple of this, such as 7 with a pack size of 6. |
The field takes a whole number of at least 1. Like every rule, a quantity rule can apply to some delivery countries or customer tags only, see Rules and Customer tags.
Product or variant
Under Limit, choose under What counts whether the rule counts a whole product or one variant, then pick it in Shopify's product picker.
| What counts | What you pick | The row says |
|---|---|---|
| Every variant of a product | Select Choose a product and pick the product. All its variants count together. | Every variant counts together |
| One variant | Select Choose a variant and select exactly one variant, such as T-shirt – Blue. | Only this variant counts |
With One variant, picking several variants, or a product without variants, shows Select exactly one variant. For a product without variants, choose Every variant of a product. Changing What counts clears the product you chose, so pick it again.
How the quantity is counted
The rule adds up every line of the product in the cart. With a product rule, 2 blue and 3 red T-shirts count as 5. A minimum quantity applies only once the product is in the cart, so a cart without it passes. Lines without a product, such as custom items, don't count.
Examples
| Goal | Rule |
|---|---|
| Limit a scarce product | Maximum quantity of 2 for the product. |
| Sell only full cases | Quantity in multiples of 6 for the wine. |
| A wholesale minimum | Minimum quantity of 10 for the product, with Only customers with one of these tags: wholesale. |
| Limit one size only | Maximum quantity of 1 for one variant, such as T-shirt – XXL. |
What buyers see
In English, the built-in messages read:
| Rule | Built-in message |
|---|---|
| Maximum quantity | {product} is limited to {limit} per order. Please lower the quantity to continue. |
| Minimum quantity | {product} has a minimum order of {limit}. Please raise the quantity to continue. |
| Quantity in multiples | {product} is sold in multiples of {limit}. Please change the quantity to continue. |
{product} is the product's title from your admin, with the variant for a variant rule, in your store's primary language. See Buyer messages.
Renamed or deleted products
When you rename a product, the app picks up the new title the next time you open it. When you delete a product, its rule shows Product not found in the Rules list and on the Overview, and it no longer stops any cart. Open the rule and choose another product, or delete the rule.