3
votes

In shopify admin panel ( settings > notifications > Email templates ) it allows you to edit the email sent to my distributor with order information on it like : address, price and the SKU to send that customer. I am trying to add the Barcode UPC to the email template as well.

This is the .liquid code for the SKU

 (sku: {{ line.sku }})

Here is a link to the email variable reference guide but I cant find one for the barcode, any ideas?

http://docs.shopify.com/manual/settings/notifications/email-variables

3
You can inject custom attributes but I don't believe they can be images.Patrick
Oh sorry, not the actual barcode, but just the upc #nick

3 Answers

2
votes

Shopify customer support answered my question. {{ line.variant.barcode }}

1
votes

So, one of the options would be to set a cart attribute, which you could then output in the email.

Here's a link to setting cart attributes, but in your case you'd probably want the input to be hidden (since the customer doesn't need to type anything in).

It's a bit of a hack, but the alternative is using an app with a webhook to generate a UPC and send it.

http://docs.shopify.com/manual/configuration/store-customization/communicating-with-customers/obtain-information/ask-customer-for-more-information

1
votes

You could store the upc in an unused product field (e.g. vendor) and then output this field in your email template {{ line.vendor }}.

If there are no unused fields available then you can store the upc in a metafield and output this metafield in your email template:

{{line.product.metafields.some_namespace.your_key}}

Here is the documentation for metafields: metafields

Where is the upc currently stored?