2

Looking at the dashboard, I see the "Average Orders" value on the left side. I want to exclude orders from that calculation. Where do I have to look to make that change?

1

Average is calculated here:

\Mage_Reports_Model_Resource_Order_Collection::calculateSales
$averageExpr = $adapter->getCheckSql(
                'SUM(main_table.orders_count) > 0',
                'SUM(main_table.total_revenue_amount)/SUM(main_table.orders_count)',
                0);
            $this->getSelect()->columns(array(
                'lifetime' => 'SUM(main_table.total_revenue_amount)',
                'average'  => $averageExpr
            ));
| improve this answer | |
  • That looks promising! – user1638055 Feb 28 '14 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.