zookal / kalenjordan-custom-reports
Easily create reports using a SQL query
Installs: 113
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 67
Type:magento-module
Requires
This package is not auto-updated.
Last update: 2020-08-22 07:25:57 UTC
README
Easily create reports with custom SQL queries and display them using the magento admin grid or using Google Charts API.
Features
- Report result table
- Ability to define column configuration or allow auto configuration.
- The following Google Charts are currently supported, please see the examples:
- Pie Chart
- Bar Chart
- Column Chart
- Calendar Chart
- When querying for the date, you must query the date using UNIX_TIMESTAMP() like the following:
UNIX_TIMESTAMP(date([[date field]]))
- When querying for the date, you must query the date using UNIX_TIMESTAMP() like the following:
- Control access to viewing, editing, and creation of reports in Magento ACL list.
- Cache results in dynamically created tables for performance and historical reasons.
- Select separate database connection to run queries against
TO DO
- Fix the calendar chart to support more than 1 year.
- Add logic to prepare data for specific chart types.
- Wrapping the json results for web service consumption.
- Add the sample reports
- New Customers (Calendar Chart)
- Order Status (Pie Chart)
- Order Status By Month (Stacked column chart)
- Sales by Month (Bar Chart)
- Sales By Day (Calendar Chart)
- Sales by Month (Column Chart)
- Add ability to select database resource per report (?)
- Better documentation...
Contributors
- Allan MacGregor
- Fabrizio Branca
- Kalen Jordan
- Lee Saferite
- Tom Steigerwald
- Rolando Granadino
- Cyrill Schumacher
Known Issues
- Calendar Chart only supports one year.
Disclaimer
- Use at your own risk.
- This is a developer tool.
- We know you can drop tables.
Grid Configuration Format
It's possible to make columns filterable by using the "Grid Configuraiton" option. This field expects a JSON oject with key/value pairs. There's two options to make a set of columns configurable, an array containing the names of the columns to be filtered:
{
"filterable": ["customer_group", "region"]
}
Or an object with key/value pairs of the column name and Magento admin block type. It is important that this be a valid block type otherwise the grid will fail to render.
{
"filterable": {"created_at_date": "adminhtml/widget_grid_column_filter_date"}
}
Here is a list of common filter block types:
adminhtml/widget_grid_column_filter_datetime
adminhtml/widget_grid_column_filter_date
adminhtml/widget_grid_column_filter_range
adminhtml/widget_grid_column_filter_country
More can be found in app/code/core/Magento/Adminhtml/Block/Widget/Grid/Column.php
within the _getFilterByType
method.