Cart Validator

How the check works

How Cart Validator checks the cart in Shopify checkout: what it compares, when it runs, which country and currency count and what buyers see.

The check runs inside Shopify's checkout as a checkout rule. It goes through your rules from top to bottom, in the order of the Rules list, and stops at the first rule the cart breaks.

What is checked

RuleCheckout stops when
Maximum order valueThe order is worth more than your limit. An order exactly at the limit passes.
Minimum order valueThe order is worth less than your minimum. An order exactly at the minimum passes.
Maximum quantityThe cart holds more of the product than your limit.
Minimum quantityThe cart holds the product, but fewer than your minimum. A cart without the product passes.
Quantity in multiplesThe product's quantity isn't a multiple of your pack size, such as 7 with a pack size of 6.

A value rule compares the Subtotal or the Total, whichever you chose. See Minimum and maximum order value. A quantity rule adds up every line of the product in the cart, or counts one variant. See Quantity rules.

Who a rule applies to

SettingThe rule checks
Delivery countriesOrders to all countries, only the ones you choose, or all except them. See Rules.
CurrencyFor a value rule, only orders the buyer pays in the rule's currency.
CustomersAll customers, only customers with one of your tags, or everyone except them. See Customer tags.
StatusOnly while Check this rule at checkout is on.

Which country and currency count

The country is the one in the delivery address. Until the buyer has entered an address, the app uses the country your store is set to for the buyer, for example through your country selector. When the buyer then enters an address in another country, that country's rules apply. With several deliveries in one checkout, the first delivery address counts.

The currency is the one the buyer pays in. A value rule in another currency doesn't check the order. See One currency per rule.

When the check runs

WhenWhat happens
In the cartNothing is blocked. Adding to the cart and changing quantities always work. The cart block shows the message on the cart page.
In checkoutEach time Shopify runs its checkout rules while the buyer fills in checkout.
When the buyer paysEvery rule again, with the final delivery country and total.

The app lets every cart change through on purpose. Shopify judges a cart change by the cart it leads to, so a cart that is over a limit would get stuck: removing one item could be refused while the cart is still over. Checkout is where the app stops the order.

What buyers see

Checkout stops and the buyer sees the message of the first rule the cart breaks, in the checkout's language, with your limit and the cart's value or quantity filled in. In English, the built-in message for a maximum order value reads: "Orders can be at most NZ$1,000.00, and yours is NZ$1,240.00. Please remove some items to continue." Only one message shows at a time. Once the cart meets that rule, the next broken rule shows its message, and once the cart meets every rule, checkout continues. You can change the text. See Buyer messages.

Where the check doesn't run

Shopify runs checkout rules in your online store's checkout, express checkouts included, also for a headless storefront that sends buyers to Shopify's checkout. It doesn't run them for point of sale orders, subscription renewals, order edits or orders created through the API.

If the check can't run

The check runs on Shopify's servers and doesn't call ours, so there is no extra request for the buyer to wait for. If the check fails to run, for example because it times out, Shopify lets the buyer continue. The app sets the checkout rule this way each time you save. A stored rule the check can't read is skipped, and the other rules still run.

A store can have up to 25 active checkout rules of this kind. Cart Validator adds one.

On this page