Hide unavailable variants in craft theme

Topic summary

Issue: Hide unavailable product options in the Shopify Craft theme when a product has two option dropdowns (type and size) with type-specific sizes. The merchant sees “unavailable” options and an app (HiVar) didn’t help; they also wonder if their variant setup (grouped by style, then sizes per style) is wrong.

Proposed fixes:

  • Theme edit: In product-variant-options.liquid, conditionally render option values only when available using a Liquid check (if value.available), so out-of-stock combinations don’t show.
  • App alternative: “Stamp – Variants on Collection” can hide out-of-stock or imageless variants on collection (category) pages and allows manual hiding; includes a video guide. Note: This targets collections, not necessarily the product page dropdowns.

Context/terms: Liquid is Shopify’s templating language; variants are option combinations; collections are listing pages.

Open questions/status:

  • No confirmation yet that the Liquid change works in Craft or that the file path matches this theme’s structure.
  • The correctness of the current variant setup wasn’t addressed.

Next steps: Try the Liquid availability condition in the theme, verify Craft’s specific template file, and clarify whether hiding is needed on product pages, collections, or both. Images and a code screenshot were shared for reference. The discussion remains unresolved.

Summarized with AI on December 11. AI used: gpt-5.

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:

Is there a way to hide the ‘unavailable’ options?

I’ve tried using the HiVar app but it doesn’t seem to work

I have tried many a recommendation on this and it still isn’t working so I’m wondering if I’ve uploaded my variants wrong?

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.

Thanks

Hello

Add condition under product-variant-options.liquid file
{% if value.available %}
{% endif %}

Hi,

With Stamp – Variants on Collection, you can easily manage what shows in your collections.
If a variant is out of stock or doesn’t have an image, you can hide it with one simple setting.
And full control, you can manually hide specific variants in any collection with just one click.