What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Oder Line Item & Selling Plan

Oder Line Item & Selling Plan

araskavakli
Tourist
6 0 2

Hi,

Does SellingPlan attribute not exist in OrderLineItem in Storefront API? Without it, how do you build a headless customer account page and show an order that's a subscription?

Thanks.

Replies 2 (2)

Liam
Community Manager
3108 344 895

Hi Araskavakli,

 

Currently he SellingPlan attribute is not directly available in the OrderLineItem object. However, you can still retrieve information about subscriptions from an order using the customAttributes field in OrderLineItem which may contain details about the subscription.

 

To build a headless customer account page that shows an order as a subscription, you would have to rely on these customAttributes or on your own server-side logic to track and display subscription information.

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

araskavakli
Tourist
6 0 2

Hi Liam. Thank you for your reply.

Do OrderLineItem and CartLineItem share the same custom attributes? And does that mean the custom attribute of the OrderLineItem gets CartLineItem's custom attributes automatically? If that is the case, how do we change the custom attribute if the customer let's say decides to change its delivery frequency from "every 2 weeks" to "every 4 weeks"?