Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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!
Solved! Go to the solution
This is an accepted solution.
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;
}
Hi @KuchinateTLV,
Please send your site and if your site is password protected, please send me the password. I will check it.
kuchinate-shop.myshopify.com
password: boaideas
This is an accepted solution.
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.
Thanks so much
I need thr same help please!
Hide out of stock variant
https://community.shopify.com/c/technical-q-a/hide-out-of-stock-variant/td-p/2321341
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
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.
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024