Re: How to add custom meta field under collection

Solved

How to add custom meta field under collection

NewtoAllThis
Tourist
7 0 1

Dawn theme - morningragecoffee.com

 

Currently, in the default collection product grid, there is a subtitle for Vendor - which we are using for a flavor description.  This doesn't work well when exporting to other websites as they are looking for brand name in that field.

 

So we created a metafield under products called flavor_description.  We want to replace the vendor field displayed under the product name with the flavor_description metafield.

 

Thanks for any tips

 

NewtoAllThis_0-1659552972556.png

 

Accepted Solution (1)

made4Uo
Shopify Partner
3840 716 1177

This is an accepted solution.

Hi @NewtoAllThis,

 

Please follow the instructions below

 

1. From your Admin Page, click Online Store > Themes >Actions > Edit code
2. In the Snippet folder, open the card-product.liquid
3. Find the {% if show_vendor %},  you will find two codes with this. Both replace the inner part of the code, the code in between the {% if ...%} and {% endif %}. Refer to the code inside the box in the image below

 

made4Uo_0-1659554195295.png

 

 

NOTE: change the metafields.custom.text to the namespace you have for this metafield. Make sure to change product to card_product

<div class="caption-with-letter-spacing light">{{ card_product.metafields.custom.text.value }}</div>

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free

View solution in original post

Reply 1 (1)

made4Uo
Shopify Partner
3840 716 1177

This is an accepted solution.

Hi @NewtoAllThis,

 

Please follow the instructions below

 

1. From your Admin Page, click Online Store > Themes >Actions > Edit code
2. In the Snippet folder, open the card-product.liquid
3. Find the {% if show_vendor %},  you will find two codes with this. Both replace the inner part of the code, the code in between the {% if ...%} and {% endif %}. Refer to the code inside the box in the image below

 

made4Uo_0-1659554195295.png

 

 

NOTE: change the metafields.custom.text to the namespace you have for this metafield. Make sure to change product to card_product

<div class="caption-with-letter-spacing light">{{ card_product.metafields.custom.text.value }}</div>

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free