All things Shopify and commerce
Hi I’m having a hard time figuring out how to remove the strikethrough line on sold out variants. I would like to keep them greyed out but only remove this line because I installed a “notify me when back in stock” button that does not appear unless a customer clicks on the sold out variant, so most customers are not clicking on it since they can clearly see the product is sold out beforehand.
I hope this makes sense and someone can help me with a code or anything to remove this.
btw I am using the DAWN theme
Thank you !
Solved! Go to the solution
This is an accepted solution.
First revert back to class="disabled". Open Editor (page > Default product) and add Custom CSS to the Product information template/section:
.product-form__input input[type='radio'].disabled + label {
text-decoration:none;
}
My other two cents 😉
Can you share the store URL and password if the store is password-protected
Maybe disabling the disable class?
- Snippets > product-variant-options.liquid (l.59, Dawn 12)
{% if option_disabled %}
class="!disabled"
{% endif %}
My two cents. Good luck!
Hi thank you so much for the quick response! It worked the strikethrough lines are gone but it also took away the grey out . Any suggestions on how to keep them greyed out & only remove the strikethrough lines?
This is an accepted solution.
First revert back to class="disabled". Open Editor (page > Default product) and add Custom CSS to the Product information template/section:
.product-form__input input[type='radio'].disabled + label {
text-decoration:none;
}
My other two cents 😉
It worked perfectly! You’re amazing! Thanks so much !
The code worked great for removing the strikethrough. However, I noticed that the sold out variant button is a lighter shade than the others. Is there a way to make them look exactly like the others?
Have you found the resolution?
hello i need help on this can you help me out on how to get this remove and what section to go to?
Hi! If I'm using the Enterprise 1.4.0 theme, where can I find the right snippet? I don't have product-variant-options.liquid in my drop-down.
hey, how did you make the strikethrough line on Dawn theme?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025