A Shopify merchant using the Craft theme seeks to hide unavailable variant options from dropdown menus. Their products have two variant levels (item type and size), where different item types require different sizes, creating many “unavailable” combinations that clutter the interface.
Attempted Solutions:
The HiVar app was tried but didn’t work
Two community members provided custom code solutions:
One suggested adding JavaScript to theme.liquid above the </body> tag
Another provided more extensive JavaScript for the global.js file to dynamically hide invalid variant combinations
Neither code solution successfully resolved the issue
Current Status:
The merchant questions whether their variant structure is set up incorrectly. They’ve organized variants by grouping styles first, then adding applicable sizes to each style. A screenshot shows their variant configuration in the Shopify admin.
The discussion remains unresolved, with another user recently commenting they face the same issue with the Craft theme, suggesting this may be a broader compatibility problem.
Summarized with AI on October 30.
AI used: claude-sonnet-4-5-20250929.
Is it possible to hide unavailable variants with the Craft theme?
I had my shop built for me, but I’m struggling with this one issue mostly.
A lot of my items have two drop down options. One being type of item and the other a size guide. Different types of items need different sizes. You can see what I mean in this photo:
still trying to solve this. I’m wondering if I’ve just set up my variants incorrectly as I’ve tried all the options I can find on here and youtube and still no success
I’ve grouped them by style then added the size variants that apply to each style. Is this incorrect? I’m really stumped and just want a smooth running and cohesive store.