Add product Metafield to order confirmation email

Topic summary

Goal: show a product metafield (item_location) beneath each product line in the Shopify order confirmation email.

Context: Notification emails primarily use the order object (data for the placed order). The requested data lives on the product object as a metafield (a custom field attached to a product).

Key developments:

  • Initial claim: product metafields can’t be accessed from the order confirmation because it uses the order object.
  • Correction: it is possible by customizing the order confirmation Liquid template. A modified template was shared (code is central here), implying metafields can be output if referenced correctly.

Current status:

  • After applying the shared template and renaming the metafield, the value did not appear in a test order.
  • A brief follow-up suggests that a specific “line” reference is important (likely indicating the need to reference data within each line item), but no concrete fix was provided.

Outcome: No confirmed working solution yet; discussion remains open. Open question: the exact Liquid scope/path needed to output the product metafield for each line item within the order confirmation template.

Summarized with AI on January 1. AI used: gpt-5.

@ccanning ,

Order confirmation mail use order object which don’t refer to your product object therefore you can’t access product metafield here.

However it’s feasible by doing some tweaks in theme files, let me know if you are interested to work on it.

1 Like