Skip to content
Esc

Start typing to search the docs.

On this page
How-to Updated Aug 16, 2026

Maximum cart quantity

Set a Cart Max Quantity limit to control the maximum total number of items allowed in the cart. If the cart has more items than the number you set, checkout is blocked. It counts all item quantities in the cart, even when they are different products.

Applies to
  • All Shopify plans
  • The total number of items across the whole cart
Doesn't apply to
  • Limiting one specific product — use Maximum product quantity
  • Stopping the same customer from placing another order
Want to limit one specific product instead of the total cart? Use Maximum product quantity
Shopify Max Cart Quantity Tutorial – Step by Step — plays here, or watch on YouTube.

A maximum cart quantity is useful when you want to limit how many total items a customer can buy in one order. This can help spread limited stock across more customers.

Before you start

  • Decide the maximum total number of items allowed in one order.
  • If you only want to limit one specific product, use Maximum product quantity instead.

Steps

1. Install Nex Validator

If Nex Validator is not installed yet, install it from the Shopify App Store and approve the required permissions. If it is already installed, skip to the next step.

2. Go to Simple Order Limit → Create Rule.

3. Give the rule a clear title, then make sure Enable/Disable Limit is turned on. If the rule is not enabled, it will not apply to customer orders.

4. Open the Cart tab and select Cart Max Quantity. Enter the maximum total number of items customers can have in their cart.

Example: if the maximum is 5, a cart with 5 items is allowed, while a cart with 6 items is blocked.

5. Add a clear message that tells customers the maximum allowed quantity, then save the rule. For example: “You can order a maximum of 5 items per order.”

Verify it worked

  1. Add more items than the maximum and go to checkout. Checkout should be blocked and your message should appear.
  2. Add exactly the maximum number of items. Checkout should continue normally.

Test the exact maximum too. If the maximum is 5, a cart with exactly 5 items should be allowed. A cart with 6 items should be blocked.

Common setups

GoalExample maximum
Flash sale orders2–4 items
Ticketed eventsYour allowed quantity per order
Regulated productsThe quantity your rules allow
Protecting a restock1–2 items

Be careful not to set the maximum too low, because it may block valid larger orders. If retail and wholesale customers use the same store, Advanced rules can be used to apply the limit only in specific situations.

Frequently asked

Does this stop someone ordering twice?

No. It caps a single cart. Someone can place another order immediately afterwards — this limits order size, not lifetime purchases.

Will it stop bots?

It raises the effort but does not stop them. Treat it as fair-allocation, not security.

Can I cap one product instead?

Yes — maximum product quantity caps a specific product while leaving the rest of the cart free.

See also: Minimum cart quantity · Maximum product quantity · Maximum collection quantity