# epuzzle/magento2-customer-price

> This module provides prices for customers individually. If you want to add product prices for customers you can use this module.

`composer require epuzzle/magento2-customer-price`

Canonical URL: https://packagento.com/epuzzle/magento2-customer-price

## At a glance

- **Vendor**: epuzzle (https://packagento.com/epuzzle.md)
- **Latest version**: 2.0.1 — released 2025-09-22
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/epuzzle/magento2-customer-price and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require epuzzle/magento2-customer-price:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

This module provides prices for customers individually. If you want to add product prices for customers you can use this module.

## README

Welcome to the Customer Prices module! This module allows you to set individual product prices for each customer. Use it
if you need to manage customer-specific pricing in Magento 2.

## Builds Status

[![Magento 2.4.7 Actions Status](https://github.com/epuzzle/magento2-customer-price/workflows/magento247/badge.svg)](https://github.com/epuzzle/magento2-customer-price/actions)
[![Magento 2.4.8 Actions Status](https://github.com/epuzzle/magento2-customer-price/workflows/magento248/badge.svg)](https://github.com/epuzzle/magento2-customer-price/actions)

## Requirements

1. [Installed Magento 2 System](https://devdocs.magento.com/guides/v2.4/install-gde/bk-install-guide.html)
2. [Magento System Requirements](https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html)

## Supported Magento 2 versions

| **Version**                                  | **Status** | **Notes**                                                                      |
|----------------------------------------------|------------|--------------------------------------------------------------------------------|
| **Magento Open Source/Adobe Commerce 2.3.*** | ?          | Deprecated module [here](https://github.com/jeysmook/magento2-customer-prices) |
| **Magento Open Source 2.4.3**                | ?          | Deprecated module [here](https://github.com/jeysmook/magento2-customer-prices) |
| **Adobe Commerce 2.4.4+**                    | &check;    |                                                                                |
| **Magento Open Source 2.4.4+**               | &check;    |                                                                                |

## Documentation

* [wiki](https://github.com/epuzzle/magento2-customer-price/wiki)
* [Installation Guide](https://github.com/epuzzle/magento2-customer-price/wiki/Installation-Guide)
* [User Guide](https://github.com/epuzzle/magento2-customer-price/wiki/User-Guide)

## Postman API

Use the Postman collection below to explore and test the API endpoints.

[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://app.getpostman.com/run-collection/9225084-dd534e54-1b92-4132-a501-bc1de224dc6f?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D9225084-dd534e54-1b92-4132-a501-bc1de224dc6f%26entityType%3Dcollection%26workspaceId%3Ddbf5d198-105d-43d3-b911-f9fc763d1a07#?env%5BePuzzle%20Backend%20Localhost%5D=W3sia2V5IjoiYXBpVXJsIiwidmFsdWUiOiJodHRwczovL2VwdXp6bGUtYmFja2VuZC5sb2NhbC9yZXN0LyIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJzZWNyZXQiLCJkZXNjcmlwdGlvbiI6eyJjb250ZW50IjoiIiwidHlwZSI6InRleHQvcGxhaW4ifSwic2Vzc2lvblZhbHVlIjoiaHR0cHM6Ly9lcHV6emxlLWJhY2tlbmQubG9jYWwvcmVzdC8iLCJjb21wbGV0ZVNlc3Npb25WYWx1ZSI6Imh0dHBzOi8vZXB1enpsZS1iYWNrZW5kLmxvY2FsL3Jlc3QvIiwic2Vzc2lvbkluZGV4IjowfSx7ImtleSI6ImFwaVRva2VuIiwidmFsdWUiOiI8SlNPTl9XRUJfVE9LRU4+IiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6InNlY3JldCIsImRlc2NyaXB0aW9uIjp7ImNvbnRlbnQiOiIiLCJ0eXBlIjoidGV4dC9wbGFpbiJ9LCJzZXNzaW9uVmFsdWUiOiJleUpyYVdRaU9pSXhJaXdpWVd4bklqb2lTRk15TlRZaWZRLmV5SjFhV1FpT2pNc0luVjBlWEJwWkNJNk1pd2lhV0YwSWpveE56VTJPVGd6TlRjMExDSmxlSEFpT2pFM05UWTVPRGN4TnpSOS45RUFKQVJXVk9NWURaUFN6QTZHQjBPX2JUTXNzMC4uLiIsImNvbXBsZXRlU2Vzc2lvblZhbHVlIjoiZXlKcmFXUWlPaUl4SWl3aVlXeG5Jam9pU0ZNeU5UWWlmUS5leUoxYVdRaU9qTXNJblYwZVhCcFpDSTZNaXdpYVdGMElqb3hOelUyT1Rnek5UYzBMQ0psZUhBaU9qRTNOVFk1T0RjeE56UjkuOUVBSkFSV1ZPTVlEWlBTekE2R0IwT19iVE1zczA5Z1U3eXgtQjE2Q2pFdyIsInNlc3Npb25JbmRleCI6MX1d)

## License

Copyright (c) 2025 ePuzzle contributors.
This module is [MIT licensed](./LICENSE).
Project coordinator: [support@epuzzle.org](mailto:support@epuzzle.org)

## Changelog

2.0.1
=============

* Bugs fixed:
    * Resolved issues with PHP8.4

2.0.0
=============

* Important changes:
    * The web api endpoints were changed. We added the prefix to all endpoints (edpuzzle-)
    * The `CustomerPriceRepositoryInterface::getList` method was changed. The result is search results entity
    * Added the `epuzzle/magento2-module-base` module as a required dependency
    * ACL structure was changed. Depends on the `epuzzle/magento2-module-base` module
    * The di.xml, events.xml, etc. were changed. The plugin names, keys, etc. were changed
    * The customer price code was changed
    * The module is enabled by default
* New features:
    * Supported new Magento and PHP versions
    * Supported configurable and grouped products - if the simple product has a customer price, the parent product will
      have the same price
* Bugs fixed:
    * Fixed the issue when the customer price is more than the product price for the search engines
    * Fixed all phpcs/phpstan
* GitHub issues:
    * [#3](https://github.com/epuzzle/magento2-customer-price/issues/3) - Different logics to apply the customer prices

## Recent Versions

| Version | Released |
|---|---|
| 2.0.1 | 2025-09-22 |
| 2.0.0 | 2025-05-23 |
| 1.1.1 | 2022-07-19 |
| 1.1.0 | 2022-07-16 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| epuzzle/magento2-module-base | * |
| magento/framework | * |
| magento/module-catalog | * |
| php | ~8.1.0\|\|~8.2.0\|\|~8.3.0\|\|~8.4.0 |

## Quality

Latest release (2.0.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1 | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | not tested |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Pass | 0 |  |
| PHPMD | Warning | 13 | 13 rule violations (UnusedFormalParameter:10, IfStatementAssignment:3) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 69 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 4 | valid; 4 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | N/A |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["epuzzle/magento2-customer-price"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

epuzzle is a Magento 2 vendor on Packagento. See https://packagento.com/epuzzle.md for their full catalogue.

