Hi! I am developing a order history page.
I want to hide line items (not a order) cancelled via admin.
Are there any way to get the status?
I’m looking at these documents.
- Liquid objects order
- Liquid objects line item
Thanks and kind regards.
Hi! I am developing a order history page.
I want to hide line items (not a order) cancelled via admin.
Are there any way to get the status?
I’m looking at these documents.
Thanks and kind regards.
HI ssff,
It may actually be better to work with Customer Account Extensions instead of customising with Liquid for this purpose, eg by making a full page extension: Add pages to customer accounts
Classic customer accounts that are powered by Liquid templates will eventually be deprecated, although there is no public timeline for this yet.
Hi Liam! Thank you for your reply.
We are planning to migrate to Customer Account Extension, but we need to proceed with development on this page for now.
If we cannot obtain the value, we are considering ways such as adding a metafield to the order.
Hi, ssff
In your line items array, you can check your line item quantity . the removed line items should be 0,if quantity is 0 , then you can hide that one.
what do your think of it ?
Hi Eric, thank you. I tried the quantity of the line item, but the quantity did not become 0 even for the deleted items.
sorry ssff .
the above answer is not correct .
I figure it one workaround for this
When you delete an item in the Shopify admin, you can add a special property or note (the format should be defined later you liquid will access and compare )to the order to specify which item was deleted. In your Liquid code, you can compare the order.note
or order.attributes
to check if your line items have been deleted. what do your think of it ?
@Eric_Han
It looks like it can be implemented that way. Thank you.