After our recent upgrade to 22.214.171.124, we have found that we cannot run any sales reports. Reports for Products and Shopping Cart work fine, but each time we try to run sales reports, a message says “This report depends on timezone configuration. Once timezone is changed, the lifetime statistics need to be refreshed.”
Even after refreshing lifetime statistics, the reports cannot be run. This error came up after refreshing statistics and trying to rerun the report:
Fatal error: Call to undefined method Mage_Reports_Model_Grouped_Collection::getIntervals() in /var/www/vhosts/comitstores.com/httpdocs/app/design/adminhtml/default/default/template/advancedreports/grid.phtml on line 159
The Advanced Reports extension was previously installed. After seeing this error, an attempt was made to disable the extension, but Magento Connect is not allowing it to be disabled.
Has anyone else experienced problems with Sales Reports since upgrading? Or have any ideas on what might be the problem?
Having the same issue here. Not only can not run sales report, but no sales history shows. I suspect it has to do with the new table structure in 1.4.1.x since I can see sales_orders has rows, but not sales_flat_orders.
I think i found the problem. For me it happened becasue I changed few things in app/Mage/Sales/etc/config.xml.
When i replaced it with the original file the problem was solved and I could see the Average Order and Lifetime Sales.
Is there any fix for this? I have tried everything suggested in this post. Also my lifetime sales are 0 and I have lots of orders and payments? I am using 1.4.1 and dont get any sales reports and my lifetime sales is 0 ??? this is extremely frustrating right now. Any help much appreciated
After running into the same problem of 0 lifetime sales after upgrading from 1.3.0 to 126.96.36.199 I started Googling for the solution. Only thing I found were a lot of people with the same question and few answers. The original problem on this page was timezone related (and yes it fixed some of my problems,so thanks!) I still needed a fix for the lifetime sales being 0 and since some of you seem to have a similar problem I though it would be good to post here with my solution to it.
After fixing the timezone issue the Lifetime sales was still 0 and I went into the code and found that the SQL getting the numbers got quite the upgrade between versions. First of all it seems possible to use aggregated data to get the numbers, I haven’t got the numbers out through this route (enable it in config, sales, dashboard) so I went through the code and noticed the following in Mage_Reports_Model_Mysql4_Order_Collection on line 380:
$this->getSelect()->where('main_table.status NOT IN(?)', $statuses) ->where('main_table.state NOT IN(?)', array(Mage_Sales_Model_Order::STATE_NEW, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT));
So here Magento does not count the amounts of orders with a cancelled ($statuses), new (pending) or pending payment status. And, for me, here lies the problem. In my case I only take new orders, the order processing happens somewhere else and I don’t change the status of the order after it has been created. Changing the code above into:
$this->getSelect()->where('main_table.status NOT IN(?)', $statuses); // ->where('main_table.state NOT IN(?)', array(Mage_Sales_Model_Order::STATE_NEW, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT));
makes the totals re-appear again
As far as I can tell the code was upgraded after 188.8.131.52 (I have no installs between 184.108.40.206 and 220.127.116.11 laying around so I can’t check)