How to retrieve all products referencing a metaobject?

Hello,

I have set up some metafields and metaobjects for our webshop.

my metaobject ( part codes )

  • title

  • code

  • color etc.

my product metafield ( type is metaobject referencing to the part codes metaobject from above)

  • example metaobject part codes : 122548

when I go to the metaobject entry of 122548 there is a visible list of every product referencing to this specific metaobject. There are multiple products referencing to the same metaobject.

My question is how to retrieve this list? I am not able to find anything in the docs. Can someone point me in the correct direction or show some code to get this to work? I know it is not posible to query the products and filter those on a metaobject inside a metafield. Therefor I was hoping this list that is visible in the admin panel is also possible to retrieve inside a storefront liquid page?

Thanks in advance.

2 Likes

I am looking for the same solution too. Did you happen to find a solution for this :slightly_smiling_face: Using the category metafield to try crating swatches on an older theme