Skip to content

Conditionals

Sometime is usefull to show/hide some elements according to certain conditions. While CMS conditions are all automatically converted, there are some conditions that Webflow doesn’t supports yet, and can instead be used with custom attributes.

Note that the elements are not visually hidden, they will not be present at all in your HTML!

Show If

You can let Shopify render an element only if a condition is met, by using the attribute:

Hide If

Hide an item when a condition is met, by using the attribute:

Logged In

To show/hide something when the user is logged in you can use respectively:

Has orders

To show/hide something when the user has orders:

Has items in cart

To show/hide something when the user has items in cart:

Cart is empty

To show/hide something when the cart is empty:

Customer accepts marketing

To show/hide something when the user accepts marketing:

Gift Card Conditions

Following conditions can be used only inside Gift card page.

Expired

To show/hide something when the gift card is expired:

Active

To show/hide something when the gift card is active:

Used

To show/hide something when the gift card has been used: