Venue theme product cards not displaying metafields.

robinthebest
Visitor
1 0 0

When i added the below code into dawn theme, it displays the right info in the collection product card right under the prices.

 

 

<span class="caption-with-letter-spacing light">
  <p style="display: inline;">{{ card_product.metafields.custom.region_for_frontend | metafield_text }}, </p>
</span>
<span class="caption-with-letter-spacing light">
  <p style="display: inline;">{{ card_product.metafields.custom.country_for_frontend | metafield_text }}</p>
</span>

 

 

However the same code couldn't display the same info in the Venue theme, it blanks, however if I just type TEXT in the places i placed the code, the info displays, please enlighten me, thank you!

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
7726 1504 1511

Hi @robinthebest 

 

You can try to update your code to this and check again 

<span class="caption-with-letter-spacing light">
  <p style="display: inline;">{{ product.metafields.custom.region_for_frontend | metafield_text }}, </p>
</span>
<span class="caption-with-letter-spacing light">
  <p style="display: inline;">{{ product.metafields.custom.country_for_frontend | metafield_text }}</p>
</span>

- Helpful? Like and Accept solution or Buy me a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

tim
Shopify Expert
3466 280 1286

Dawn passes current product into product card snippet as card_product and this is what your code uses. Other themes may use different variable, hard to tell without seeing the theme code.

Try product to start with...

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com