I can’t see anywhere that I can request a feature update to be added to the Shopify Roadmap.
So I am posting it here in the hope that it will be picked up and passed on.
It would be AWESOME to be able to unpublish variants of a product. I know they can be made out of stock, but for instance, we launch new variants of an existing product, and it would be so much easier to be able to add them alongside existing variants ahead of time, but hide them from the front end.
To hide a specific product on the front end while keeping it live in the admin settings, you can follow these steps:
Add a tag to the product you want to hide. Let’s say you tag it with ‘your tag name’.
Modify your product display code as follows:
{% unless product.tags contains ‘your tag name’ %}
{% endunless %}
This code will ensure that the product is only displayed on the front end if it does not have the ‘your tag name’ tag. If the product has this tag, it will not be shown to users on the website.
Hiding products is not a problem. It’s hiding specific variants of a product that I’d like to do. Is that possible with tags? I think only products can have tags not variants. Is that correct?
That’s a great start, thank you. We can do that and add a word that is nowhere else. As most of our products variants are colours we use on other products, we couldn’t do it just on the title as is.
Thanks so much for your help! I’ll implement it and see how we go
I appreciate your gratitude.
Feel free to give the solution a try. If it works, please approve it. If it doesn’t, just let me know, and I’ll investigate the code more thoroughly.