PHPackages                             brille24/tierprice-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. brille24/tierprice-plugin

Abandoned → [brille24/sylius-tierprice-plugin](/?search=brille24%2Fsylius-tierprice-plugin)Sylius-plugin[Utility &amp; Helpers](/categories/utility)

brille24/tierprice-plugin
=========================

A plugin that allows to add tierprices to Sylius

v4.0.0(1y ago)473638[5 issues](https://github.com/Brille24/SyliusTierpricePlugin/issues)[1 PRs](https://github.com/Brille24/SyliusTierpricePlugin/pulls)MITPHPPHP ^8.2CI passing

Since Mar 6Pushed 3w ago3 watchersCompare

[ Source](https://github.com/Brille24/SyliusTierpricePlugin)[ Packagist](https://packagist.org/packages/brille24/tierprice-plugin)[ RSS](/packages/brille24-tierprice-plugin/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (30)Versions (47)Used By (0)

[![](https://camo.githubusercontent.com/5b98e02f3693c16fd3f40037251d70ca5e1ecd2a11608dd21c9c7e3933b8942e/68747470733a2f2f73796c6975732e636f6d2f6173736574732f62616467652d617070726f7665642d62792d73796c6975732e706e67)](https://sylius.com/plugins/)

Sylius Tier Price Plugin
========================

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

[![Build Status](https://camo.githubusercontent.com/34d990a35a6c1dd709b5dffa1fda7cbcf3835e3f580ad2f71ce031d01580dd8e/68747470733a2f2f7472617669732d63692e6f72672f4272696c6c6532342f53796c697573546965727072696365506c7567696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Brille24/SyliusTierpricePlugin)

This plugin adds tier pricing to Sylius one product has different prices based on the quantity.

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

[](#installation)

- Install the bundle via composer `composer require brille24/sylius-tierprice-plugin`
- Register the bundle in your `bundles.php`:

```
return [
    //...

    Brille24\SyliusTierPricePlugin\Brille24SyliusTierPricePlugin::class => ['all' => true],
];
```

- Add the `config.yaml` to your local `config/config.yaml`

```
imports:
    ...
    - { resource: '@Brille24SyliusTierPricePlugin/config/config.yaml'}
```

- For API functionality add the bundle's `routes.yml` to the local `app/config/routes.yml`

```
...
brille24_tierprice_bundle:
    resource: '@Brille24SyliusTierPricePlugin/config/routes.yml'
```

- Go into your `ProductVariant` class and add the following trait and add one method call to the constructor

```
class ProductVariant extends BaseProductVariant implements \Brille24\SyliusTierPricePlugin\Entity\ProductVariantInterface
{
    use \Brille24\SyliusTierPricePlugin\Traits\TierPriceableTrait;

    public function __construct() {
        parent::__construct(); // Your constructor here

        $this->initTierPriceableTrait(); // "Constructor" of the trait
    }

    protected function createTranslation(): ProductVariantTranslationInterface
    {
        return new ProductVariantTranslation();
    }
}
```

- Finally update the database, install the assets and update the translations:

```
bin/console doctrine:schema:update --force
bin/console assets:install
bin/console translation:update  --force
```

### Integration

[](#integration)

- This bundle decorates the `sylius.calculator.product_variant_price` service. If you wish to change that, you could register a [compiler pass](https://symfony.com/doc/current/service_container/compiler_passes.html).
- This bundle decorates the `sylius.order_processing.order_prices_recalculator` service. If you wish to use your own order processor or change its priority, you could register a [compiler pass](https://symfony.com/doc/current/service_container/compiler_passes.html).

Usage
-----

[](#usage)

First of all you have to set up a product with as many variants as you want. Then in each of these variants you can set the tier pricing based on the channels. The table automatically sorts itself to provide a better overview for all different tiers, you configured.

[![](images/Backend.png)](images/Backend.png)

In the frontend the user will see a nice looking table right next to the "add to cart" button that shows the discount for the different tiers like so:

[![](images/Front-End.png)](images/Front-End.png)

### Creating data

[](#creating-data)

You can easily create the tier prices with fixtures like that.

```
sylius_fixtures:
    suites:
        my_suite:
            fixtures:
                tier_prices:
                    options:
                        custom:
                            - product_variant: "20125148-54ca-3f05-875f-5524f95aa85b"
                              channel: US_WEB
                              quantity: 10
                              price: 5
```

For this the products need to be created first and the product variant must also exist.

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance69

Regular maintenance activity

Popularity23

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~62 days

Recently: every ~38 days

Total

42

Last Release

471d ago

Major Versions

v0.9 → v1.12019-04-03

v0.10 → v1.22019-04-26

1.8 → 2.0.02021-03-05

2.4.2 → 3.0.02024-10-14

3.0.2 → v4.0.0-alpha2025-01-17

PHP version history (5 changes)0.3PHP ^7.1

v0.7PHP ^7.2

2.1.0PHP ^7.4 || ^8.0

2.3.0-ALPHAPHP ^8.0

v4.0.0-alphaPHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![pamil](https://avatars.githubusercontent.com/u/1897953?v=4)](https://github.com/pamil "pamil (190 commits)")[![mamazu](https://avatars.githubusercontent.com/u/14860264?v=4)](https://github.com/mamazu "mamazu (179 commits)")[![markbeazley](https://avatars.githubusercontent.com/u/17005579?v=4)](https://github.com/markbeazley "markbeazley (22 commits)")[![lchrusciel](https://avatars.githubusercontent.com/u/6213903?v=4)](https://github.com/lchrusciel "lchrusciel (21 commits)")[![Roshyo](https://avatars.githubusercontent.com/u/9363039?v=4)](https://github.com/Roshyo "Roshyo (17 commits)")[![bitbager](https://avatars.githubusercontent.com/u/28542010?v=4)](https://github.com/bitbager "bitbager (12 commits)")[![pjedrzejewski](https://avatars.githubusercontent.com/u/614970?v=4)](https://github.com/pjedrzejewski "pjedrzejewski (9 commits)")[![Zales0123](https://avatars.githubusercontent.com/u/6212718?v=4)](https://github.com/Zales0123 "Zales0123 (7 commits)")[![teohhanhui](https://avatars.githubusercontent.com/u/548843?v=4)](https://github.com/teohhanhui "teohhanhui (7 commits)")[![stefandoorn](https://avatars.githubusercontent.com/u/4903082?v=4)](https://github.com/stefandoorn "stefandoorn (7 commits)")[![pierre-H](https://avatars.githubusercontent.com/u/6079305?v=4)](https://github.com/pierre-H "pierre-H (5 commits)")[![bartoszpietrzak1994](https://avatars.githubusercontent.com/u/22262296?v=4)](https://github.com/bartoszpietrzak1994 "bartoszpietrzak1994 (5 commits)")[![JakobTolkemit](https://avatars.githubusercontent.com/u/30623938?v=4)](https://github.com/JakobTolkemit "JakobTolkemit (4 commits)")[![antiseptikk](https://avatars.githubusercontent.com/u/1520152?v=4)](https://github.com/antiseptikk "antiseptikk (3 commits)")[![tavy315](https://avatars.githubusercontent.com/u/6184412?v=4)](https://github.com/tavy315 "tavy315 (2 commits)")[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (2 commits)")[![JoppeDC](https://avatars.githubusercontent.com/u/9723620?v=4)](https://github.com/JoppeDC "JoppeDC (2 commits)")[![tuxes3](https://avatars.githubusercontent.com/u/5341293?v=4)](https://github.com/tuxes3 "tuxes3 (2 commits)")[![marek-pietrzak-tg](https://avatars.githubusercontent.com/u/2435655?v=4)](https://github.com/marek-pietrzak-tg "marek-pietrzak-tg (2 commits)")[![julienTroopers](https://avatars.githubusercontent.com/u/91535619?v=4)](https://github.com/julienTroopers "julienTroopers (1 commits)")

---

Tags

priceproduct-variantsyliustier-pricesvariants

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/brille24-tierprice-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/brille24-tierprice-plugin/health.svg)](https://phpackages.com/packages/brille24-tierprice-plugin)
```

###  Alternatives

[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M18](/packages/sylius-refund-plugin)[stefandoorn/sitemap-plugin

Sitemap Plugin for Sylius

841.1M](/packages/stefandoorn-sitemap-plugin)[monsieurbiz/sylius-rich-editor-plugin

A Rich Editor plugin for Sylius.

74404.9k6](/packages/monsieurbiz-sylius-rich-editor-plugin)[synolia/sylius-scheduler-command-plugin

Scheduler Command Plugin.

35380.8k](/packages/synolia-sylius-scheduler-command-plugin)[stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin

Google Tag Manager Enhanced Ecommerce plugin for Sylius.

41242.2k](/packages/stefandoorn-sylius-google-tag-manager-enhanced-ecommerce-plugin)[stefandoorn/google-tag-manager-plugin

Google Tag Manager plugin for Sylius.

23286.0k2](/packages/stefandoorn-google-tag-manager-plugin)

PHPackages © 2026

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