I have a handle that has several colors that are seasonal. So during part of the year (when some colors are sold out) i would like those color options not to show on the product page.
I have successfully added code from this solution:
But that only works on products with one option (it works perfectly on my products with color only). But on products with 2 options (color and size) that does not work.
Any solutions to hide variants in handles that have two options?
Hi there Robert!
Don here from Shopify. :)
We can take a look at putting this in place internally for your store, though I will just need to reach out to you via email first so this can happen.
I will send a mail to the address we have on file for you here so we can get this started.
All the best!
You can add a if condition in your product-template.liquid file to show items in dropdown only when variant is available. However this doesn't work if you have 2 or 3 types of variants. example:
Color and Size
Color, Size and Material
You will need a JS logic, which can get tricky based on theme you are using.
Also, you will need to think if all products go out of stock, what you want to happen?
You can also try out this app:https://apps.shopify.com/autohide-soldout-products
Which can hide out of stock variants, and hide entire product when all the variants of products are out of stock.