Dawn theme - metafields not showing up

Solved
Simonas1
Tourist
2 0 3

Hello everyone,

I use the new shopify 2.0 theme "Dawn" and created custom metafield using shopify built in metafields app. I want it to be displayed under main title of every product in grid view, so I placed metafield in product-card.liquid:

Simonas1_0-1630656515578.png


Metafield is not showing up on main page and collection page:

Simonas1_1-1630656515575.png

 

However, it's showing up in product page's recommendation section "You may also like":

Simonas1_2-1630656515581.png

It seems that there's an issue with displaying metafields in this new theme. I did this in Debut theme using the exact same code and it works perfectly there.

Let me know if anyone knows a solution to this issue, thanks!

Accepted Solution (1)

Accepted Solutions
PaulNewton
Shopify Partner
3347 215 642

This is an accepted solution.

Are you sure "product" is the product  you think it is?

Try matching the surrounding codes context and conventions

{{  products_card_product.metafields.my_fields.text }}

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com

View solution in original post

Replies 3 (3)
PaulNewton
Shopify Partner
3347 215 642

This is an accepted solution.

Are you sure "product" is the product  you think it is?

Try matching the surrounding codes context and conventions

{{  products_card_product.metafields.my_fields.text }}

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com

View solution in original post

Simonas1
Tourist
2 0 3

It worked like this: {{ product_card_product.metafields.my_fields.text }}
Thank you so much!

MVUILL
Explorer
46 0 14

Thank you so much!