How to add a custom .product metafield to packing slip template

How to add a custom .product metafield to packing slip template

Amir212
New Member
5 0 0

Hi,

I'm trying to add

product.metafields.custom.weight

to my line item description section in packing template manually.

 

The goal is to display the weight of a sold item under its name and picture on the slip.

 

I understand metafields need a loop to be added, tried some of the suggested loops in the forum and it didn't work.

 

Any suggestions please?

Replies 6 (6)

ZenoPageBuilder
Shopify Partner
1052 203 221

You can show the metafield with this code

{{ product.metafields.custom.weight | metafield_tag }}
Zeno Page Builder - Build responsive & SEO-optimized Landing pages, Blog posts, Product pages and more...
Learn more at zenobuilder.com
Amir212
New Member
5 0 0

Thank you for your reply, but it didn't work.

 

From what I read it has to be a loop, but can't get the right loop for this one.

Liam
Shopify Staff
2873 312 821

Hi Amir212,

 

It doesn't look like product metafields are supported on packing slips yet, but I've passed on this request to our internal dev team.

 

Thanks for your feedback!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

hyperborea
Visitor
1 0 1

Any update on this or workaround?

Liam
Shopify Staff
2873 312 821

Hi Hyperborea - there's no update just yet.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Amir212
New Member
5 0 0

Hello,

There're two ways to work around this that worked for me:

1- Adding variants to your products which will show on the packing slips (this worked for me perfectly).

2- Using "Wizard Labs: Invoice Wizard" app which enables you to add metafields to slips, but the only problem was that ALL fields will be displayed and it has very limited customization on the appearance (either display all or none).