Prestige Theme - Cross Out Unavailable Variant

NMalone
Tourist
5 0 3

Hi,

I'm wanting to cross out the unavailable variant similar to below.
Can anyone tell me if this is possible in the Prestige Theme?

Thanks so much!

NMalone_0-1620209322122.png

 

dmwwebartisan
Shopify Partner
6488 1505 1972

@NMalone 

Please share your website URL and password if any. I will check and provide a solution here.

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes
NMalone
Tourist
5 0 3

Thank you so much!

It's www.shanetafashion.com

dmwwebartisan
Shopify Partner
6488 1505 1972

@NMalone 

You should create a class for strikethrough and add this class for variants where variant. available is false in the liquid template.
 
The CSS for the class would be something as simple as:
Add the following at the bottom of your assets/theme.css file.

 

.unavailable-variant {
text-decoration: line-through;
}

 

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes
NMalone
Tourist
5 0 3

Thank you. I have added the CSS to asset file, but not sure how to find the variant returning as false in the liquid.
Are you able to help any further? 
Thanking you.

dmwwebartisan
Shopify Partner
6488 1505 1972

@NMalone 

If you see the above CSS code it only targets the unavailable variants so no need to go and check in liquid. 

As you said you added code in CSS file. Is this working for you?

If this works then no need to change in liquid.

Let me know.

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes
NMalone
Tourist
5 0 3

Hi,

No it hasn't made any changes to the website - all variants are still showing as normal.

0 Likes
okw
Tourist
17 0 0

In the product page liquid, there' no variant.unavailable code, it only has something along the lines of "if variant available". Is it possible to work around that?

0 Likes