Download the PHP package tmonier/sylius-withdrawal-plugin without Composer

On this page you can find all versions of the php package tmonier/sylius-withdrawal-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-withdrawal-plugin

Sylius Withdrawal Plugin

Français : README.fr.md

Build

The EU "withdraw from contract here" button for Sylius 2.

Since 19 June 2026, every online shop selling to consumers in the European Union must offer a withdrawal function: a clearly labelled button letting consumers withdraw from a distance contract online, followed by a confirmation step and an acknowledgement of receipt on a durable medium (Article 11a of Directive 2011/83/EU, introduced by Directive (EU) 2023/2673).

This plugin implements it for Sylius 2.2+, free and open source.

Features

Requirement (Art. 11a) What the plugin does
Function labelled "withdraw from contract here", continuously available, easily accessible Link in the footer of every shop page and button on the customer's order page. No login required.
Consumer provides or confirms name, contract and e-mail Statement form, prefilled for logged-in customers (recital 37)
Separate step labelled only "confirm withdrawal" Dedicated confirmation page with a single confirm button; nothing is recorded before it
Acknowledgement of receipt on a durable medium with content, date and time E-mail sent immediately with the full statement and the server timestamp
Statement sent within the period is timely Statements are never refused; timeliness is computed and shown to the merchant

Also included:

Screenshots

Confirmation step Acknowledgement of receipt

Requirements

Version
PHP 8.2+
Sylius 2.2, 2.3
Symfony 6.4, 7.4, 8.0

Installation

  1. Require the package:

  2. Register the bundle in config/bundles.php (Symfony Flex does it automatically once a recipe exists):

  3. Import the configuration in config/packages/tmonier_sylius_withdrawal.yaml:

  4. Import the routes in config/routes/tmonier_sylius_withdrawal.yaml:

  5. Run the migrations:

  6. Make sure each channel has a contact e-mail if you want to receive merchant notifications.

Configuration

Each confirmed statement records a request and sends e-mails to the address typed in the form, so the confirmation step is rate limited (sliding window, with a lock so parallel requests cannot get through together). The limits are deliberately high: the withdrawal function is a legal obligation, and a consumer who hits them keeps the statement and can confirm it later (HTTP 429 with a flash message). The form step itself is never limited. Set enabled: false if your infrastructure already throttles these routes.

The withdrawal period starts when the goods are delivered (Art. 9). Sylius does not track delivery, so the plugin uses the last shipment date, falling back to the checkout completion date. The deadline is informational.

Customisation

Every page is built with Twig Hooks:

Hook Content
sylius_shop.base.footer.content.menu.help_links → tmonier_withdrawal Footer link
sylius_shop.account.order.show.content.main.header.buttons → tmonier_withdrawal Button on the account order page
tmonier_withdrawal.shop.withdrawal.form.content Statement form page
tmonier_withdrawal.shop.withdrawal.confirm.content Confirmation page
tmonier_withdrawal.shop.withdrawal.done.content Acknowledgement page
tmonier_withdrawal.admin.withdrawal_request.show.content.sections#left/#right Admin detail page

E-mail templates can be overridden in templates/bundles/TmonierSyliusWithdrawalPlugin/email/.

[!IMPORTANT] If you move or restyle the footer link, keep it prominent and reachable from every page, and keep the confirm button labelled only with the official wording.

What you still have to do

The plugin provides the technical function. As a merchant you remain responsible for:

This plugin is not legal advice.

Development

B2B demo

This plugin is used in the Sylius B2B demo: a Sylius 2.3 shop with fictitious sample data where the B2B plugins work together. The source code, setup and fixtures of the demo are in that repository.

The demo is an example, not a production setup.

License

MIT. See LICENSE.


All versions of sylius-withdrawal-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
sylius/sylius Version ^2.2
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 tmonier/sylius-withdrawal-plugin contains the following files

Loading the files please wait ...