Getting country of origin on product pages

George_Greenhil
Explorer
58 0 23

From Shopify is there a way to get the 'country of origin' from a product backend to display on a product page using liquid tags?

For example you can get a barcode to display by adding: {{ product.variants.first.barcode }}

I have tried adding the following for the 'country of origin' but can't get it to display on the product page, it just displays nothing at the moment:

  • {{ variant.country.of.origin }}
  • {{ country_code_of_origin }
  • {{ line_item.country_of_origin }}

Help is very appreciated.

0 Likes
Mircea_Piturca
Shopify Partner
1462 39 285

Hey,

There is no country_of_origin field on the product, you can see what is available here: https://shopify.dev/docs/themes/liquid/reference/objects/product

You can assign this value as a Metafield and output it in the product page, or just add it into the product description.

This should help getting on with Metafields: https://www.shopify.com/partners/blog/110057030-using-metafields-in-your-shopify-theme

Finally—Add variant descriptions to your products
0 Likes