Adding a custom date range to your Magento admin control panel chart

I am working on the task of showing a date range on a Dashboard chart. therefore, the data chart will be displayed in a custom date range. I added a calendar to the chart, but the result does not fit. I know his very specific requirement. I am looking if someone has already made such a modification and can provide me with some confidence in this.

+4
source share
1 answer

The data displayed on the toolbar comes from tables aggregated by cron every day to view the product and best sellers. It is calculated and displayed accordingly. If you want to have a date range, you need to use the ones that are aggregated daily, and group by product_id. For orders, you can use the setDateRange function existing in Mage_Reports_Model_Resource_Order_Collection .

+1
source

Source: https://habr.com/ru/post/1546648/


All Articles