Cart limits

Limit the number of items per order

Shopify caps quantities per variant. It has no setting for "no more than 12 items in this cart" — so a buyer can add 12 different products and walk through checkout.

The short version

What Shopify does natively

Shopify's quantity rules are per variant: a minimum, a maximum and an increment, set in Markets → Catalogs and applied through B2B company profiles. That covers "two of this size".

It does not cover the cart. There is no admin field, on any plan, for the total number of units in an order. Checkout Blocks — Shopify's own free app — sets an order value limit, not a quantity limit, and its checkout features are Plus-only anyway.

So the cart total is the one number Shopify leaves entirely to the theme.

You wantNativeNeeds an app
At most 2 of one sizeYes, via a B2B catalogNo
At most 5 samples, whatever the mixNoYes
At most 12 items in the orderNoYes
A message that says whyNoYes

Who actually needs this

Why a theme script is not enough

The usual DIY answer is a snippet in your theme that disables the checkout button when the cart is too big. It looks like it works, and then it doesn't.

The buyer controls the request. Changing the quantity in the cart, or opening a checkout permalink directly, skips whatever your theme drew on the page. There is no screen for the rule to run on. The check has to happen where the order is created — inside checkout — and a theme cannot do that.

How a cart-wide cap works

HardLimits adds a rule called maximum items per order. Shopify's checkout validation adds up the quantities on every line, ignores which products they are, and refuses the order above your number.

  1. Install, and choose Maximum items per order.
  2. Enter the number — 12, or 5, or 1 for a strict one-item drop.
  3. Write the message buyers see. {q} inserts the number.

It runs at cart update and again when payment is attempted, so editing the cart is not a way around it. Nothing is added to your theme, and uninstalling leaves nothing behind.

The mistake that makes it look broken

Setting a per-variant maximum and calling it a cart limit. Ten variants at 2 each still allows 20 items, and every one of those lines is valid under the variant rule. If the number that matters is the total, the rule has to count the cart — not the product, and not the variant.

Two rules can coexist: a per-product cap of 2 and a cart cap of 12. The first stops a single item being hoarded, the second stops a hundred small ones. The paid plan exists mostly for this.

Test it in a minute

  1. Put exactly the cap in the cart and open checkout. It should load.
  2. Add one more item — any product. The cart should refuse the update.
  3. Open /checkout directly in a new tab. It should still be refused.

Step 3 is the one that separates a checkout rule from a theme hack.

What it deliberately does not do

No per-customer limits, no per-collection rules, no weight limits, no time windows, no repurchase caps. If you need those, a rule builder is the better buy — the comparison names which ones cover what. One app, four limits, done properly is the whole pitch.

Does it count units or line items?

Units. Three of one product is three, not one line. A cart of 4 items across 2 lines counts as 4.

Can I set a different cap for wholesale customers?

Not with this app — there is no customer-tag targeting. If that is the requirement, Melon or Blockify cover it and the comparison page says so.

What happens to a cart that is already over the limit?

Checkout is refused until the buyer removes something. The message tells them the number, so most people fix it themselves in a few seconds.

Cap the cart in one minute.

One limit is free, no card. Unlimited limits are $9.99 a month on any Shopify plan.