Hey @Hasan_Mgharbel ,
When an order is edited and a line item is removed or the quantity is reduced, what happens on the Shopify backend is they "refund" those line items (more info here).
The Lineitem Quantity field in the default Shopify order CSV will remain unchanged in this case and it currently doesn't include a column for the refunded quantity.
I'm not familiar with theme development, but I don't think changing the theme code will resolve this since the Shopify default CSV can't be modified.
If you're open to using an app and you just need an order CSV export that excludes removed line items and also to export the current line item quantity, our app EZ Exporter can help with this.
In the app, we have a pre-built template called "Orders Excluding Removed/Refunded Line Items (Last 30 Days)" that already takes care of this and can be customized further.
Unfortunately, Shopify only includes the original items and quantities.
Our Report Toaster app can help with this. You can use the Net Quantity field to represent the quantity after any removals or refunds.
Please feel free to check it out. Chances are you can get by with your free version. Feel free to reach out if you have any questions.
Dive into the world of Print-on-Demand and discover how it can transform your online busin...By Imogen Feb 19, 2024
Discover how to transform your online store into a delightful shopping destination. Learn ...By Ollie Feb 13, 2024