composer require setono/sylius-abandoned-cart-plugin
Make sure you add it before SyliusGridBundle
, otherwise you'll get
You have requested a non-existent parameter "setono_sylius_abandoned_cart.model.notification.class".
exception.
<?php
// config/bundles.php
return [
// ...
Setono\SyliusAbandonedCartPlugin\SetonoSyliusAbandonedCartPlugin::class => ['all' => true],
];
# config/packages/setono_sylius_abandoned_cart.yaml
imports:
- { resource: "@SetonoSyliusAbandonedCartPlugin/Resources/config/app/config.yaml" }
setono_sylius_abandoned_cart:
# When unsubscribing a customer a hash is used to prevent false unsubscribes. This hash is generated using this salt.
salt: your_secret_salt
# config/routes/setono_sylius_abandoned_cart.yaml
setono_sylius_abandoned_cart:
resource: "@SetonoSyliusAbandonedCartPlugin/Resources/config/routes.yaml"
bin/console assets:install
# Generate and edit migration
bin/console doctrine:migrations:diff
# Then apply migration
bin/console doctrine:migrations:migrate
The following command should run on a regular basis:
bin/console setono:sylius-abandoned-cart:process
also, if you want to prune the notifications table you can run:
bin/console setono:sylius-abandoned-cart:prune