phong / module-fixed-percent-max-amount
Percent of Product Price with Max Discount
Package info
github.com/phongnguyen1412/FixedPercentDiscountAmount
Type:magento2-module
pkg:composer/phong/module-fixed-percent-max-amount
Requires
- php: >=8.0
- magento/framework: >=103.0.6
This package is auto-updated.
Last update: 2026-04-23 07:16:21 UTC
README
Overview
This extension introduces a new Cart Price Rule action in Magento:
Percent of Product Price with Max Discount
The rule allows store administrators to apply a percentage-based discount on product prices while limiting the total discount amount using a configurable maximum discount value.
This helps control promotional costs while still offering flexible percentage discounts.
How It Works
When the rule is applied, the system calculates the discount amount based on:
The minimum value between:
- Percentage discount calculated from the quote total
- Configured maximum discount amount
This ensures that the applied discount will never exceed the defined maximum limit.
Discount Calculation Logic
Rule Parameters
- Discount Percent — Percentage discount applied to quote total
- Max Discount Amount — Maximum allowed discount value
Calculation Formula
discount_amount = MIN(
quote_total × discount_percent,
max_discount_amount
)
Installation
Install the module via Composer:
composer require phong/module-fixed-percent-max-amount
Then run Magento commands:
php bin/magento module:enable Phong_FixedPercentMaxAmount php bin/magento setup:upgrade php bin/magento cache:flush
Compatibility
- Magento Open Source 2.4.6+
- Magento Commerce 2.4.6+
- PHP 8.1+