All things Shopify and commerce
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.
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.
<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 %}
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 😕
Yep it looks correct to me,
Anyone else have a solution please?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024