I’m working on a Magento 2 project where I need to display custom reports under the order grid on the Sales Orders page. Specifically, I want to show the following fields:
- Total (totals sum)
- Subtotal (subtotals sum)
- Shipping (shipping sum)
- VAT (VAT sum)
- Quantity (quantities sum)
- Number of Orders
- Number of Canceled Orders
Initially, I attempted to achieve this using an observer, but I faced difficulties in accessing the filtered orders collection or the underlying query.
Now, I’m considering implementing a solution using a plugin. Could experienced Magento developers provide guidance on how to tackle this problem effectively? Any insights or alternative approaches would be greatly appreciated.
Feel free to ask for further clarification if needed. Thank you!