Solved

Colorblock Product Variants - Only Show Available Variants

SinaFischer
Visitor
3 1 0

Hello Shopify Community,

 

I was just in contact with the Support but we didn't find a solution so here I am 😁

 

I offer several products (dog food) each with 2 variants depending on each other. 

The first variant is the size, which is either 300g, 400g or 500g.

For each of those sizes, we offer two options for the amount they can order.

So for

300g you can either order 37 or 74

400g you can either order 31 or 62

500g you can either order 27 or 54

 

SinaFischer_1-1716299384603.png

 

You can now see that all the options for the second variant is shown, even though they are not available for the option I chose for the first variant. They are always shown crossed out.

 

As you can imagine, the look isn't too good and we would like to only show the options for variant two which are even available, depending on the first option. This is how I created it in the product overview.

 

Bildschirmfoto 2024-05-21 um 15.26.38.png

Can anyone help me with adapting the code so it only shows the available variants of the first option I chose?

Thank you so much in advance!

Best regards,

Sina

 

Accepted Solution (1)

SinaFischer
Visitor
3 1 0

This is an accepted solution.

Replies 2 (2)

ThePrimeWeb
Shopify Partner
2138 614 488

Hey @SinaFischer,

 

Can you share the link to your store please? Thanks!

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!

SinaFischer
Visitor
3 1 0

This is an accepted solution.