Visibility conditions reference
In short
Conditions decide who sees a block, based on cart, products, customer, address, shipping, payment, discounts, attributes or metafields. A block shows when any one of its conditions matches.
✓ Applies to
- Advanced and Deluxe plans
- Block visibility, under Block Visibility on each block
- Checkout rules use the same condition list
✕ Doesn't apply to
- Single block types inside a block. Conditions apply to the whole block
How matching works
| Setup | Result |
|---|---|
| Toggle off | Always shows |
| On, no conditions | Always shows |
| On, with conditions | Shows when any one matches |
| Operator left on ”-“ | That condition never matches |
Conditions update live. Change the cart or address and the block appears or hides without a reload.
Conditions apply to the whole block. For different content per audience, make one block each and place each in its own Custom Block.
Operators
| Type | Operators | Watch out |
|---|---|---|
| Number | Equal, Not Equal, Greater/Less Than (or Equal) | Blank never matches |
| Text | Equal, Not Equal, Contains, Not Contains, In list, Not In list, Length, Empty, Match regex | Case-sensitive. Lists: A,B,C, no spaces |
| List | In this list, Not in this list | — |
Conditions on lists (discount codes, titles, payment options) match if one item passes. With no items, they never match, even Not Equal.
Cart and products
| Condition | Checks |
|---|---|
| Cart Total | Cart subtotal, no shipping |
| Product in cart / not in cart | Any picked product |
| Variant in cart / not in cart | Any picked variant |
| Product quantity in cart | Total quantity of picked products |
| Product type in cart / not in cart | Exact type, case-sensitive |
| No of Products | Items in cart, counting quantities |
| Vendor Name in cart / not in cart | Exact vendor, case-sensitive |
Customer and address
| Condition | Checks |
|---|---|
| Customer billing has phone | Phone of 8+ characters |
| Customer billing has email | Email of 2+ characters |
| First Name, Last Name | Delivery name (text) |
| Shipping Address 1 / 2 | Address lines (text) |
| Shipping Country | Country: Is / Is Not |
| Shipping State / Province | Province code: Is / Is Not |
Address conditions wait for the buyer to type the address. With no country yet, Is fails and Is Not matches.
Delivery and payment
| Condition | Checks |
|---|---|
| Shipping Delivery method title | Chosen shipping method’s title |
| When delivery type is shop pickup | Store pickup is offered |
| Payment Method Type | Type, like Credit Card or Wallet |
| Payment Method Handle | Method handle. Ask support for it |
Discounts and gift cards
| Condition | Checks |
|---|---|
| Discount Code / Discount Title | Order and shipping discounts |
| Product Discount Code / Title | Discounts on single items |
| Gift card is applied | At least one gift card |
| No of gift cards applied | How many gift cards |
Cart attributes and metafields
| Condition | Checks |
|---|---|
| Cart attribute key and value | One cart attribute. Missing counts as blank |
| Cart metafield key and value | One cart metafield (namespace custom by default) |
Use the metafield condition to react to buyer input, like a ticked checkbox. Save a field to a metafield.
Frequently asked
Do all conditions have to match? +
No. For block visibility, the block shows when any one of its conditions matches. There's no setting to require all of them.
What happens to a condition with no operator selected? +
It never matches. Pick an operator for every condition that has one.
Are text comparisons case-sensitive? +
Yes. Equal, Contains, In list and the regex operators compare text exactly as written, including capitals.
What does Cart Total include? +
For block visibility, Cart Total is compared with the cart subtotal that Shopify reports to checkout apps. It doesn't include shipping.