Download the PHP package setono/sylius-abandoned-cart-plugin without Composer
On this page you can find all versions of the php package setono/sylius-abandoned-cart-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono/sylius-abandoned-cart-plugin
More information about setono/sylius-abandoned-cart-plugin
Files in setono/sylius-abandoned-cart-plugin
Package sylius-abandoned-cart-plugin
Short Description Reengage customers who abandoned their cart in Sylius
License MIT
Informations about the package sylius-abandoned-cart-plugin
Abandoned cart plugin for Sylius
Recover lost sales on autopilot. This plugin spots shopping carts your customers leave behind, then emails them a friendly reminder with a one-click link back to their cart — and a compliant unsubscribe link. Everything is tracked in the admin panel so you can see exactly which carts were notified, recovered, or opted out.
Features
- 🛒 Automatic idle-cart detection — finds carts that have been sitting untouched for a configurable amount of time.
- ✉️ Re-engagement emails — a clean, localized email with a recovery call-to-action and an unsubscribe link.
- 🔁 One-click cart recovery — the recovery link restores the customer's cart and records the click for engagement tracking.
- 🚫 Built-in opt-out & eligibility rules — never email customers who unsubscribed, and optionally target newsletter subscribers only.
- 📊 Admin overview — a grid under Marketing → Abandoned cart listing every notification with its state, channel, customer and revenue.
- 🧩 Extensible by design — add your own eligibility rules, tweak the idle-cart query, or override the email template.
- 🌍 15 locales out of the box —
en,da,de,es,fi,fr,hu,it,nl,no,pl,pt,ro,sv,uk.
How it works
The plugin runs as a small pipeline, driven by two commands you schedule on a cron:
- Detect —
create-notificationsfinds carts that have been idle foridle_thresholdminutes and creates aNotificationfor each (initial state:pending). - Process —
process-notificationsruns every pending notification through the eligibility checks, sends the email, and transitions it tosent(orineligibleif a check fails). - Recover — the email contains a recovery link (restores the cart and tracks the click) and an unsubscribe link (records the opt-out so the customer is never emailed again).
Each notification moves through a state machine:
Requirements
| Package | Version |
|---|---|
| PHP | 8.2+ |
| Sylius | ^2.0 |
| Symfony | 6.4 or 7.4 |
Using Sylius 1.x? This branch (
3.x) targets Sylius 2. For Sylius 1.x support, use the2.xbranch.
Installation
1. Require the plugin
2. Register the bundle
Add the plugin to config/bundles.php before SyliusGridBundle — otherwise you'll get a
non-existent parameter "setono_sylius_abandoned_cart.model.notification.class" error, because the
grid configuration references parameters the plugin registers.
3. Import the routes
This registers the admin grid routes (under /admin/abandoned-cart) and the shop routes for cart
recovery and unsubscribe.
4. Configure the salt
The unsubscribe links are signed with a SHA-256 hash. Set a secret salt and change it in production — anyone who knows it could forge unsubscribe links.
5. Install assets
6. Update your database schema
7. Schedule the commands
The plugin needs create-notifications and process-notifications to run regularly. A typical
crontab:
Commands
| Command | What it does |
|---|---|
setono:sylius-abandoned-cart:create-notifications |
Finds idle carts and creates notifications. Supports --dry-run to preview. |
setono:sylius-abandoned-cart:process-notifications |
Runs eligibility checks and sends the emails. |
setono:sylius-abandoned-cart:prune-notifications |
Deletes notifications older than prune_older_than. |
Preview which carts would be picked up, without persisting anything:
Configuration reference
Customization
Add a custom eligibility rule
Implement NotificationEligibilityCheckerInterface and return an EligibilityCheck. With Symfony
autoconfiguration enabled (the default), the plugin discovers and registers your checker
automatically — no service config needed.
If you've disabled autoconfiguration, tag the service manually with
setono_sylius_abandoned_cart.notification_eligibility_checker.
Customize which carts are considered "idle"
The idle-cart query is dispatched as a QueryBuilderForIdleCartsCreated event before it runs, so you
can add your own constraints. The cart root alias is o:
Override the email template
Copy the template into your app and edit it — Symfony's template overriding does the rest:
Override translations
Override any string by redefining its key (under the setono_sylius_abandoned_cart.* prefix) in your
app's translations/messages.<locale>.yml.
Contributing
A full Sylius test application lives in tests/Application for functional tests and manual
testing. See CLAUDE.md for architecture notes and developer conventions.
License
This plugin is released under the MIT License.
All versions of sylius-abandoned-cart-plugin with dependencies
ext-hash Version *
doctrine/orm Version ^2.0 || ^3.0
doctrine/persistence Version ^2.5 || ^3.0
knplabs/knp-menu Version ^3.3
ocramius/doctrine-batch-utils Version ^2.4
psr/event-dispatcher Version ^1.0
psr/log Version ^1.1 || ^2.0 || ^3.0
setono/composite-compiler-pass Version ^1.2
setono/doctrine-orm-trait Version ^1.2
sylius/channel Version ^2.0
sylius/core Version ^2.0
sylius/core-bundle Version ^2.0
sylius/mailer-bundle Version ^2.0
sylius/order Version ^2.0
sylius/resource-bundle Version ^1.12
sylius/ui-bundle Version ^2.0
symfony/config Version ^6.4 || ^7.4
symfony/console 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/routing Version ^6.4 || ^7.4
symfony/validator Version ^6.4 || ^7.4
symfony/workflow Version ^6.4 || ^7.4
twig/twig Version ^3.0
webmozart/assert Version ^1.12