New Shopify Certification now available: Liquid Storefronts for Theme Developers

reference the metafield data from a products metafield, in a different products metafield?

Wysong
New Member
7 0 0

This is pretty convoluted, so I'm assuming no, but can you reference the metafield data from a products metafield, in a different products metafield?

 

So I have "product-a", and I enter something in "metafield-1" for that product.

Then I go to "product-b", is there a way to reference/pull the data I entered in "metafield-1" for "product-a" in "metafield-1" for "product-b"? (or any metafield really...)

 

 

 

 

Reply 1 (1)
MetafieldsGuru
Shopify Partner
157 32 90

Hi @Wysong ,

 

Sadly, it's not possible to directly access metafields of a different product in Liquid. However, you can link those products using a product_reference metafield. As the result, you'll be able to retrieve the related product object and then access its metafields.

Check out Metafields Guru, the #1 ranked metafields app.

Bulk editor | Data import/export | Metafield sets | Browser extension