Can you list draft orders on a Shopify theme's customer page?

Pistika
Shopify Partner
6 1 8

Is there a way to list draft orders on the customers page of a theme?

Like the full proper real orders in customers/order.liquid but the draft ones?
I haven't seen any mention of this possible in the documentation https://shopify.dev/docs/themes/liquid/reference/objects/customer like a customer.draft_orders instead customer.orders.
Is there any way to list these in the theme without using an app? On separate or even on the same page with a different loop?

Or do we need to find / create an app for this do it async-like?

We have B2B partners that place Net 15 / Net 30 draft orders and sometimes a lot of changes happen to an "order" before finishing up.
Changing line items, shipping cost, shipping / billing address, etc. so we can't use real orders without canceling, duplicating as draft, making an order out of it, then canceling, duplicating, creating again and again, we want to keep it draft as long as possible.
But we also want to list, show these to our B2B partners so they don't get confused and fussy that they don't know what's in their orders and for how much, etc.

Does anyone have any experience with this?

Thanks,
István Solymosi

Replies 2 (2)

greiseve
Explorer
63 1 83

any idea where the draftOrder object is located? it is not listed under the order object, nor in the list of objects, however it is an object!

 

https://shopify.dev/docs/admin-api/graphql/reference/object/draftorder

 

soulchild37
Shopify Partner
163 9 46

Hi István,

Unfortunately Shopify does not expose draft orders object in liquid in the store theme, hence we can't list it in theme directly. However we can retrieve the draft orders using Shopify APIs.

If you are open to using an app for this functionality, I have just made an app for this, the app name is Yagi Draft Order Lister (https://apps.shopify.com/yagi-draft-order-lister)

The app utilizes app block, which you can install easily to your theme without changing any code.

After installing, customers can see draft orders that are assigned to them in their account page :

soulchild37_0-1688672031690.png

 

 

 


Alternatively, the app also provide a separate page which shows draft orders on your store. You can link to this page on your store menu, to make it easier for customer to access as well.

soulchild37_1-1688672031651.png

 

 

soulchild37_2-1688672031609.png

 

 



You can also configure in the app, to only show draft orders that are tagged with specifics tag to customer. (In case you don't want to show Work in Progress draft order to customer)

Hope this helps!

Regards,

Axel Kee

 

Spent too much support time dealing with order cancellation request from customer? Wouldn't it be good if customer can cancel order on their own without bugging your support? Try out Cancellable app! https://apps.shopify.com/cancellable . I also write articles about store customization that can improve your customer shopping experience here : Yagi Software Blog