PHPackages                             setono/sylius-coupon-url-application-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. [API Development](/categories/api)
4. /
5. setono/sylius-coupon-url-application-plugin

ActiveSylius-plugin[API Development](/categories/api)

setono/sylius-coupon-url-application-plugin
===========================================

Apply Sylius promotion coupons via a URL query string or a dedicated /coupon page.

v2.0.0(2y ago)415.1k↓68.2%MITPHPPHP &gt;=8.1CI passing

Since Jan 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Setono/SyliusCouponUrlApplicationPlugin)[ Packagist](https://packagist.org/packages/setono/sylius-coupon-url-application-plugin)[ GitHub Sponsors](https://github.com/Setono)[ RSS](/packages/setono-sylius-coupon-url-application-plugin/feed)WikiDiscussions 3.x Synced 3d ago

READMEChangelog (7)Dependencies (75)Versions (11)Used By (0)

Sylius Coupon URL Application Plugin
====================================

[](#sylius-coupon-url-application-plugin)

[![Latest Version](https://camo.githubusercontent.com/391c05aa5288bf81da8b00a18135dd2fb9be3869858e83888f28216033339abc/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f73796c6975732d636f75706f6e2d75726c2d6170706c69636174696f6e2d706c7567696e2f762f737461626c65)](https://packagist.org/packages/setono/sylius-coupon-url-application-plugin)[![Software License](https://camo.githubusercontent.com/82f940288f93a07a92062f12b4bf4947bd6149d0f39f794602be8a116860d82a/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f73796c6975732d636f75706f6e2d75726c2d6170706c69636174696f6e2d706c7567696e2f6c6963656e7365)](LICENSE)[![Build Status](https://github.com/Setono/SyliusCouponUrlApplicationPlugin/workflows/build/badge.svg)](https://github.com/Setono/SyliusCouponUrlApplicationPlugin/actions)[![Code Coverage](https://camo.githubusercontent.com/1f625a2ab8a466b235068e60b460538d7e6dd5dd98f8618707d507bc62354069/68747470733a2f2f636f6465636f762e696f2f67682f5365746f6e6f2f53796c697573436f75706f6e55726c4170706c69636174696f6e506c7567696e2f67726170682f62616467652e737667)](https://codecov.io/gh/Setono/SyliusCouponUrlApplicationPlugin)[![Mutation testing](https://camo.githubusercontent.com/66dff18661d3dad7f09d2396720ba0eb36d6a6c5a088f4a43c1aa60f9f6e6114/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532465365746f6e6f25324653796c697573436f75706f6e55726c4170706c69636174696f6e506c7567696e253246332e78)](https://dashboard.stryker-mutator.io/reports/github.com/Setono/SyliusCouponUrlApplicationPlugin/3.x)

Apply coupons by going to `example.com/coupon` or directly from the URL by going to `example.com/?coupon=CODE`.

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

[](#installation)

```
composer require setono/sylius-coupon-url-application-plugin
```

### Import routing

[](#import-routing)

```
# config/routes/setono_sylius_coupon_url_application.yaml
setono_sylius_coupon_url_application:
    resource: "@SetonoSyliusCouponUrlApplicationPlugin/config/routes.yaml"
```

or if your app doesn't use locales:

```
# config/routes/setono_sylius_coupon_url_application.yaml
setono_sylius_coupon_url_application:
    resource: "@SetonoSyliusCouponUrlApplicationPlugin/config/routes_no_locale.yaml"
```

### Install assets

[](#install-assets)

```
php bin/console assets:install
```

How coupon application works
----------------------------

[](#how-coupon-application-works)

The plugin's main use case is sending coupon links from email campaigns, newsletters, ads, etc. A customer clicks `https://example.com/?coupon=CHRISTMAS`and the coupon is **attached to their cart immediately** — even before they have added a single item. As soon as the cart matches the promotion's rules (e.g. a minimum cart total, a required taxon), the discount activates.

To support this flow, the plugin runs the coupon application in two stages:

1. **Coupon-level eligibility** (`PromotionCouponEligibilityCheckerInterface`) — gates whether the coupon is attached at all. This checks the coupon's start/end dates, total usage limit, per-customer usage limit, and channel applicability. If any of these fail, the coupon is rejected with an error flash and **not** attached to the cart.
2. **Promotion-level eligibility** (`PromotionEligibilityCheckerInterface`) — determines which flash the customer sees after the coupon is attached. This includes the underlying promotion's rules (cart-total threshold, taxon/product allow-lists, etc.):

    - **Cart already qualifies** → success flash `setono_sylius_coupon_url_application.coupon_applied`("The coupon code is now activated in your cart")
    - **Cart doesn't qualify yet** → info flash `setono_sylius_coupon_url_application.coupon_applied_not_fulfilled`("The coupon code is saved in your cart, but the discount is not active yet because your cart does not contain the items, amounts or meet other criteria that the coupon requires…")

This deliberately differs from Sylius's built-in cart coupon widget, which rejects coupons up-front when the cart doesn't satisfy promotion rules. The plugin's leniency is the point — customers should be able to click the link in an email *before* shopping, not after.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance60

Regular maintenance activity

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 98.4% 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 ~136 days

Recently: every ~205 days

Total

10

Last Release

48d ago

Major Versions

1.x-dev → v2.0.0-alpha2024-02-15

v2.0.0 → v3.0.0-alpha2026-05-18

PHP version history (4 changes)v1.0.0PHP &gt;=7.4

v1.1.0PHP &gt;=8.0

v2.0.0-alphaPHP &gt;=8.1

v3.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 (60 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

phpsyliussylius-pluginsymfonysymfony-bundlesyliussylius-plugin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/setono-sylius-coupon-url-application-plugin/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.5k5.9M737](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

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

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[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)

PHPackages © 2026

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