I wrote a script earlier to filter orders on which discounts were applied? $ from_date = date("Y-m-d", strtotime($_REQUEST['from_date'])) ...
protected function _prepareCollection() { $collection = Mage::getResourceModel( $this->_getCollectionClass()); ...
You can also filter by order status and for a certain date period. Was my answer helpful? You can accept it as a solution.
Filter: A: Orders we count; B: Order has coupon applied? (Coupon/No coupon) = Coupon. Coupon acquisition customer or ...
$productIds = array(1,3,2); /** * Build up a case statement to ensure the order of ids is preserved */ $ ...
To get all order collection with filters, go to the following path Mageplaza/ HelloWorld/Block/Orders.php and create an Orders.php file.
The standard Magento 2 Orders Grid consists of 19 columns, which
You won't only be able to see the coupon code in the order grid, you can use the Coupon Code Filter and easily find orders with discounts.
At best, totals collection would execute in around 1.2s when coupons were at play.
(Statistics collection for the Reports module is disabled by default.