PHPackages                             outmart/php-pricing-rules - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. outmart/php-pricing-rules

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

outmart/php-pricing-rules
=========================

Create pricing rules that apply if the specified case matches.

0.1.0(3y ago)02911MITPHPPHP &gt;=8.1

Since Nov 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/outmart/php-pricing-rules)[ Packagist](https://packagist.org/packages/outmart/php-pricing-rules)[ RSS](/packages/outmart-php-pricing-rules/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

[![](./cover.jpg)](#)

PHP Pricing Rules
=================

[](#php-pricing-rules)

Create pricing rules that apply if the specified case matches.

Install
-------

[](#install)

```
composer require outmart/php-pricing-rules
```

Example:-
---------

[](#example-)

```
use OutMart\PricingRules\Lay;

$lay = new Lay;
$lay->setTotal(100);
$lay->setShippingMethod('COD');
$lay->setPaymentMethod('PayPal');

$lay->rule(function ($attributes) {
    if ($attributes['total'] >= 100) {
        return true;
    }
    return false;
}, function ($operations) {
    $total = $operations->getTotal();
    $total = $total * 0.9;
    $operations->setTotal($total);
});

return $lay->getTotal(); // 90
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1310d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31162701?v=4)[komicho](/maintainers/komicho)[@komicho](https://github.com/komicho)

---

Top Contributors

[![komtcho](https://avatars.githubusercontent.com/u/12757671?v=4)](https://github.com/komtcho "komtcho (3 commits)")

---

Tags

moduleecommercepricing-rulesoutmart

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/outmart-php-pricing-rules/health.svg)

```
[![Health](https://phpackages.com/badges/outmart-php-pricing-rules/health.svg)](https://phpackages.com/packages/outmart-php-pricing-rules)
```

###  Alternatives

[magepsycho/magento2-discountlimit

Magento 2 Discount Amount Limiter

1112.3k](/packages/magepsycho-magento2-discountlimit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
