Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Goodday everyone,
I have to add the barcode and other info to the default packing slip on Shopify.
refering to this post
I edit the code as following
(line 125,126, 132, 133)
but it shows nothing on the packingslip
our metafields register as below
How could I display these mefields data on the packing slip?
Solved! Go to the solution
This is an accepted solution.
Hi @Lin_RelationsJP,
Sorry for the confusion, I checked it again and Shopify doesn't support this. Refer: https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/packing-slips-vari...
You can try contacting Shopify directly for this. Refer https://help.shopify.com/en/questions#/contact
Hope it helps!
What you could do is @import the Google Font Barcode font. And add font class to the css. Also, there is builtin barcode metafield. By default, it mirrors the sku.
https://fonts.google.com/specimen/Libre+Barcode+128+Text?query=barcode
Hi @Lin_RelationsJP,
You can try the following code:
line_item.variant.metafields.custom.barcode
Then check the product variant has successfully added metafields, if everything is correct, it will display fine.
Hope it helps!
Hi LiExtension,
Thanks for your reply,
but I already tried the same code at line 133,
and it didn't work out.
Do you have another solution?
Hi,
thanks for your reply,
but I'm not only adding the barcode but also other info I registered at metafields.
Do you have other suggestions?
Try this:
{{ line_item.variant.metafields.custom.barcode }}
instead of
{{line_item.variant.metafields.custom.barcode}}
The difference between NE code and SKU and Barcode is the space between text and curly brackets.
Dear AlohaAkahai,
I added the space to lines 125, 126, 132, and 133,
but everything stayed the same.
assuming it only read the product's data and doesn't read the metafields data.
Do you have other suggestions?
This is an accepted solution.
Hi @Lin_RelationsJP,
Sorry for the confusion, I checked it again and Shopify doesn't support this. Refer: https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/packing-slips-vari...
You can try contacting Shopify directly for this. Refer https://help.shopify.com/en/questions#/contact
Hope it helps!
What @LitExtension actually said that Shopify doesn't generate barcodes out of the box.
Here is some more info for you, https://community.shopify.com/c/technical-q-a/adding-custom-meta-fields-to-packing-slip/td-p/1332362
Check this out. https://community.shopify.com/c/technical-q-a/adding-custom-meta-fields-to-packing-slip/td-p/1332362
Scroll down and read @basilkhan comment.
You can also try our order related documents app, you can build a packing slip with drag & drop designer, it has a barcode line item field too, we are working on adding a metafield component for the line items
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024