Conditions
The condition groups you can use in validations, Checkout Studio blocks and Auto Add to Cart.
The Conditions window is where you describe when something should happen. It is used in checkout validations, in Checkout Studio blocks (On trigger) and in Auto Add to Cart.
1. Add a condition
- In the validation form or the block settings click Add conditions (or Edit conditions if some already exist). The Conditions window opens.
- For each condition choose a group, then a field, an operator and a value.
- Add more conditions. For validations, the error shows only while all of them are true.
2. Condition groups
| Group | Examples |
|---|---|
| Product | Collection, tag, product type, vendor, metafield, gift card |
| Product variant | Variant, SKU, price, weight, compare-at price, requires shipping, metafield |
| Cart | Subtotal, total weight, total quantity, total tax |
| Cart line | Line quantity, line amount, attribute |
| Shipping address | City, state / province, country, ZIP / postal code |
| Billing address | City, state / province, country, ZIP / postal code |
| Customer | Log in status, B2B customer, metafield, company name, email, phone |
| Delivery | Selected delivery option, delivery options, delivery cost, delivery method type, is delivery required |
| Eligible | Eligible amount, eligible quantity, eligible weight |
3. What is hidden in validations
Checkout validations hide conditions that Shopify's validation system has no data for, for example the cart note, payment type, discount codes, gift cards and marketing consent. Those stay available for Auto Add to Cart and for blocks.
Shopify also limits how much data one validation can read. If you combine conditions that cannot be checked together at checkout, the app tells you to remove one.
Tips
- Use the fewest conditions that do the job.
- Combine a Cart subtotal condition with a Country condition for country-specific minimums.