Skip to content

99x/craft-commerce-reports

Repository files navigation

Commerce Reports Plugin

Advanced reporting plugin for Craft Commerce that provides comprehensive sales analytics and data insights.

Overview

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.

Features

📊 Available Reports

  • Sales by Volume
  • Sales by Value
  • Sales by Category
  • Sales by Payment Method
  • Sales by Customer
  • Sales by User Type
  • Sales by Coupon
  • Abandoned Carts

⚙️ Key Features

  • Real-time Data Processing - Automatic background data aggregation
  • Historical Data - Full historical sales analysis
  • Multi-site Support - Works with Craft's multi-site setup
  • Configurable Categories - Link product categories for enhanced reporting
  • Data Management - Built-in cleanup tools for maintenance

Installation

  1. Install via Composer:
composer require 99x/craft-commerce-reports
  1. Install the plugin in Craft CP:
    • Go to SettingsPlugins
    • Find "Commerce Reports" and click Install

Configuration

Category Field Setup

  1. Go to Commerce ReportsSettings
  2. Select the Product Category Field from the dropdown
  3. This enables the "Sales by Category" report functionality

Data Management

The plugin includes cleanup tools to manage storage:

  • Last Week - Clear last 7 days of data
  • Last Month - Clear last 30 days of data
  • Last 3 Months - Clear last 90 days of data
  • Last 6 Months - Clear last 180 days of data
  • All Data - Complete data cleanup

Usage

Accessing Reports

Navigate to Commerce Reports in the Control Panel main menu to access all available reports.

Data Processing

  • Initial data processing happens automatically after installation
  • Progress is shown via notification banners
  • Recent data syncs happen automatically in the background

Console Commands

For advanced users and automation:

# Process recent data for last 7 days
./craft commerce-reports/aggregate/last-days --days=7

# Clean up old data
./craft commerce-reports/aggregate/cleanup --daysToDelete=30

## Technical Notes

### Performance
- Uses aggregated data tables for fast report generation
- Background processing prevents UI blocking
- Efficient database queries optimized for large datasets

### Data Storage
- Creates dedicated tables for aggregated metrics
- Preserves original Commerce data integrity
- Configurable data retention policies

### Compatibility
- Requires Craft CMS 4.0+
- Requires Craft Commerce 4.0+
- Compatible with multi-site installations

## Support

For technical support and feature requests, please contact the development team.

---

**Version:** 1.0.0  
**License:** Proprietary  
**Developer:** 99x

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors