定制 phong/module-fixed-percent-max-amount 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phong/module-fixed-percent-max-amount

Composer 安装命令:

composer require phong/module-fixed-percent-max-amount

包简介

Percent of Product Price with Max Discount

README 文档

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+

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2026-03-23