Venue theme product cards not displaying metafields.

Venue theme product cards not displaying metafields.

robinthebest
Tourist
8 0 3

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
11028 2160 2306

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>

- Solved it? Hit Like and Accept solution!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

tim
Shopify Partner
3931 401 1447

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