How to limit the total number of items in a Shopify order
Short answer: Cap the total number of units per order — useful when packaging, couriers or inventory can't handle oversized orders. In Checkpost, choose “Maximum items per order” from Templates, adjust the values, test it, then save and enable the rule.
The problem
Packaging, carrier weight limits and stock planning all break when one order takes 200 units. A store-wide cap routes bulk buyers to you directly.
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Maximum items per order.
- Set the maximum number of units.
- 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:
- Total item quantity is greater than 20
Shoppers see: “Orders are limited to 20 items. Please contact us for bulk orders.” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Max 20 items",
"match": "all",
"conditions": [
{
"kind": "number",
"field": "cart_quantity",
"op": "gt",
"value": 20
}
],
"message": "Orders are limited to 20 items. Please contact us for bulk orders.",
"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
- Set the limit just above your largest normal order.
- Exclude wholesale customers by adding a customer tag condition (has none of wholesale).
- Link to a contact or wholesale form in the message.
FAQ
Does it count gift cards?
Yes, all cart lines count. Add a separate rule if you want gift cards limited differently.
Is there also a limit on different products?
Yes. Use "Number of different items" to cap distinct lines instead of units.
Related rules
Maximum quantity per product
Cap the quantity of a product per order — perfect for limited drops, launches and high-demand items that resellers target.
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.
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.