Conditional logic for drop down menus, is this possible?

Excursionist
80 0 7

If I have a series of cosmetic options shown via drop down menus, can I set it up so that when someone chooses an option in the first drop down that choice then automatically causes the next drop down to show only options that are compatible with the option chosen in the first drop down?

Example:  The first choice is which buckle you'd like, if you choose a buckle that's only availble in 22, 24 or 26mm widths then the next drop down menu (strap width) would ideally only show 22, 24 or 26mm strap width options.   Currently if someone chooses a buckle only available in 22, 24 or 26mm they can still choose strap widths that are not availble for that buckle, i.e. 18mm, 20mm etc.

 

Any help?  Thanks!

0 Likes
New Member
8 0 0

you can do this with some javascript

0 Likes
Highlighted
Astronaut
1925 0 362
Excursionist
80 0 7

That's what I was hoping, but I have zero idea how to get there from here.  Can you provide a link or example?

0 Likes
Excursionist
80 0 7

Thank you Alex, this appears to address the exact question I had, I will dive into this and see if it works for me.  Thanks!

0 Likes
Excursionist
80 0 7

Alex the link is very through about how to create the necessary snippet but there is no information of any kind regarding what to do once the snippet has been created?  Basically I folled the directions on that page and now am wondering what to do next?  

0 Likes
Astronaut
1925 0 362

Steps 1 through 6 tell you how to create the snippet file.  Steps 7 through 9 tell you how to insert it into your theme file.  After you're done with those steps, preview your store.

If you have any problems, you may want to consider sharing your storefront password so that others can take a peek at the problem.

0 Likes
Excursionist
80 0 7

Thank you.  Unfortunately, like SO many things with setting up a shopify store the incomprehensible limit of 100 variants is completely hamstringing me.  The code you've linked to works great, but it does rely on sorting variants that exist for each product.  I need well over 200 variants for each product, and shopify won't "allow" that.  I'm basically getting ready to cancel my shopify account and use a different service due to this single issue.  I have no idea why they limit the number of variants, the only thing it does is discourage people from using their service.  I'm beyond frustrated with it.

0 Likes