infrangible / m2-catalog-product-customer-price
Set individual prices or percentage discounts for specific customers and products, optionally limited in quantity or to one website; customers see and pay them when logged in.
Package info
github.com/infrangible-dev/m2-catalog-product-customer-price
Type:magento2-module
pkg:composer/infrangible/m2-catalog-product-customer-price
Requires
- php: >=8.1
- fewedev/base: ~2.4.1
- infrangible/m2-backend-widget: ~4.0.4
- infrangible/m2-catalog-product-price-calculation: ~4.0.0
- infrangible/m2-core: ~5.0.4
- infrangible/m2-foundation: ~3.0.1
- magento/framework: ~103.0.6
- magento/module-backend: ~102.0.0
- magento/module-catalog: ~104.0.0
- magento/module-checkout: ~100.4.0
- magento/module-customer: ~103.0.0
- magento/module-quote: ~101.2.0
- magento/module-sales: ~103.0.0
- magento/module-store: ~101.1.0
- magento/module-ui: ~101.2.0
- psr/log: ~2.0.0||~3.0.0
Requires (Dev)
- infrangible/phpstan-magento: ~1.2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Prices of products for single customers: a fixed price or a discount in percent, optionally limited to a quantity and to one website. When the customer is logged in, the price is shown on product pages and in product lists and charged in the cart. The prices are calculated by Infrangible Catalog Product Price Calculation, so pages in the full page cache stay the same for every visitor.
Customer prices
A customer price consists of:
- Customer and Product
- Price (a fixed price in the base currency) or Discount (in percent of the final price), not both
- Limit: the quantity that the customer can buy with the price. The quantity in the cart cannot exceed the limit that is left, and the ordered quantities are counted in "Used". Once the limit is used up, the price is no longer offered.
- Priority: if a customer has several prices of a product, the one with the highest priority is used
- Website: the website of the price, or all websites
- Active
The prices are managed under Infrangible > Customer Price > Manage. The form of a customer in the admin gets the tab "Customer Prices" with the prices of the customer.
When a customer price is added, changed or deleted, the cache of the product (product pages and product lists) is cleaned.
The items of an order get the product option price_calculation with the value customer_price_<id>, the ID of the
customer price.
Requirements
- Magento Open Source or Adobe Commerce 2.4.6 or newer
- PHP 8.1 or newer
Installation
composer require infrangible/m2-catalog-product-customer-price bin/magento module:enable Infrangible_CatalogProductCustomerPrice bin/magento setup:upgrade
In production mode, also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy.
License
Infrangible Catalog Product Customer Price is licensed under the MIT License - see the LICENSE file for details.