Hello,
Would like to add my product options to be greyed out/ blurred out/ or line through option when sold out. does anyone have a solution to this?
Hello,
Would like to add my product options to be greyed out/ blurred out/ or line through option when sold out. does anyone have a solution to this?
Hello there
To grey out, blur, or strike-through a product option when it’s sold out in Shopify, you can modify the theme code. Here’s how you can do it:
.product-form__item--sold-out {
opacity: 0.5; /* adjust this value to the desired level of opacity */
text-decoration: line-through; /* change this value to "blur" or "line-through" as desired */
}
{% if option.available == false %}
{% endif %}
... your option code here ...
{% if option.available == false %}
{% endif %}
This code will add a class to each option that’s sold out, which will apply the desired opacity and text-decoration styles.
Thank you for this!
When I click “Theme” should I click the 3 dots then edit code?