trouble greying out/strikethrough sold out product page variants

trouble greying out/strikethrough sold out product page variants

thelokishop
Tourist
6 0 1

Hi I am having a hard time greying out/adding strikethrough to sold out variants. I have tried to add the codes most people suggest into the base.css but non of them are working. Here is my site https://thelokigiftshop.com/products/hello-pumpkin-corded-sweatshirt-in-orange?variant=4646301001349...

TIA!!!

Replies 7 (7)

websensepro
Shopify Partner
1272 144 160

Hi @thelokishop 
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>

 

<style>
span.badge.price__badge-sold-out.color-inverse {
    text-decoration: line-through !important;
    color: gray !important;
}
</style>

websensepro_0-1730124544330.png

 

If my reply is helpful, kindly click like and mark it as an accepted solution.

 

If you are happy with my help, you can help me buy a COFFEE

Thanks!

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial
thelokishop
Tourist
6 0 1

thanks so much for your response! is this the right spot? it is not working on my site stillScreenshot 2024-10-28 at 10.36.33 AM.png

websensepro
Shopify Partner
1272 144 160

No worries and no, this is not the correct position. You are putting this above <head> but you need to put it under and before its closing tag that is </head>

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial
websensepro
Shopify Partner
1272 144 160

@thelokishop is it working now?

If my reply is helpful, kindly click like and mark it as an accepted solution.

 

If you are happy with my help, you can help me buy a COFFEE

Thanks!

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial
thelokishop
Tourist
6 0 1

lol sorry not a coding girl. i think this is right? but its not workingScreenshot 2024-10-28 at 10.43.13 AM.png

websensepro
Shopify Partner
1272 144 160

I've checked your store and it is there working fine. Am I missing something?

websensepro_0-1730128103495.png

 

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial
thelokishop
Tourist
6 0 1

so sorry. i didnt explain correctly. i was wanting the sold out variant options to be greyed out and strike through. hope this makes senseScreenshot 2024-10-28 at 11.44.03 AM.png