Download the PHP package setono/sylius-coupon-url-application-plugin without Composer

On this page you can find all versions of the php package setono/sylius-coupon-url-application-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sylius-coupon-url-application-plugin

Sylius Coupon URL Application Plugin

Latest Version Build Status Code Coverage Mutation testing

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

Installation

Import routing

or if your app doesn't use locales:

Install assets

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.


All versions of sylius-coupon-url-application-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
doctrine/persistence Version ^3.0 || ^4.0
setono/doctrine-orm-trait Version ^1.2
sylius/core Version ^2.0
sylius/core-bundle Version ^2.0
sylius/order Version ^2.0
sylius/promotion Version ^2.0
symfony/config Version ^6.4 || ^7.4
symfony/dependency-injection Version ^6.4 || ^7.4
symfony/event-dispatcher Version ^6.4 || ^7.4
symfony/form Version ^6.4 || ^7.4
symfony/http-foundation Version ^6.4 || ^7.4
symfony/http-kernel Version ^6.4 || ^7.4
twig/twig Version ^3.0
webmozart/assert Version ^1.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package setono/sylius-coupon-url-application-plugin contains the following files

Loading the files please wait ...