sanjeev-kr/magento2-customer-purchase-history

magento 2 extension for customer purchase history.

Maintainers

Package info

github.com/sanjeev-kr/magento2-customer-purchase-history

Type:magento2-module

pkg:composer/sanjeev-kr/magento2-customer-purchase-history

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.0 2026-05-09 03:10 UTC

This package is auto-updated.

Last update: 2026-07-29 04:30:04 UTC


README

Sanjeev_CustomerPurchaseHistory is a light weight Magento 2 module that computes customers purchase history metrics and exposes them in customers listing in admin. The module collects store wise aggregates like total purchases amount, average purchase amounts, and last purchase date of each customer. This module helps customer support teams, store managers, and marketers quickly understand customer buying behaviour, identify frequently purchased products, and provide better customer assistance.

Features

  • Computes per-customer aggregates: total purchase amount, average purchase amount, and last purchase date.
  • Filter customers based on purchase history metrics.
  • Enable / disable store wise calcuation of purchase history metrics via store configuration.
  • Store wise select orders' statues to include in the metrics via store configuration.
  • Console command: on-demand metrics calculation run manually CLI command

Screenshots

Customer Purchase History

Customer Purchase History

Filters

Filters

Configuration

Configuration

Key Benefits

  • View customer purchase history instantly
  • Improve customer support and sales interactions
  • Gain insights into customer buying patterns
  • Easy installation and Magento 2 integration

Compatible with Magento Open Source and Adobe Commerce.

Composer installation

composer require sanjeev-kr/magento2-customer-purchase-history
php bin/magento module:enable Sanjeev_CustomerPurchaseHistory
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

Manual installation

  1. Copy the module to app/code/Sanjeev/CustomerPurchaseHistory.
  2. Enable and install the module:
php bin/magento module:enable Sanjeev_CustomerPurchaseHistory
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

Uninstall (optional)

Disable and remove the module from app/code, then:

bin/magento module:disable Sanjeev_CustomerPurchaseHistory
bin/magento setup:upgrade
bin/magento cache:flush

(Adjust for your deployment; you may need setup:di:compile and setup:static-content:deploy -f again in production.)

Running the generator

  • Cron: The job sanjeev_customer_purchase_history_generate is scheduled in etc/crontab.xml to run nightly at 02:00 AM for enabled stores.
  • CLI: Run the console command to generate the report on demand for enabled stores:
php bin/magento sanjeev:customer-purchase-history:report

License

This project is licensed under the MIT License. See LICENSE.txt.

Author

Sanjeev Kumar

If my work helps you and you want to appreciate, please Sponor. I would appreciate you.