How to add a metafield (pick bin) to my invoice on Order Printer

Topic summary

A user is attempting to display pick bin location information on invoices generated through Shopify’s Order Printer by adding a custom metafield to the invoice template.

Attempted Solution:

  • Another user suggested adding {{ line_item.product.metafields.custom.your_metafield_name }} within the line items loop
  • The original poster implemented this as {{ line_item.product.metafields.custom.pick_bin_location }} in their template code

Current Status:

  • The metafield is not displaying on the invoice despite correct implementation
  • The namespace and key have been verified as correct in Settings > Custom data > Products (confirmed via screenshot showing “custom.pick_bin_location”)
  • The helper who provided the initial solution has run out of troubleshooting ideas

Outcome:
The issue remains unresolved, with the original poster requesting additional assistance from the community.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

I am looking to add a line to my invoices showing the pick bin number so that we can do everything form one piece of paper.

How do I add the metafield that I have created to the invoice?

We are using Shopifys Order Printer for our invoices.

1 Like

Can you try adding {{ line_item.product.metafields.custom.your_metafield_name }} to your invoice template, somewhere inside the loop over line_items? I just tried and it worked for me.

I added in below but it is not showing the location.

Qty Item SKU Pick Bin Price {% for line_item in order.line_items %} {{ line_item.quantity }} {{ line_item.title }} {{ line_item.sku }} {{ line_item.product.metafields.custom.pick_bin_location }} {% if line_item.line_level_discount_allocations.size > 0 %}

Can you double check that the metafield namespace and key is right? It’s in Settings > Custom data > Products > your metafield name, the field “Namespace and key” should be “custom.pick_bin_location”. If it’s correct then I’m out of ideas :confused:

Yep it looks correct to me,

Anyone else have a solution please?