Cart and checkout validation: what it can block and where the message shows
Updated · SMART Functions Creator (E-TRADE PARTNER)
When a validation rule matches, Shopify blocks the entire checkout and shows your message; the customer cannot continue or pay until the cart changes. Validations run on cart interaction (off by default), checkout interaction, and checkout completion. They cannot remove single items, reject a discount, or stop quantity changes inside a cart drawer.
5.0 · SMART Functions Creator builds this as a Shopify Function, free on live stores, no code.
Install freeWhere and when
- Run points: Cart interaction (off by default), Checkout interaction, Checkout completion. Enable Cart interaction if you want the error before the customer reaches checkout; whether a theme's cart drawer surfaces it depends on the theme, not on the app.
- Error placement: the cart as a whole, or buyer identity and shipping address fields. The app does not inject errors into theme components.
- The message text is yours. Translation of the message per language is a common request; ask support about the current options.
Common rules
- Minimum or maximum quantity: Line group quantity condition. For a per-product cap, create one Line group per product; a collection or tag group sums all matching items.
- Quantity multiples (12, 24, 36): a multiple-of operator on the Line group quantity.
- Mixed carts: block when a restricted group has quantity above 0 and any other group also has quantity above 0.
- Tag-restricted products: block when restricted products are present and the customer lacks the required tag.
- PO box addresses: match the shipping address line, because Shopify's native rates often omit the address data that delivery customizations would need.
- Weight: for a maximum weight, "is greater than" allows a cart exactly at the threshold; use "greater than or equal" to block the threshold weight too.
What the visual builder cannot do
Comparisons are direct. Compare line groups checks total, subtotal, quantity, or weight of one group against another, but it cannot multiply by a percentage, add a fixed amount, divide, or round. A rule such as "fee quantity must equal round(12.90 + 10% of subtotal)" is not enforceable in the builder. Validation also cannot depend on the selected payment method.