Liquid, JavaScript, themes, sales channels
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
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
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 :
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.
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
User | RANK |
---|---|
38 | |
29 | |
13 | |
11 | |
8 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023