> For the complete documentation index, see [llms.txt](https://ymq-app.gitbook.io/ymq-product-options-app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ymq-app.gitbook.io/ymq-product-options-app/getting-started/how-to-add-conditional-logic-to-a-product-option.md).

# How to add conditional logic to a product option

You can add conditional logic only to our [**Virtual Options**](/ymq-product-options-app/getting-started/difference-between-shopify-options-and-virtual-options.md). Unfortunately, you can’t make [**Shopify Options**](/ymq-product-options-app/getting-started/difference-between-shopify-options-and-virtual-options.md) appear with conditional logic because Shopify Options are always required and can’t be hidden.

You can, however, use a Shopify Option variant to trigger a Virtual Option product option to show with conditional logic.

## How to add Conditional Logic

To add conditional logic make or edit a **Virtual Option**.

### Add condition to options.

<figure><img src="https://2625127081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FadDQ5oZA6CM3C6sDtLH7%2Fuploads%2FOFJNSexH4QQ0pfJ39kAK%2Fimage.png?alt=media&amp;token=b010fdc9-72aa-47a9-9bec-e6e4b2a7ce1d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2625127081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FadDQ5oZA6CM3C6sDtLH7%2Fuploads%2Fn84Z7okpzCziQDMDp6ti%2Fimage.png?alt=media&amp;token=85771bfe-0d79-466b-bcb8-113c4c8f89ce" alt=""><figcaption></figcaption></figure>

### Add condition to option value.

<figure><img src="https://2625127081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FadDQ5oZA6CM3C6sDtLH7%2Fuploads%2Fr5QYa80AB5yCShzMqzOj%2Fimage.png?alt=media&amp;token=cddeda77-3a67-4d88-9162-37bd9585e365" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2625127081-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FadDQ5oZA6CM3C6sDtLH7%2Fuploads%2Fm46Chtr5Cc3JtYZAVyMY%2Fimage.png?alt=media&amp;token=a4f37c86-a840-443b-8a8a-80359c197938" alt=""><figcaption></figcaption></figure>

{% embed url="<https://youtu.be/cMK1FT9mPL8>" %}
