Metafields Order Invoice - Product line item

Hello,

I cannot find a way to display product line item level metafields in Order, Invoice, Shipping or any view other than the product theme view. Our theme is Dawn 2.0.

This seems so fundamental. We are not programmers, so would like to try to keep it simple to the extent practical.

Any recommendations?

thanks,

Jeff

Hi Jeff,

Sasha here from Metafields Guru team.

Once a product is being added to a shopping cart, it transits into a completely different object - it becomes a “line item” object instead of the “product” object.

  1. product object reference;
  2. line item object reference.
    Since those two are completely different entities, you can’t access a product/variant metafields (or any other data) from within the line item.

Frankly, I’m not a theme customization expert, but in my opinion the best solution to this problem is to use a Shopify tool called “custom line item properties”. If you’d like to learn more about the line item properties, you may want to check out these Shopify tutorials:

  1. This one describes the theme customization process, explains some really important basics and so on;
  2. This one contains examples of all the available custom line item properties.

Basically, what you need to do is to populate a hidden (a or a

, for instance) field used as the data source of the line item property with the desired metafield’s value and this should do the thing. By the way, I managed to find a Shopify support thread covering a very similar topic.

If you feel uncomfortable with customizing your theme and would like to have someone to do it for you, you may want to consider hiring a Shopify expert and delegating the job to this person. These guys are Shopify approved developers and are really good at implementing various custom solutions. Having a freelance tech person is a common practice for Shopify store owners who don’t need an in-house developer but would like to have some tech help occasionally.

Hope this helps!

Best regards,

Sasha Kachkovskyi

Co-founder and CEO

256 Development

1 Like

Hi Jeff,

I was having this same issue and couldn’t find a definitive answer anywhere. I have come up with a solution though that I posted here:

https://community.shopify.com/c/shopify-apps/order-printer-metafield/m-p/1694346/highlight/true#M53256

Please do contact me if you want help with implementation.