PHPackages                             setono/sylius-tier-pricing-plugin - 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. setono/sylius-tier-pricing-plugin

ActiveSylius-plugin[Utility &amp; Helpers](/categories/utility)

setono/sylius-tier-pricing-plugin
=================================

Use price tiers in your Sylius store.

v1.0.0(1y ago)18.7k1MITPHPPHP &gt;=8.1CI passing

Since Feb 6Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Setono/sylius-tier-pricing-plugin)[ Packagist](https://packagist.org/packages/setono/sylius-tier-pricing-plugin)[ GitHub Sponsors](https://github.com/Setono)[ RSS](/packages/setono-sylius-tier-pricing-plugin/feed)WikiDiscussions 2.x Synced today

READMEChangelog (6)Dependencies (84)Versions (11)Used By (0)

Sylius Tier Pricing Plugin
==========================

[](#sylius-tier-pricing-plugin)

[![Latest Version](https://camo.githubusercontent.com/8c219b8a402f560473c9f3a520612e313a36742dd93fa39dcb8f958d1905c739/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f73796c6975732d746965722d70726963696e672d706c7567696e2f762f737461626c65)](https://packagist.org/packages/setono/sylius-tier-pricing-plugin)[![Software License](https://camo.githubusercontent.com/d63fc71a7255201ffe19da54b465352eaf31085dd8f1b0c89862bc0b8f84b6d4/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f73796c6975732d746965722d70726963696e672d706c7567696e2f6c6963656e7365)](LICENSE)[![Build Status](https://github.com/Setono/sylius-tier-pricing-plugin/workflows/build/badge.svg)](https://github.com/Setono/sylius-tier-pricing-plugin/actions)[![Code Coverage](https://camo.githubusercontent.com/c139fd902380bbaf4a261c096e6873ff50b2af041f51842b5363c83fbc3716c0/68747470733a2f2f636f6465636f762e696f2f67682f5365746f6e6f2f73796c6975732d746965722d70726963696e672d706c7567696e2f67726170682f62616467652e737667)](https://codecov.io/gh/Setono/sylius-tier-pricing-plugin)[![Mutation testing](https://camo.githubusercontent.com/97fa88500c74f4ad657c470641975e3bf801f811dbc149b440b42937bc87adba/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532465365746f6e6f25324673796c6975732d746965722d70726963696e672d706c7567696e253246322e78)](https://dashboard.stryker-mutator.io/reports/github.com/Setono/sylius-tier-pricing-plugin/2.x)

Use quantity-based price tiers in your Sylius store. Set a tier like "10% off when buying 5 or more" on a product, optionally scoped to a specific channel and/or variant; the discount is applied automatically as a per-unit `ORDER_UNIT_PROMOTION_ADJUSTMENT` with `originCode = 'tier_pricing'`.

Requirements
------------

[](#requirements)

- PHP `>=8.2`
- Symfony `^6.4 || ^7.4`
- Sylius `^2.0`

For Sylius 1.x see the [`1.x`](https://github.com/Setono/sylius-tier-pricing-plugin/tree/1.x) branch. Upgrading from 1.x → 2.x? See [UPGRADE.md](UPGRADE.md).

Installation
------------

[](#installation)

```
composer require setono/sylius-tier-pricing-plugin
```

Register the bundle in `config/bundles.php`:

```
return [
    // ...
    Setono\SyliusTierPricingPlugin\SetonoSyliusTierPricingPlugin::class => ['all' => true],
];
```

Make your `App\Entity\Product` use the plugin's trait + interface:

```
use Setono\SyliusTierPricingPlugin\Model\ProductInterface as TierPricingProductInterface;
use Setono\SyliusTierPricingPlugin\Model\ProductTrait as TierPricingProductTrait;

class Product extends BaseProduct implements TierPricingProductInterface
{
    use TierPricingProductTrait {
        TierPricingProductTrait::__construct as private _initializePriceTiers;
    }

    public function __construct()
    {
        parent::__construct();
        $this->_initializePriceTiers();
    }
}
```

Wire the resource override in `config/packages/_sylius.yaml`:

```
sylius_product:
    resources:
        product:
            classes:
                model: App\Entity\Product
```

Update the database schema:

```
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
```

How it works
------------

[](#how-it-works)

After install, products in the admin get a **Price tiers** tab (rendered via Twig hooks into the product update/create page). Each tier has:

- **Quantity** — minimum units the customer must add to the cart for the tier to kick in.
- **Discount** — percentage off, kept as a numeric string and computed with `brick/math` to avoid float drift.
- **Channel** — optional; restricts the tier to one channel.
- **Variant** — optional; restricts the tier to one variant of the product.

When an order is processed, the `PriceTiersOrderProcessor` (priority 15, runs *before* tax/shipping) picks the best-matching tier per item using the precedence `(channel + variant) > variant > channel > generic`, computes the discount with `RoundingMode::CEILING`, distributes it across units via `sylius.distributor.integer`, and attaches one adjustment per unit.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance64

Regular maintenance activity

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.3% 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

Every ~118 days

Recently: every ~161 days

Total

8

Last Release

55d ago

Major Versions

v1.0.0-beta → v2.0.0-alpha2026-05-11

PHP version history (2 changes)v1.0.0-alphaPHP &gt;=8.1

v2.0.0-alphaPHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2412177?v=4)[Joachim Løvgaard](/maintainers/loevgaard)[@loevgaard](https://github.com/loevgaard)

---

Top Contributors

[![loevgaard](https://avatars.githubusercontent.com/u/2412177?v=4)](https://github.com/loevgaard "loevgaard (58 commits)")[![tannyl](https://avatars.githubusercontent.com/u/11209600?v=4)](https://github.com/tannyl "tannyl (1 commits)")

---

Tags

phpsyliussylius-pluginsymfonysymfony-bundlesyliussylius-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/setono-sylius-tier-pricing-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/setono-sylius-tier-pricing-plugin/health.svg)](https://phpackages.com/packages/setono-sylius-tier-pricing-plugin)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M204](/packages/sulu-sulu)

PHPackages © 2026

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