Add meta field product card

Solved

Add meta field product card

xeliporit12
Excursionist
12 0 1

I want to add this meta field under product card with "Retail price". Like "Retail price: $120"
How can I do this?
I'm using Dawn theme.

NebulaKing742_0-1723908707659.png

 

Accepted Solutions (2)

BSSCommerce-B2B
Shopify Partner
1341 360 420

This is an accepted solution.

Hi @xeliporit12 ,

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file card-product.liquid. 
Step 3. Find  this code  <div class=”card-information” >…</div>

BSSCommerceB2B_0-1723909477617.png

And add this code before the </div> close tag

 

<div class="rrp"> Retail price: {{ card_product.metafields.custom.rrp }} </div>

 

BSSCommerceB2B_1-1723909486485.png

Result:

BSSCommerceB2B_2-1723909516066.png

If it helps you, please like and mark it as the solution.

Best Regards

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


BSS: B2B Wholesale Solution | BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

View solution in original post

BSSCommerce-B2B
Shopify Partner
1341 360 420

This is an accepted solution.

@xeliporit12 , change the code like this

{% if card_product.metafields.custom.rrp %}
  <div class="rrp"> Retail price: {{ card_product.metafields.custom.rrp }}</div>
{% endif %}

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


BSS: B2B Wholesale Solution | BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

View solution in original post

Replies 4 (4)

BSSCommerce-B2B
Shopify Partner
1341 360 420

This is an accepted solution.

Hi @xeliporit12 ,

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file card-product.liquid. 
Step 3. Find  this code  <div class=”card-information” >…</div>

BSSCommerceB2B_0-1723909477617.png

And add this code before the </div> close tag

 

<div class="rrp"> Retail price: {{ card_product.metafields.custom.rrp }} </div>

 

BSSCommerceB2B_1-1723909486485.png

Result:

BSSCommerceB2B_2-1723909516066.png

If it helps you, please like and mark it as the solution.

Best Regards

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


BSS: B2B Wholesale Solution | BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
xeliporit12
Excursionist
12 0 1

Thanks it worked but I just want to show it if it has value, some product i don't add this metafield. Like the last product

NebulaKing742_0-1723911024772.png

BSSCommerce-B2B
Shopify Partner
1341 360 420

This is an accepted solution.

@xeliporit12 , change the code like this

{% if card_product.metafields.custom.rrp %}
  <div class="rrp"> Retail price: {{ card_product.metafields.custom.rrp }}</div>
{% endif %}

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


BSS: B2B Wholesale Solution | BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
xeliporit12
Excursionist
12 0 1

You're amazing! Thank you so much