Hi all! How can I hide (NOT DELETE FROM THE BACKOFFICE) out of stock variants for customers on all products? I do not want the variants to be deleted, as they often come back in stock, but do want them to be hidden the second they are out of stock. I am using Symmetry theme.
Thank you!
Hi @KuchinateTLV ,
Please send your site and if your site is password protected, please send me the password. I will check it.
Hi @KuchinateTLV ,
Please refer to this guide from Shopify to hide sold-out variants from your product pages without deleting them. However, this guide has some limitations. It does not work for the following cases:
- Your products have more than one product option
- You use the Express theme and have the product page set to show products in an overlay
I hope my answer can help.
Hi @KuchinateTLV ,
Go to Assets > styles.css and paste this at the bottom of the file:
.opt-btn.is-unavailable+.opt-label {
display: none !important;
}
This worked!! THANK YOU!! Any idea how I can also hide the photos connected to the variants that I want hidden/are out of stock?!
Hi @KuchinateTLV ,
This is impossible. You can only remove the image from the sold out variant and then you can add the code for it.
Refer https://shopify.dev/api/liquid/objects/image#image-attached_to_variant
Hope it helps!
Hello
What if you don’t have style.css in assets? I am using colorblock 1.0 theme.
Hi @bohemiangroove ,
You can create a question on the community and send me the link. I will check it.
Because this will help build a better community.
Thank you.
Oh so sorry. Other boards I’ve been on don’t like it when you post new topics to questions that have already been asked. I didn’t know it was different here. I posted the question at this link.
https://community.shopify.com/c/technical-q-a/hide-out-of-stock-variants-in-colorblock-version-1-0-0/m-p/1598838#M90067
Thanks so much
There is no file in this theme (7.2.1 Symmetry) in the Assets page called styles.css
So what to do?
Hello, I go to Assets but I dont see the file called “styles.css”, could you help me? I use Symmetry V. 7.2.1