- Shopify's quantity rules are per variant, and they live in Markets → Catalogs, which is a B2B feature.
- A maximum of 2 therefore still allows 2 in every size — 8 hoodies, not 2.
- HardLimits caps the product instead, and refuses the checkout rather than hiding a button.
What Shopify does natively
Shopify does have quantity rules: a minimum, a maximum and an increment. They are not on the product page — they are in Markets → Catalogs, and a catalog is assigned to B2B company profiles. That matters, because it means the rule only reaches buyers inside those companies. If your store does not run B2B, there is no native setting for this at all.
Where the rule does apply, Shopify enforces it at cart and checkout, for free. The limitation is not the enforcement — it is the unit it counts.
| You want | Native quantity rule | Needs an app |
|---|---|---|
| At most 2 of size M | Yes | No |
| At most 2 of the hoodie, any size | No — every variant is counted on its own | Yes |
| At most 12 items in the order | No | Yes |
| A custom message when the limit is hit | No | Yes |
If you do run B2B, where the setting lives
- In the admin, go to Markets → Catalogs and open the catalog you want to change.
- Under Products and pricing, click Manage → Manage products and pricing.
- Hover the product, or click through to its variants if you want one variant only.
- In the Quantity rules column click + Add, then set the minimum, maximum and increment.
- Click Done, then Save.
Read step 3 again: the rule is stored per variant. That is the whole problem, and it is Shopify's own documentation saying so — "customers can't combine 5 grey and 5 blue to meet an increment of 10".
Why "per variant" is not "per product"
Say you sell The Hoodie in S, M, L and XL, and you set a maximum of 2. A reseller buys 2 small, 2 medium, 2 large and 2 extra large. Every single line is legal. The order is 8 hoodies.
The same gap opens in three other places:
- Colours. Four colours at 2 each is 8 units of one product.
- Bundles and multipacks. Each variant is its own bucket, so a 3-pack and a single add up without ever tripping the rule.
- The cart as a whole. The rule cannot see the other lines at all, so nothing stops a buyer mixing products to clear a shelf.
If the number that matters is "how many of this product does one person get", the rule has to count the product, not the variant.
How to set a product-wide cap
HardLimits adds a rule type called maximum quantity per product. It reads the cart line quantities across every variant of that product, adds them up, and refuses the order when the total goes over.
- Install, and choose Maximum quantity per product.
- Pick the product. One rule covers all of its variants — that is the point.
- Enter the cap, write the message if you want one, and save. The message accepts
{q}for the number.
It runs as a Shopify Function inside checkout, so it holds when a buyer adds from a collection page, edits the cart, or opens a checkout link directly. Nothing is added to your theme, and nothing is left behind if you uninstall.
Test it in a minute
Do this before you announce the limit to customers:
- Add exactly the cap to the cart and open checkout. It should load normally.
- Add one more. The cart should refuse the update and show your message.
- In the cart, type a quantity above the cap. It should be refused again and snap back.
If step 2 passes and step 3 fails, the rule is being applied somewhere by the theme rather than by checkout — which is the problem this app exists to remove.
What it deliberately does not do
One cap, one product. No customer-tag targeting, no per-collection or per-vendor rules, no weight limits, no time windows, no repurchase limits. If you need those, a rule-builder app is the better buy — see the comparison for which ones cover what.
If your product has a single variant and you only need one cap, Shopify's own setting may be enough — and it is free. The app exists for product-wide caps, cart-wide caps, and stores without B2B.
Does this work on a product with one variant?
Yes, but you may not need it. A one-variant product has no sizes to spread across, so the native rule — where you have B2B catalogs — gives the same result.
Will it stop someone adding from the collection page?
Yes. The check runs when the cart changes, not when the button is clicked. Adding from a collection, a quick-add popup or a checkout permalink all hit the same rule.
Can I cap several products?
Yes on the paid plan: $9.99 a month, unlimited rules, each one its own product and number. One rule is free, on any Shopify plan.
Set your first limit in a minute.
One limit is free, no card. Unlimited limits are $9.99 a month on any Shopify plan.