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

Re: Hide Variants that has 0 stock

Solved

Hide Variants that has 0 stock

AndreBotha
Visitor
2 0 1

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.

AndreBotha_0-1711121249358.png

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 

Accepted Solution (1)

Liquid_xPert_SJ
Shopify Partner
1397 144 216

This is an accepted solution.

@AndreBotha 

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

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 93 (93)
John_denza
New Member
19 0 0

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  

RevaGravesTSH
Shopify Partner
2 0 1

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

John_denza
New Member
19 0 0

Hi,
So you have to use that app
https://apps.shopify.com/veil-hide-sold-variants

It will fix the automatic

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@RevaGravesTSH 

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?

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
RevaGravesTSH
Shopify Partner
2 0 1

The Shopify theme name is Eclipse.
My store is: https://rufflandperformancekennels.myshopify.com/

 

rach-skipping
Shopify Partner
1 0 1

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. 

 

rachskipping_0-1742289833337.png

rachskipping_1-1742289885283.png

 

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! 

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@rach-skipping 

This can be done with some custom Js functionality. Do let me know if you want me to do this for you.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
cseering
Tourist
4 0 2

Hi @Liquid_xPert_SJ ... I tried this and it must not be working on my theme, I have Woodstock theme.  Can you help me?

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@cseering yes sure please share your store URL..

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
cseering
Tourist
4 0 2
Liquid_xPert_SJ
Shopify Partner
1397 144 216

@cseering thank you I will get you ASAP, if you are in hurry just reach out me.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
cseering
Tourist
4 0 2

Hello, not to rush... have you had a moment to look for possible solutions?

cseering
Tourist
4 0 2

Hi 

Hi @Liquid_xPert_SJ ... any thoughts on how to update my theme?
Preview
 
 
 
Liquid_xPert_SJ
Shopify Partner
1397 144 216

@cseering download the ffresh copy of your theme, move your customization code in new theme, test the changes and publish it.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
emmakatestore
Visitor
2 0 2

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_1-1750434128321.png

 

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@emmakatestore  cab you please share your store url?

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
emmakatestore
Visitor
2 0 2

Hi, I have solved the problem. I used the solution on this post and modified the code to fit my theme. Thanks

Dan-From-Ryviu
Shopify Partner
12073 2359 2539

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.

Micki_Angeles
Visitor
2 0 1

Hi @Dan-From-Ryviu 

 

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

 

https://sneakerologyny.com/products/kane-revive-adult 

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@Micki_Angeles it's depends on the theme file structure and the requirements what you are looking for.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Dan-From-Ryviu
Shopify Partner
12073 2359 2539

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.

John_denza
New Member
19 0 0

Hi,

I think this app will solve your issue - https://apps.shopify.com/veil-hide-sold-variants

Lausw89
Visitor
1 0 0

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

huskiapps
Shopify Partner
1 0 0

Hi,

You can also use this app it will be helpful for you - https://apps.shopify.com/veil-hide-sold-variants

lingeriedamour
Visitor
1 0 0

What about for Debut theme?

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@lingeriedamour it can be done with different code according to the theme code structure.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
RichieL
Tourist
7 0 1

Can you check out my store babycareshop.store 

 

im having the same issue 

RichieL_0-1733806537606.png

 

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@RichieL 

Sure please share the store details so that I can look into it.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
RichieL
Tourist
7 0 1

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

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@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.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.

bdshops
Tourist
4 0 2

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 

 

variant sizes.JPGcode variant.JPG
Liquid_xPert_SJ
Shopify Partner
1397 144 216

@bdshops can you share the store url or the theme name as well?

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
bdshops
Tourist
4 0 2

theblackdog.com   Dawn theme     shopify.com/store/black-dog-4

 

John_denza
New Member
19 0 0

Hi,
You can use this app 
https://apps.shopify.com/veil-hide-sold-variants

It will easy to setup and work smart

tuch
Tourist
5 0 2

Hi, I used it in refresh them and it did not work 😞 could you help me out 

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@tuch 

Please share your store url.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
tuch
Tourist
5 0 2

09ft9k-rm.myshopify.com

 

Liquid_xPert_SJ
Shopify Partner
1397 144 216

It's password protected url.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
tuch
Tourist
5 0 2

you can check it now!

tuch
Tourist
5 0 2

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?

Liquid_xPert_SJ
Shopify Partner
1397 144 216

@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. 

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
tuch
Tourist
5 0 2

So could you help me out? or what should I do now?

Liquid_xPert_SJ
Shopify Partner
1397 144 216

Yes sure definitely I would love to help you.

- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂- If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response.
- Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
- Your Shopify Solution Specialist For further discussion contact: Email ID- Liqud_3xPert_SJ OR Whatsapp
- Buy a Coffee for me to get more frequently help 🙂
- Hire Me to unlock the full potential of your e-commerce store Now 🙂
- Need THEME UPDATES but have custom codes? No worries, for an affordable price.
John_denza
New Member
19 0 0

Hi,
You can this use app - https://apps.shopify.com/veil-hide-sold-variants
It's just very easy