Add class to unavailable variants

Highlighted
Shopify Partner
6 0 1

I have a variant section on a site, which can be seen here: https://ptlrdsgn.com/DOu8xJN0. If you click 48x60, the button will change to "Unavailable" because that specific combination does not exist. Ideally I'd like to preemptively gray out/disable the 48x60 variant before it is clicked, to avoid the confusion and make it more clear that variant combination does not exist. Is that possible? I haven't been able to think of a loop/function to check variant combinations that could be selected, but aren't the current combination. Thanks for your help!

0 Likes