We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Send additional properties about the product along with order items

Send additional properties about the product along with order items

kanagavela
Shopify Partner
3 0 0

Hi All,


We are currently building our storefront using the Hydrogen framework and would like to pass some additional information at the line item level in our Shopify store.

 

To achieve this, we are adding custom data under line item properties, which is later consumed by our internal order maintenance system via Shopify webhooks and GraphQL queries.

 

However, we’ve noticed that these properties are displayed on the Shopify checkout page under each product, which is not desirable as the data is intended solely for internal processing. Since Shopify does not allow customization of the standard checkout page, we’re exploring alternative approaches.

 

Our main requirement follows:

  • The custom data should be attached to the order (at the item level),
  • It should be retrievable through webhooks and GraphQL,
  • But it should not be visible to the customer during checkout.

Is there a recommended approach or workaround for this?

Reply 1 (1)

PaulNewton
Shopify Partner
8031 685 1646

Hi @kanagavela 👋 just make the line item properties private by prepending the property name with and underscore

e.g. properties[_hiddenPropertyName]

https://shopify.dev/docs/api/liquid/objects/line_item#line_item-properties

 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org