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?
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?
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024