Referencing a product metafield on the collection page

Referencing a product metafield on the collection page

jnielsen
Visitor
1 0 0

I've created a product metafield that references a metaobject that I've gotten to successfully display on the product page. However, I'm also looking to have it display in the product block on the collection page. I've been able to make some edits to the product block (below), but I'm not able to have the metaobject value display.

 

I've tried quite a few different iterations and I know I'm missing something, but I'm not sure what I need to add to get the metaobject value to display. Currently, these edits result in "MetaobjectDrop" displaying where I want the value of that metaobject field to show.

 

{%- if product.metafields.custom.promo_offer.value -%}
<div class="product.metafields.custom.promo_offer.value">
{{ product.metafields.custom.promo_offer.value }}
</div>
{%- endif -%}

 

Any help is appreciated!

Replies 0 (0)