Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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.
Solved! Go to the solution
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>
And add this code before the </div> close tag
<div class="rrp"> Retail price: {{ card_product.metafields.custom.rrp }} </div>
Result:
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
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
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>
And add this code before the </div> close tag
<div class="rrp"> Retail price: {{ card_product.metafields.custom.rrp }} </div>
Result:
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
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
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
You're amazing! Thank you so much
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024