Shopify themes, liquid, logos, and UX
Does someone know how i can make the sold out variant on the product page grey-fade and unclickable?
Solved! Go to the solution
This is an accepted solution.
Hi @michelle012,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head> tag:
<style>
.radio__button .sold-out+label:before {
background: #00000000 !important;
}
span.radio__button:has(.sold-out) label > span {
color: gray !important;
}
span.radio__button:has(.sold-out) label {
pointer-events: none;
}
</style>
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕ .
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
This is an accepted solution.
Hi @michelle012,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head> tag:
<style>
.radio__button .sold-out+label:before {
background: #00000000 !important;
}
span.radio__button:has(.sold-out) label > span {
color: gray !important;
}
span.radio__button:has(.sold-out) label {
pointer-events: none;
}
</style>
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕ .
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
is there also a solution to make the swatch color grey- fade when sold out?
For swatch you can use this code
<style>
.swatch__button:has(.sold-out) > label {
--swatch: #c8c8c8!important;
pointer-events: none!important;
}
</style>
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕ .
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
- Here is the solution for you @michelle012
- Please follow these steps:
- Then find the base.css or theme.css file.
- Then add the following code at the end of the file and press 'Save' to save it.
.radio__button .sold-out+label:before, .radio__button .unavailable+label:before {
background: no-repeat !important;
}
.radio__button .sold-out+label {
background: darkgray !important;
}
.radio__fieldset .radio__button label {
min-width: 40px !important;
}
- Here is the result you will achieve:
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month nowBy 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, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024