Zum Inhalt springen

Building order rules

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

This page works through realistic order rules and shows how Minimum enforces and combines them. Each example is a row you add at WooCommerce → Minimum.

A product is only sold by the half-dozen.

  • Scope: Specific product
  • Step: 6

The shopper can now add 6, 12, 18 and so on. Adding 5 or 7 triggers the step notice and checkout is blocked until the quantity is a valid multiple. A step of 0 or 1 would mean no restriction, so use 6 here.

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

  • Scope: Product category (the wholesale category’s ID)
  • Min: 10

Every product in that category requires at least 10 units. Because the add-to-cart check counts what is already in the cart, a shopper who adds 6 then tries to add 3 more is still short of 10 and is stopped, the notice names the product and the required minimum.

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

  • Scope: Specific product
  • Max: 2

Adding a third unit is blocked with the maximum notice. The cap also holds on the cart page, so raising the quantity there is stopped too. (If you accidentally set Max below Min on the same rule, Minimum drops the Max on save and keeps the Min.)

Small orders are not worth fulfilling below a certain value.

  • Set Minimum order total to your floor (it is not a rule row, it is the store-wide field above the rules table).

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. The default wording, Your order total must be at least {min} (currently {total})., shows both the floor and the live subtotal as formatted prices.

Example 5: combining scopes with precedence

Section titled “Example 5: combining scopes 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. Min, max and step resolve separately, so a product rule can supply the minimum while a category rule supplies the step.

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

  1. Add-to-cart, an invalid quantity is rejected as it is added, accounting for what is already in the cart.
  2. The cart page, every line is re-validated and notices surface; checkout is blocked.
  3. Checkout, a final gate on the classic checkout.

All three read the live cart, so they work identically in the classic and block-based cart and checkout.

Edit the four notices on the settings screen so each names the real product and value. Only the tokens listed for each message are substituted:

  • Below minimum ({min}, {product}): Please order at least {min} of {product}.
  • Above maximum ({max}, {product}): You can order at most {max} of {product}.
  • Invalid step ({step}, {product}): {product} is sold in multiples of {step}.
  • Below order total ({min}, {total}): Your order must reach {min}, you're at {total}.

Note that {total} is only available on the order-total notice, where it is the shopper’s current subtotal, not the required floor. A clear, specific notice turns a blocked checkout into a quick fix rather than a dead end.