{"repo":"zxc7563598/php-promotion-engine","free":true,"listed":false,"github":"https://github.com/zxc7563598/php-promotion-engine","clone":"git clone https://github.com/zxc7563598/php-promotion-engine.git","description":"一个 灵活可扩展 的 PHP 促销策略引擎，让购物车的各种复杂促销逻辑（满减、打折、阶梯优惠、会员折扣…）实现更优雅、可维护 ｜ A flexible and scalable PHP promotional strategy engine that enables various complex promotional logics (money off, discounts, tiered offers, member discounts, etc.) in shopping carts to be implemented more elegantly and maintainably.","language":"PHP","stars":25,"topics":["cart-discount","composer","ecommerce","php8","promotion-engine","strategy-pattern"],"license":"MIT","category":"ecommerce","readme_excerpt":"hejunjie/promotion-engine English ｜ 简体中文 A flexible and extensible PHP promotion strategy engine that abstracts complex shopping cart promotion logic — money-off, discounts, tiered offers, member discounts — out of if-else spaghetti and into composable rule classes. This project has been parsed by Zread. If you need a quick overview of the project, you can click here to view it：Understand this project --- Features - 🧩 Rules as classes ：Each promotion strategy is an independent rule class — clear, testable, and reusable - 🔀 Three calculation modes ：Independent, sequential (stacked), and lock modes for different business scenarios - 🏷️ Tag filtering ：Rules match items by product tags, making category-specific promotions effortless - 📊 Priority control ：Rules execute in priority order, giving you full control over discount stacking - 🔌 Easy to extend ：Add custom rules by extending AbstractPromotionRule — no changes to the engine core - 🪶 Zero dependencies ：Requires only PHP = 7.4, no third-party libraries Requirements - PHP = 7.4 (also supports PHP 8.x) - Composer Installation Quick Start Calculation Modes The engine supports three calculation modes, switchable via setMode() ： Mode Identifier Behavior :---------- :------------ :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Independent independent Each rule calculates its discount against the original ","default_branch":null,"files":null,"tree":[],"storefront":"/r/zxc7563598","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zxc7563598/php-promotion-engine/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}