What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Hiding sold out variants in the product page with selected collections

Solved

Hiding sold out variants in the product page with selected collections

Macoy102890
Tourist
12 0 3

Hi everyone, 

 

I just want to ask if there is a way that we can hide sold-out variants of a selected collections only. 

hope you can help me. thank you. 

Accepted Solution (1)
Moeed
Shopify Partner
6348 1721 2079

This is an accepted solution.

Hey @Macoy102890 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

{% for c in product.collections %}
{% if c.handle == "beyond-sight" %}
<style>
.color-swatch.is-disabled {
    display: none !important;
}
</style>
{% endif %}
{% endfor %}

RESULT:

Moeed_0-1729679505193.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


View solution in original post

Replies 8 (8)

Moeed
Shopify Partner
6348 1721 2079

Hey @Macoy102890 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.color-swatch.is-disabled {
    display: none !important;
}
</style>

RESULT:

Moeed_0-1729672187865.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


Macoy102890
Tourist
12 0 3

Hi Mooed. thank you for your response, May I ask If I can apply this in a specific collection. thank you

Moeed
Shopify Partner
6348 1721 2079

Can you send me the link of the collection on which you want this code to work on only?

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


Macoy102890
Tourist
12 0 3
Moeed
Shopify Partner
6348 1721 2079

This is an accepted solution.

Hey @Macoy102890 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

{% for c in product.collections %}
{% if c.handle == "beyond-sight" %}
<style>
.color-swatch.is-disabled {
    display: none !important;
}
</style>
{% endif %}
{% endfor %}

RESULT:

Moeed_0-1729679505193.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


Macoy102890
Tourist
12 0 3

Thank you Moeed... you're awsome!!👊

Moeed
Shopify Partner
6348 1721 2079

Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


thegoodish
Visitor
1 0 0

Thank you for this helpful solution. When I attempted this code fix, it worked for most items, but there are still some items showing Sold Out. Do you know what might cause that?