|
| 1 | +# Commerce Reports Plugin |
| 2 | + |
| 3 | +Advanced reporting plugin for Craft Commerce that provides comprehensive sales analytics and data insights. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +This plugin extends Craft Commerce with powerful reporting capabilities, offering detailed analytics on sales performance, customer behavior, and commerce metrics through an intuitive dashboard interface. |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +### 📊 **Available Reports** |
| 12 | +- **Sales by Volume** |
| 13 | +- **Sales by Value** |
| 14 | +- **Sales by Category** |
| 15 | +- **Sales by Payment Method** |
| 16 | +- **Sales by Customer** |
| 17 | +- **Sales by User Type** |
| 18 | +- **Sales by Coupon** |
| 19 | +- **Abandoned Carts** |
| 20 | + |
| 21 | +### ⚙️ **Key Features** |
| 22 | +- **Real-time Data Processing** - Automatic background data aggregation |
| 23 | +- **Historical Data** - Full historical sales analysis |
| 24 | +- **Multi-site Support** - Works with Craft's multi-site setup |
| 25 | +- **Configurable Categories** - Link product categories for enhanced reporting |
| 26 | +- **Data Management** - Built-in cleanup tools for maintenance |
| 27 | + |
| 28 | +## Installation |
| 29 | + |
| 30 | +1. Install via Composer: |
| 31 | +```bash |
| 32 | +composer require 99x/craft-commerce-reports |
| 33 | +``` |
| 34 | + |
| 35 | +2. Install the plugin in Craft CP: |
| 36 | + - Go to **Settings** → **Plugins** |
| 37 | + - Find "Commerce Reports" and click **Install** |
| 38 | + |
| 39 | +## Configuration |
| 40 | + |
| 41 | +### Category Field Setup |
| 42 | +1. Go to **Commerce Reports** → **Settings** |
| 43 | +2. Select the **Product Category Field** from the dropdown |
| 44 | +3. This enables the "Sales by Category" report functionality |
| 45 | + |
| 46 | +### Data Management |
| 47 | +The plugin includes cleanup tools to manage storage: |
| 48 | +- **Last Week** - Clear last 7 days of data |
| 49 | +- **Last Month** - Clear last 30 days of data |
| 50 | +- **Last 3 Months** - Clear last 90 days of data |
| 51 | +- **Last 6 Months** - Clear last 180 days of data |
| 52 | +- **All Data** - Complete data cleanup |
| 53 | + |
| 54 | +## Usage |
| 55 | + |
| 56 | +### Accessing Reports |
| 57 | +Navigate to **Commerce Reports** in the Control Panel main menu to access all available reports. |
| 58 | + |
| 59 | +### Data Processing |
| 60 | +- Initial data processing happens automatically after installation |
| 61 | +- Progress is shown via notification banners |
| 62 | +- Recent data syncs happen automatically in the background |
| 63 | + |
| 64 | +### Console Commands |
| 65 | +For advanced users and automation: |
| 66 | + |
| 67 | +```bash |
| 68 | +# Process recent data for last 7 days |
| 69 | +./craft commerce-reports/aggregate/last-days --days=7 |
| 70 | + |
| 71 | +# Clean up old data |
| 72 | +./craft commerce-reports/aggregate/cleanup --daysToDelete=30 |
| 73 | + |
| 74 | +## Technical Notes |
| 75 | + |
| 76 | +### Performance |
| 77 | +- Uses aggregated data tables for fast report generation |
| 78 | +- Background processing prevents UI blocking |
| 79 | +- Efficient database queries optimized for large datasets |
| 80 | + |
| 81 | +### Data Storage |
| 82 | +- Creates dedicated tables for aggregated metrics |
| 83 | +- Preserves original Commerce data integrity |
| 84 | +- Configurable data retention policies |
| 85 | + |
| 86 | +### Compatibility |
| 87 | +- Requires Craft CMS 4.0+ |
| 88 | +- Requires Craft Commerce 4.0+ |
| 89 | +- Compatible with multi-site installations |
| 90 | + |
| 91 | +## Support |
| 92 | + |
| 93 | +For technical support and feature requests, please contact the development team. |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +**Version:** 1.0.0 |
| 98 | +**License:** Proprietary |
| 99 | +**Developer:** 99x |
| 100 | + |
0 commit comments