Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi Guys, so basically I want a non app way (Code Only) to hide variants that has 0 stock (Sold-out variants) or would never have that variant.
I'm using the free 'Studio' theme. If anyone can point me in a direction or could assist I would greatly appreciate it.
I did look at this first but apparently this is for legacy themes:
https://help.shopify.com/en/manual/online-store/themes/themes-by-shopify/vintage-themes/customizing-...
Regards,
Andre
Solved! Go to the solution
This is an accepted solution.
please refer to the below code add that code into your base.css file
Online Store > Edit Code > Theme Files > Assets > base.css file place the code at the very bottom.
.js.product-form__input.product-form__input--pill input.disabled + label {
display: none;
}
Thanks
Hi,
Understand your concern,
If you can tell the support team they will help you
might be take some extra charges for one time collections and filters work, I think on your store it's only possible via app
Greetings! I am wondering if you had a solution for this for the Eclipse theme by Flourescent. I do not have a base.css within my theme to add your code to.
Store URL: https://rufflandperformancekennels.myshopify.com/products/dog-bowl
Hi,
So you have to use that app
https://apps.shopify.com/veil-hide-sold-variants
It will fix the automatic
this can be done with some custom code not with CSS because since theme code structure has been updated when you select multiple variants it conflict with that, and on the base of each theme code structure i have to provide different code. can you please share the theme name?
The Shopify theme name is Eclipse.
My store is: https://rufflandperformancekennels.myshopify.com/
hello @Liquid_xPert_SJ I have looked every where but can only seem to find this solution!
This worked great for my size pills - but it doesn't work for my colour swatches underneath sizing.
For example I have tshirts in Standard & Heavy Weight. Standard is available in XS size but heavy is not, the hide code you posted above works to hide the XS pill. There are also colours for each tshirt, for example the standard tee does not come in the grey colour 3rd from the left of the swatches. How can I hide the colour swatches that aren't relevant for each tee style?
I tried to add a similar line of code but this didn't do anything.
.js.product-form__input.product-form__input--pill input.disabled + label {
display: none;
}
.js.product-form__input.product-form__input--swatch input.disabled + label {
display: none;
}
Thankyou!
This can be done with some custom Js functionality. Do let me know if you want me to do this for you.
Hi @Liquid_xPert_SJ ... I tried this and it must not be working on my theme, I have Woodstock theme. Can you help me?
@cseering yes sure please share your store URL..
@cseering thank you I will get you ASAP, if you are in hurry just reach out me.
Hello, not to rush... have you had a moment to look for possible solutions?
@cseering download the ffresh copy of your theme, move your customization code in new theme, test the changes and publish it.
Hi, Im using Sense version 15.3 and Im trying to hide the color variant that doesn't existed for the particular product variant. I tried the code but its not working. As you can see in the picture, I wanted to hide the highlighted colors when the customer selected the variant (Everyday Bag PLUS) as these color doesn't exist for the (Everyday Bag PLUS) variant and only existed for the (Everyday Bag) variant. Thanks a lot!
@emmakatestore cab you please share your store url?
Hi, I have solved the problem. I used the solution on this post and modified the code to fit my theme. Thanks
Hi @AndreBotha
Please share your store URL please
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Did all the solutions above and still can't seem to get it working.
I am using the current version of Dawn and here is the link
@Micki_Angeles it's depends on the theme file structure and the requirements what you are looking for.
Please add this code to theme.liquid file, after <head> in Online Store > Themes > Edit code
<style>
.product-form__input--pill input[type=radio]:disabled+label,
.product-form__input--pill input[type=radio].disabled+label {
display: none !important;
}
</style>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Hi,
I think this app will solve your issue - https://apps.shopify.com/veil-hide-sold-variants
Hello this solution was great thanks, however I'm now having the issue where a 'sold out' badge appears each time I change the size - my first varient, (before selecting the second variant) Can anyone advice on how to hide this please
Hi,
You can also use this app it will be helpful for you - https://apps.shopify.com/veil-hide-sold-variants
What about for Debut theme?
@lingeriedamour it can be done with different code according to the theme code structure.
Can you check out my store babycareshop.store
im having the same issue
Sure please share the store details so that I can look into it.
it's a shrine theme and I have tried the other code from the previous thread but none seems to work. I want to make sure it hides the variations of the products that are out of stock and will unhide it when it gets back in stock
@RichieL the code can be vary depending on the theme code structure l. Without looking to the theme files I cannot provide the exact solution.
Hello
This did not work for me ... added at the bottom of assets/base.css file but sold out variants are still showing on PDP
@bdshops can you share the store url or the theme name as well?
theblackdog.com Dawn theme shopify.com/store/black-dog-4
Hi,
You can use this app
https://apps.shopify.com/veil-hide-sold-variants
It will easy to setup and work smart
Hi, I used it in refresh them and it did not work 😞 could you help me out
Please share your store url.
09ft9k-rm.myshopify.com
It's password protected url.
you can check it now!
Hi, I tried it again but still not working. did yo have time to check? can it be related with the fact that I use 3 variants?
@tuch no it doesn't mean how many variants you are using, actually it needs some detailed custom code on the base of multiple variants.
So could you help me out? or what should I do now?
Yes sure definitely I would love to help you.
Hi,
You can this use app - https://apps.shopify.com/veil-hide-sold-variants
It's just very easy