How do i add metafield for variants?

Hi all, here is the issue im facing, im trying to add filters to my collection page, all has been going well i have been adding using metafields.

I would like to add options for these products to show up in filters for colours and sizes, but as only one option can be applied im so confused

These do not look like variant metafields, but rather like product option values, so should be visible like “product option” type of filter.

If you want to add variant metafields to filter, they should be visible like this:

Hi there! I think the confusion comes from how Shopify handles product options versus storefront filters.

For filters on the collection page, Shopify usually pulls these from product options / variants or from metafields that are enabled for filtering in the Search & Discovery app. If the theme doesn’t support storefront filtering, the filters also won’t appear on the collection page.

The setup in Shopify Search & Discovery:

:magic_wand: Note:

If you also need more flexible option setups on the product page, such as extra choices, add-ons, or custom configurations beyond Shopify’s native option structure, then an app like Avis Product Options can help with that side of the setup.

It works well for extending product options on the product page, while Shopify’s native filters can still handle the collection-page filtering separately.

Hi alxure

I think the confusion here comes from how Shopify handles variants vs metafields when it comes to filtering.

If your products actually have things like different sizes and colours that customers can choose from, the best way to handle this is by using product variants (e.g. Option 1 = Size, Option 2 = Colour). Shopify’s filtering system is built to work with variants, so once those are set up, you can easily add them as filters using the Shopify Search & Discovery app and customers will be able to filter by both size and colour at the same time without any issues.

Metafields, on the other hand, are better suited for additional product information rather than selectable options. While you can create filters from metafields, each metafield will show up as its own separate filter group, and you won’t be able to combine them the same way you might expect with options like size and colour.

So in short:

Use variants for things like size and colour (anything customers choose when buying)
Use metafields for extra details (like material, style, etc.)

If filtering is important for your collection pages, switching size and colour to variants will make things much smoother.

Thanks, and let me know if you still have any query.
Parampreet Singh.