A merchant using the Craft theme wants to hide unavailable product variants (frame sizes) from dropdown menus, rather than showing them crossed out. Currently, when customers select a frame type, they see a long list of sizes with many marked as unavailable, creating confusion.
Initial Code Solution Attempted:
A community member provided JavaScript code to add to theme.liquid above the </body> tag
The original poster reported this code didn’t work for their setup
One responder offered to examine the issue via collaborator access, but no follow-up resolution was posted
Alternative Solutions Suggested:
Multiple app recommendations were provided: Easify Product Options, Stamp – Collection Variants, and Inkybay – Product Personalizer
These apps offer conditional logic to show only relevant sizes based on frame type selection, with no-code setup
Apps can hide out-of-stock options entirely rather than crossing them out
Final Outcome:
The original poster hired a developer from Upwork for approximately £50 to implement a working solution
They indicated none of the suggested code snippets worked
Other users expressed similar needs, with the discussion remaining open for those seeking code-based solutions
Summarized with AI on October 24.
AI used: claude-sonnet-4-5-20250929.
I have to lists of variants - frame type and frame size. Some frames come in different sizes from others so when a customer selects the frame type I only want the relevant sizes to be in the ‘size’ dropdown.
Currently it has a long list of sizes with loads of them crossed out, but I would like the crossed out sizes to be hidden so it’s tidier and less confusing.
Could anyone advise what code would work for this and where to put it please? My theme is craft. Thank you
I recommend using Easify Product Options! It’s a no-code, easy-to-use solution that lets you show only the relevant frame sizes based on the selected frame type and automatically hide unavailable options. This keeps your size dropdown clean and user-friendly—no more crossed-out options! Here’s how it works:
To ensure that when a customer selects the frame type, the relevant sizes to be in the ‘size’ dropdown—you just need to enable Conditional Logic in the Advance Settings and set it like this:
Also, if you want the crossed out sizes to be hidden so it’s tidier and less confusing, you can go to Setting in the Easify app, and set the Out-of-stock options to Hide options.
Third-party apps make it easy to separate variants. I own the Stamp – Collection Variants app , and we help merchants display variants separately on the collection page and home page. You can customize the settings per collection to show or hide specific variants, filter variants, or separate them by specific options. For example, you can create a “Gold” collection and display only gold-related variants.
I hope you are doing well. Since you want to display relevant frame sizes based on the selected frame type, you can try Inkybay – Product Personalizer app.
Using Inkybay’s product option feature, you can create options like image swatches, text fields, file uploads, etc., and show them as dropdowns, radio buttons, or checkboxes.
For your product, first, you need to create frame type options. Then create the relevant frame size options as a child of each frame type. This way, when a customer selects a frame type, they will only see the sizes available for that type. No space for crossed-out sizes because you will be able to add sizes as per your preference.
No coding is needed, and setup is simple. You can try Inkybay’s free 21-day trial to explore this feature and see it in action. If you like, we can also share a demo product with you.
Here is the result when the first frame type is selected:
When the Second frame type is selected, the available size for the First frame type is hidden, and only the available size for the selected frame type is shown.