Hide/Remove color swatches for products that don't come in that color.

Hide/Remove color swatches for products that don't come in that color.

scoutkysek
Visitor
2 0 0

I updated my company's website theme which had not been done in 7 years. I've got mostly everything worked out except for one product page's variants. One of our products come in 6 sizes, but not every size comes in every color. I'm using Taiga theme, and I may reach out to them for assistance. Maybe it's an If/Then code that could solve this. I haven't been trained in coding, but I've done okay with it from YouTube tutorials and instructions on this forum. 

 

Is there a way to totally remove the color swatches when a certain size is selected? I.E., when I click size 25, all the swatches show (it's available in all the colors), and when I click size 150, only two swatches show (because those are the only colors that size is available in). 

 

Screenshot 2025-05-08 100822.png    Screenshot 2025-05-08 100833.png

 

Replies 4 (4)

BiDeal-Discount
Shopify Partner
508 58 115

Hi @scoutkysek 

can you share your store url & password (if applicable) ?

- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330

Guleria
Shopify Partner
4147 809 1164

Hello @scoutkysek ,

 

Yes it's possible you need to use css to hide them based on the dynamic class or attributes.

Please share the product URL so I can check.

 

Regards
Guleria

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder
scoutkysek
Visitor
2 0 0
Guleria
Shopify Partner
4147 809 1164

Use this css in reset.css or any other related css file

[data-cross-unavailable=true] .product-form__input input[type=radio].disabled+label
{ 
    display: none;
}

 

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder