Skip to content

Building order rules

This page works through realistic order rules and shows how Minimum enforces and combines them.

A product is only sold by the half-dozen.

  • Scope: Product
  • Step: 6

The shopper can now add 6, 12, 18 and so on. Adding 5 or 7 triggers the step notice — for example “Product is sold in multiples of 6.” — and checkout is blocked until the quantity is a valid multiple.

A whole category is wholesale-only, with a minimum of 10 units per product.

  • Scope: Category (the wholesale category)
  • Minimum: 10

Every product in that category requires at least 10 units. The notice names the product and the required minimum, so the buyer knows exactly what to fix.

One high-demand product should be limited to 2 per order during a launch.

  • Scope: Product
  • Maximum: 2

Attempting to add a third unit is blocked with the maximum notice. The cap holds in the cart as well, so increasing the quantity there is also stopped.

Small orders are not worth fulfilling below a certain value.

  • Set the minimum order total to your floor.

If the cart subtotal is below it, the order-total notice appears and checkout is blocked until the subtotal reaches the floor — regardless of which products are in the cart.

Example 5: combining levels with precedence

Section titled “Example 5: combining levels with precedence”

Suppose you set:

  • A global minimum of 1 (a baseline).
  • A category minimum of 10 for the wholesale range.
  • A product minimum of 24 for one bulk SKU in that range.

For the bulk SKU, the product rule wins: 24. For other products in the wholesale category, the category rule wins: 10. For everything else, the global rule wins: 1. Each constraint resolves to the most specific matching rule, so you can layer broad defaults under targeted exceptions.

Rules are checked at three points, so they cannot be bypassed:

  1. Add-to-cart — an invalid quantity is caught the moment it is added.
  2. The cart — changing quantities is re-validated.
  3. Checkout — a final gate blocks checkout until every rule is satisfied.

All three work in both the classic and block-based cart and checkout.

Use the tokens so each message names the real product and value:

  • Minimum: Please order at least {min} of {product}.
  • Maximum: You can order at most {max} of {product}.
  • Step: {product} is sold in multiples of {step}.
  • Order total: Your order must reach {total} before checkout.

Clear, specific notices turn a blocked checkout into a quick fix instead of a dead end.