How can I display a product metafield on the order summary page?

Topic summary

Core Issue:
Users need to display product metafields (like item numbers, warehouse locations, or brand names) on order summary/admin order pages in Shopify, not just product pages.

Recommended Solution:
Add metafield values as line item properties when products are added to cart. Use an underscore prefix (e.g., _Modellnummer) to hide properties from customers while keeping them visible to store admins.

Implementation Details:

  • In product template: Create hidden input field with name="properties[_PropertyName]"
  • Assign metafield value to this property using Liquid code
  • Access on order page via line_item.properties
  • Reference: Shopify’s line_item object documentation

Common Pitfalls:

  • One user initially failed because they never assigned a value to the property field
  • With newer Shopify themes (Horizon family), implementation may require JavaScript to properly capture form IDs

Status:
Original question resolved. Multiple follow-up users seeking similar solutions for different metafield types (warehouse locations, brand names). Discussion remains active with ongoing requests for implementation help.

Summarized with AI on October 24. AI used: claude-sonnet-4-5-20250929.

I’ve not been able to find a working answer for me. In my store I have a product metafield for item number needed internally for documentation. I need to show this number on our order summary, I can display it on product page without problem but how do I do it on order page? Are you required to be on the plus plan? I’m not afraid to code but need to know what and where to put the code or atleast a hint

Hi,

Simple, add the metafield value as a line item property for that product. Hint, if you do not want the customer to view that property, use _ before the line item property name.

Ref: https://shopify.dev/api/liquid/objects#line_item

So I’ve tried adding this code but it’s still not working. Feels like I’ve just missed something but can’t figure out what. Thank you for helping

In product-template

{% form ‘product’, product %}

{% endform %}

In customer/order under line_item.title in the for loop

{{ line_item.properties(‘Modellnummer’) }}

To add to this I realized you might need that label too as in the example code in your reference but struck out on that one aswell

Hi Xythia,

This should do the trick:


1 Like

Yes, already figured it out. Was a bit angry with myself when I realized the reason I got no value was because I never assigned one :slightly_smiling_face:

Thank you for your help

I am customizing the Refresh Theme and would like a Product metafield I created called “custom.known_issues” to show up as a product line item on the admin order page (not for the customer to see! But for us to do quality checks when we pull the order).
I read your reply to Xythia but need more assistance. Where/how/what? :wink: Thank you in advance for any help you can provide!

Hi Amandaatremix,

You do not need metafield for this. Just use product line properties to achieve this.

If you need more assistance, you can PM me.

Thanks.

hello @jazz-jay I have a custom product meta field called Warehouse Location. Can you help me show this meta field to admin order page? I am ready to make code changes if required.

Can you please help?

It helps only to display metafield on product page. How to save this metafield to order metafield?

With the new shopify design, can this be achieved? I have products that each have a metafield called brand, is there a way I can display this metafield in each item of the checkout > order summary item list? I do not want to add the brand to the actual Product name.

Same stuff – add a line item property based on this MF to each line item added to cart and it will be shown at checkout.
With Horizon family (if this is what you mean by “new Shopify design”) it maybe a bit difficult to get the form ID, so may need a bit of Javascript to implement.