How to show or hide options with conditions

A condition makes an option appear or disappear depending on what the customer chooses, which variant is selected, or who the customer is. This article shows how to add a condition and what happens to hidden options.

Before you start

Add a condition

  1. Open the option set and select the option you want to show or hide.
  2. At the top of the option panel, the line says Always shown. Click Add condition.
  3. Choose Show or Hide. The sentence reads "Show this option when...".
  4. Choose a source for the rule (see the table below), then the comparison and the value.

The condition editor on a Gift wrap option: Show this option when Box size is not Small, with Add rule, Remove condition and Done 5. To add more rules, click Add rule. With two or more rules, choose whether to Match all or any of them. 6. Click Done, then Save.

Once saved, the condition is summarised in one line, such as "Shows when Add gift wrap is on and Wrapping paper is Gold". Click Edit to change it or Remove condition to delete it. An option can have up to 10 rules.

Rule sources

Source What it checks Comparisons
An option (listed under Options) What the customer chose in another option is, is not, and for typed text also contains, doesn't contain
Variant (under Shopify variant) The name of the selected variant, such as "Black / M" is, is not, contains, doesn't contain
Customer tag The tags of the logged-in customer has tag, doesn't have tag

A Switch is compared as On or Off. Choice options let you pick the value from a list. Number, Range slider, Date and Date range options are compared as a whole value, not with "contains".

File upload options and display-only options (headings, paragraphs and similar) cannot be used as a source.

What happens to a hidden option

Rules to know

Worked example

You sell gift boxes. A Switch "Add gift wrap" ($3.00) and a Dropdown "Wrapping paper" (Gold $2.00, Silver $1.00).

  1. Select "Wrapping paper" and click Add condition.
  2. Leave Show, choose Add gift wrap as the source, and set it to On.

"Wrapping paper" now appears only when the switch is on. A customer who leaves the switch off pays nothing for paper, even if they picked one earlier and then switched back, because hidden values are not charged.

Related articles

How to add a size chart to an option →