> 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="/files/2Kpneop1lDiSdi1CjerV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/C5hbp8CDvh25PX8rLGgK" alt=""><figcaption></figcaption></figure>

### Add condition to option value.

<figure><img src="/files/GrWNDltMSs4XPG6hwcvc" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/zTyi4hxSf0AfUrqjagG4" alt=""><figcaption></figcaption></figure>

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