Welcome to the Liquify Community

Updated 4 weeks ago

Variant .is-not-available class not working

At a glance
Hey! I've just noticed that variants with no stock (aka unavailable) are still selectable on the product page. I've created a .is-not-available class that's supposed to set pointer events to none and change some other styles, but it is not reflected after conversion.

Some help here please?

Also, if you see the sample link below – on the homepage all variants have the .is-not-available class added, but on the products details page it does not.

Webflow read-only: https://preview.webflow.com/preview/makebo1?utm_medium=preview_link&utm_source=designer&utm_content=makebo1&preview=2e903db79948c9938579805d4b825151&pageId=6735b6f6bd2fccc307bb8fdf&locale=en&workflow=preview
Sample link: https://makebo-theme.myshopify.com/products/badass-cowboy-hat?_psq=badass&_v=1.0&variant=54896863871351
Webflow export attached.
Marked as solution
Hi @jonathanhorst,
good point. We made this on purpose because most of our clients wanted that feature.. so you can still check other variants of the product. I can recommend to implement a not in stock button when the product is not available. Its also in the Starter Template.

if you dont want this you can use a css selector like this to deactivate pointer events:
[data-ProductVariantsLoop] input[type=radio].data-disabled + span {
pointer-events: none;
}

This one selects the span next to the disabled radio button
View full solution
j
J
5 comments
Hi @jonathanhorst,
good point. We made this on purpose because most of our clients wanted that feature.. so you can still check other variants of the product. I can recommend to implement a not in stock button when the product is not available. Its also in the Starter Template.

if you dont want this you can use a css selector like this to deactivate pointer events:
[data-ProductVariantsLoop] input[type=radio].data-disabled + span {
pointer-events: none;
}

This one selects the span next to the disabled radio button
Ah I see, that makes a lot of sense. Thanks for explaining.

I added a not in stock element now and it's an improvement for sure.
Was there changes made to this after I asked? Got it working with what you explained, then without changing anything it stopped working on the most recent conversion. @jonas.halbstark
Seems to be working again after another conversion. If you guys haven't made any changes on your end it seems like the conversion process is a bit unstable with those specific elements, just fyi πŸ™‚
Yes still struggling with the update. Thanks for the update and you patience πŸ™‚
Add a reply
Sign up and join the conversation on Discord