How can I display only actual variants on my product page?

Hello all,

When you create a new product with variants using 2 options (e.g colour and size), by default you get all variants. In our case we got 8 variants (2 sizes x 4 colours). However we only have 6 variants.

The workaround we used was to set-up a price for the 2 variants that actually don’t exist and untick the box “Create this variant”. From the back-end it looks like it worked because we only see 6 variants.

However when we preview our product page, if we select the big size (the one with only 2 colours available instead of 4), we still can see all 4 colours options in the drop-down. This is confusing for the end customer as these variants don’t exist.

Is there a way to display only the variants that actually are set-up in Shopify back-end?

Thank you very much!

This is possible to do and need customize the code to achieve it.

The idea is catch the event when customer choose value on the 1st dropdown, then based on that value we can track and hide the unavailable option in the 2nd dropdown.

If you are not familiar with code, you should hire a developer to do it for you. It would take about 6 - 10 hours of making.

1 Like

Hello,

Thanks for your answer.

Have a nice day!

1 Like