PHPackages                             sanjeev-kr/magento2-customer-purchase-history - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sanjeev-kr/magento2-customer-purchase-history

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

sanjeev-kr/magento2-customer-purchase-history
=============================================

magento 2 extension for customer purchase history.

2.0.0(3mo ago)001MITPHPPHP &gt;=8.2.0

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/sanjeev-kr/magento2-customer-purchase-history)[ Packagist](https://packagist.org/packages/sanjeev-kr/magento2-customer-purchase-history)[ RSS](/packages/sanjeev-kr-magento2-customer-purchase-history/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Introduction
------------

[](#introduction)

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. A cron job or console command triggers the computation.

Features
--------

[](#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

Composer installation
---------------------

[](#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
-------------------

[](#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)
--------------------

[](#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
---------------------

[](#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
-------

[](#license)

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

---

Author
------

[](#author)

Sanjeev Kumar

If my work helps you and you want to appreciate, please [Sponor](https://github.com/sponsors/sanjeev-kr). I would appreciate you.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance86

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

104d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20393092?v=4)[Sanjeev Kumar](/maintainers/sanjeev-kr)[@sanjeev-kr](https://github.com/sanjeev-kr)

---

Top Contributors

[![sanjeev-kr](https://avatars.githubusercontent.com/u/20393092?v=4)](https://github.com/sanjeev-kr "sanjeev-kr (1 commits)")

### Embed Badge

![Health badge](/badges/sanjeev-kr-magento2-customer-purchase-history/health.svg)

```
[![Health](https://phpackages.com/badges/sanjeev-kr-magento2-customer-purchase-history/health.svg)](https://phpackages.com/packages/sanjeev-kr-magento2-customer-purchase-history)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
