Re: Need Help to show country_of_origin on email notification?

Need Help to show country_of_origin on email notification?

mohitp
Shopify Partner
2 0 0

Hello Team!

 I am  looking for to add country_of_origin of the Product on email notifications. 
For Ex: Order invoice Notification.

The value is already added on the Product at admin side.

I have try many solution but not succeed.
Try with below code:

{{ line.variant.metafields.custom.country_of_origin }}
{{ line_item.product.metafields.custom.country_of_origin }}

Thanks in advanced!
Mohit P.


Replies 2 (2)

SwiftfromOC
Excursionist
33 1 5

 Hi @mohitp 

 

You can consider trying the below code to see if it works:

 

{% for line in order.line_items %}

 <tr>

   <td>{{ line.product.title }}</td>

   <td>{{ line.quantity }}</td>

   <td>{{ line.price }}</td>

   <td>{{ line.variant.metafields.custom.country_of_origin }}</td>

 </tr>

{% endfor %}

 

I hope this can help.

- Was my answer helpful? Please hit Like or Mark as Solution
- Swift - a powerful solution that helps speed up your store site speed score and convert better.
- Want to get in touch? Contact us | Email us
- Start your FREE trial today.

mohitp
Shopify Partner
2 0 0

Hi, @SwiftfromOC ,

I have already tried this code, not working for me.