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

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

skyblu
Excursionist
26 0 4

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.

Replies 5 (5)

VladimirS
Shopify Partner
22 5 6

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.

skyblu
Excursionist
26 0 4

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

<th>Qty</th>
<th>Item</th>
<th>SKU</th>
<th>Pick Bin</th>
<th style="text-align: right;">Price</th>
</tr>
</thead>
<tbody>
{% for line_item in order.line_items %}
<tr>
<td>{{ line_item.quantity }}</td>
<td>{{ line_item.title }}
<td>{{ line_item.sku }}</td>
<td>{{ line_item.product.metafields.custom.pick_bin_location }}<td>
{% if line_item.line_level_discount_allocations.size > 0 %}

VladimirS
Shopify Partner
22 5 6

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 😕

skyblu
Excursionist
26 0 4

Yep it looks correct to me, chrome_yHi5YD7iOY.png

skyblu
Excursionist
26 0 4

Anyone else have a solution please?