Add custom line items to order email confirmation

Justinpwoods
Shopify Partner
7 0 0

Hey all,

 

i'm looking to add custom lines on the product order in the emails. 

 

Color Name

Color Code

Color Image

These aren't coming through for obvious reasons but i'm not sure what tag to use to include them.

I'm creating my email confirmation 

 

Screenshot 2024-05-14 at 09.04.16.png

 

Screenshot 2024-05-14 at 06.39.39.png

Reply 1 (1)

JoesIdeas
Shopify Expert
2265 207 599

Identify first what fields those are (line item properties? metafields? etc).

 

Then check the variable reference to see how you can display those fields.

 

For example, if they're metafields (like if you use a metafields app to show those custom fields), you could do something like this:

 

<p>Color Name: {{ line.product.metafields.NAMESPACE.KEY }}</p>

 

NAMESPACE = the name of the namespace of that metafield, example "color_options"

KEY = the key of the metafield, example "color_name"

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Deal with Fraud / Chargebacks