Filter products by a specific field of a referenced meta object

Hi,

I was wondering if it is possible to create a custom filter (e.g. using the Search & Discovery app) to filter by a specific field of a metaobject, which is connected to a product (via the metaobject reference list field).

Example:

I have a piece of jewellery (the product) with different stones (metaobjects). Each stone has a color, cut, weight, etc. I would like to create a filter that allows the customer to see all products with a stone of a particular color. Likewise, there should be a filter for all cuts of the stones, etc.

Creating different stones as metaobjects seemed like a nice way to keep the data structured.

Current status:

I was able to create a metaobject filter using the Search and Discovery app. Although I can select a particular field of the metaobject, the effect is simply how the filter values are displayed. It is not actually the filed that is being filtered, but only the metaobject as a whole. Therefore, it also only possible to create a single metaobject filter per metaobject reference field.

I hope the goal is clear, please let me know if you had similar issues and how you solved it.

Thanks a lot and best wishes,

Mike

3 Likes

Any further progress with this? Struggling with the same issue. Can reference the metaobject and can see the fields when I try to create a filter, but seem to be able to only select one field to use for the filter.

Hi, unfortunately, we haven’t been able to find a satisfying solution.

What we ended up doing is the following:

  • We created meta-objects for structured data (in our case stones) that are linked with the product
  • We use the meta-objects to display data on the product detail page, but not for the filter
  • Additionally, we created regular product fields for all the data that we do want to filter (e.g. stone color, stone type, etc.)
  • These fields are all multivalued and their only purpose is for filtering

The obvious drawback of this solution is that some data fields have to be managed twice:

  • Once on the product for the filter
  • Once on the meta-object for the structure displaying

You can create a new filter system out of variant metafield or product metafield too. Mostly filters are using product options as filters by default.

If you want an extra filter with a variant metafield.

  1. Install Search & Discovery.

  2. Click Add Filter Button.

  3. Choose a variant metafield as a data source.