How to display custom metafields in Order Printer app?

How to display custom metafields in Order Printer app?

Darren-Bull
Excursionist
13 0 1

Hello,

 

I am sure this must be a common requirement but I can't find an answer.

 

I have a custom metafield to allow us to input a customer's PO Purchase Order number against their order. How do I display this for printing using the Order Printer app?

 

Regards,

Darren. 

Replies 21 (21)

Kolybel
Visitor
2 0 0

check this @Martinp reply 

 

tip: use metafields.XXX.value  , don't contain the namesapce

Darren-Bull
Excursionist
13 0 1

Hello,

 

Thank you for your message however I have tried your suggestion and this still doesn't work with the templates within Order Printer app.

 

Kindest regards,

Darren.

Todd_Baxter
Tourist
7 1 1

Thanks, this post helped me figure out how to get this to work. For reference, you have to look in your Shopify settings for the name of the Metafield you created. For our site, we created a Product Metafield named Style and were able to display this value using line_item.product.metafields.style.value

 

In that example, the style text was the Metafield value and we wanted it to display at a line item level.

 

 

JayMoss
Visitor
1 0 0

Thanks Todd,

You helped us fix this issue. 

To everyone else, the code above worked for us to display our Metafield - Bin number.

 

{{ line_item.product.metafields.YOURMETAFIELDNAMEHERE.value }}

Darren-Bull
Excursionist
13 0 1

Whilst I can output a Product MetaField, I still haven't managed to output an Order MetaField?

 

I have tried the following and it doesn't work.

 

{{ order.metafields.YOURMETAFIELDNAMEHERE.value }}

 

Any clues?

 

Any clues?

BecB
Tourist
13 0 1

Hi 0hM3N05Y40Hi,

 

Are you getting anywhere with this? I am having the same issue. 

 

I have a delivery date metafield on my orders, and when I try and call it in order printer with

 

{{ order.metafields.custom.delivery_date.date | date }}

 

I get an error "Liquid error: wrong number of arguments (given 1, expected 2)"

 

If I just use 

 

{{ order.metafields.custom.delivery_date.date }}

 

it returns nothing even though there is a value in the field.

 

Arrghh!

Jack of all trades master of none...
Shivam_Chawla
Shopify Partner
3 0 1

Hi BecB ,

 

Any luck on fetching order metafield in order printer app template?

 

 

 

BecB
Tourist
13 0 1

Unfortunately not. I found this note at the bottom of a page I've just researched...

 

 

Which says:

 

This example only applies to Shopify's internal notification templates. If you want to use the Order Printer app, metafields will not be available, so another approach is needed - please see this article from Shopify

 

So it would appear it is not possible at the moment. Not exactly sure why though 😫

Jack of all trades master of none...
Galmis
Shopify Partner
35 0 11

It's really unfortunate that order metafields cannot be used in the Order Printer. Does anyone know an alternative app that would offer this functionality?

Admin_bbh
Tourist
9 0 10

Did this work in Order Printer Pro? 
It doesn't work for me, and i just read an article from Order Printer Pro saying that they don't support metafields 😞 
Any work around?? 

 

joshm
Visitor
1 0 0

Looks like order printer doesn't support metafields.  However, if you use the Shopify packing slip template, you can access metatfields there.  Go to settings/ shipping and delivery /packing_slip_template, then edit.

JC92300
Shopify Partner
1 0 0

Did someone find a solution in order to add a order metafield to Order Printer ?

BecB
Tourist
13 0 1

Hi, I gave up and never tried again. I take it that it's still not working?

Jack of all trades master of none...
Galmis
Shopify Partner
35 0 11

I couldn't find a solution to this problem. So, I decided to fix it in my app - Serializer Product Tracking. The app can access order metafields and provides basic invoice printing functionality using a static liquid template behind the scenes. The template isn't customisable yet, but I hope to finish this feature soon (this summer). It should provide similar capabilities to the Order Printer + access to custom Order metafields.

Koennn
Excursionist
22 0 29

 This would be really appreciated. We store important info in the Order metafields, and it would be extremely useful to be able to print this data via Order Printer. 

maagedmazyek
Visitor
2 0 1

Would be super helpful!

maagedmazyek
Visitor
2 0 1

just had a chat with the customer support, does not sound promising:

 

 

12:24 PM | <CustomerSupportName> from FORSBERG+two: I see you want to incorporate order.metafields in your template. However, I'm afraid it is not possible as our apps do not support accessing Metafields associated with Shopify Orders, Products, or Customers.

12:24 PM | My Name: Hi <CustomerSupportName>

12:24 PM | <CustomerSupportName> from FORSBERG+two: For a more detailed explanation of this, you may see our article here: https://help.forsbergplustwo.com/en/articles/6010415-metafields-support#

12:25 PM | <CustomerSupportName> from FORSBERG+two: I know that this is not the answer you are expecting to hear, but I hope it makes sense.

12:25 PM | My Name: thank you for your reply

12:25 PM | My Name: that's a bummer really...

12:25 PM | My Name: I understand..

12:25 PM | My Name: any workaround?

12:27 PM | <CustomerSupportName> from FORSBERG+two: Unfortunately, at the moment, there is no alternative workaround available, but of course, our apps would love to incorporate it if it becomes possible in the future.

12:28 PM | My Name: ok.. well then this is a showstopper

12:28 PM | My Name: thank you for your time <CustomerSupportName>

BecB
Tourist
13 0 1

Is there somewhere we can ask for it to be included in the Shopify update roadmap perhaps? Then we could all vote for it...

Jack of all trades master of none...

Koennn
Excursionist
22 0 29

Was Order Printer always developed by Shopify? I thought it was a third party app, but I just saw the developer is Shopify. Maybe Shopify acquired Order Printer? If so, maybe this could something for the availability of Metafields?

Galmis
Shopify Partner
35 0 11

Hello! Sorry for the delay. 

 

I'd like to announce that I've finally added customisable Order Printer functionality to the "Serializer - Product Tracking" app. The printer supports order metafields. 

GetTrimOfficial
Visitor
3 0 0

Ive seen that shopify has added an official birthdate metafield if you go to add customer metafield and type birth/date it auto populates the rest for you with customer.metafields.facts.birth_date. However, I still can't display a birthdate on order printer or shopify packing slips. Does anybody have the code to display the birthdate (Yes ive manually added it for the test example) and the metafield displays 1 customer recorded. Thanks