Showing results for 
Search instead for 
Did you mean: 

Alter SQL for Graph on Dashboard

Alter SQL for Graph on Dashboard

I need to alter the SQL (or the filter) for the Graph on Magento Dashboard.

Currently it only shows orders with state "completed" and I need to change that. A customer wants to include orders with state "processing" to the Graph.

Where do I change the Graph function?


Info ... I use Magento


Re: Alter SQL for Graph on Dashboard

The dashboard uses the Mage_Reports plugin. The product collection is here: app/code/core/Mage/Reports/Model/Resource/Order/Collection.php. There is a configuration setting which chooses whether live data or aggregated is used. 


It's probably around this line you'll want to adapt:

If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!