How to limit how many of a product a customer can buy on Shopify
Short answer: Cap the quantity of a product per order — perfect for limited drops, launches and high-demand items that resellers target. In Checkpost, choose “Maximum quantity per product” from Templates, adjust the values, test it, then save and enable the rule.
The problem
Limited drops, launches and high-demand products attract resellers and bots who clear your stock in minutes. Without a cap, loyal customers miss out and your launch ends up on resale sites.
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Maximum quantity per product.
- Choose the products or tag and set the maximum.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Checkout is blocked when all of these conditions is true:
- Quantity per product across variants (products tagged limited) is greater than 2
Shoppers see: “Limited items are restricted to 2 per product per order.” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Limit 2 per order",
"match": "all",
"conditions": [
{
"kind": "line_number",
"field": "product_quantity",
"op": "gt",
"value": 2,
"filter": {
"productTags": [
"limited"
]
}
}
],
"message": "Limited items are restricted to 2 per product per order.",
"target": "cart",
"runOn": "always"
}Where this rule works
These are cart and checkout validations, including supported accelerated checkouts. They are current-cart policies; they do not track previous purchases of a SKU. Shopify excludes POS, recurring subscription orders and native pre-order/Try Before You Buy flows from this API. See Shopify's validation compatibility.
Tips
- Tag drop products (e.g. limited) so one rule covers every release.
- The rule sums matching variants and split lines of each product. For one shared cap across all limited products, use Combined quantity of products instead.
- This caps the current order. Requiring login does not turn it into a lifetime or per-account purchase cap.
Can you do this without an app?
Shopify has no general per-product purchase limit for retail customers (B2B catalogs support quantity rules for company buyers only).
FAQ
Can shoppers bypass the limit with Shop Pay or Apple Pay?
No. Checkout validation runs server-side for express checkouts too, not just in the cart drawer.
Does it limit across multiple orders?
No. It sees the current cart, not a customer's previous purchases of this product. Lifetime SKU limits need order-history tracking and an identity policy; a login condition alone is insufficient.
Related rules
Minimum order quantity (MOQ) per product
Require a minimum quantity for selected products, so low-margin or bulk items can't be ordered in single units.
Sell in case packs / multiples
Only allow quantities in multiples of a pack size — e.g. 6, 12 or 24 — for case-packed goods like wine, beverages or wholesale stock.
Maximum items per order
Cap the total number of units per order — useful when packaging, couriers or inventory can't handle oversized orders.
Limit gift card purchases
Cap how many gift cards can be bought in one order — gift cards are a common target for fraudsters using stolen cards.