setono/sylius-abandoned-cart-plugin

Reengage customers who abandoned their cart in Sylius

Installs: 6 535

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 2

Open Issues: 13

Type:sylius-plugin

v1.2.0 2024-01-19 07:49 UTC

README

Latest Version Software License Build Status Code Coverage

Installation

composer require setono/sylius-abandoned-cart-plugin

Add bundle to config/bundles.php:

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],
];

Configure plugin

# 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

Configure routes

# config/routes/setono_sylius_abandoned_cart.yaml
setono_sylius_abandoned_cart:
    resource: "@SetonoSyliusAbandonedCartPlugin/Resources/config/routes.yaml"

Install assets

bin/console assets:install

Update your schema

# Generate and edit migration
bin/console doctrine:migrations:diff

# Then apply migration
bin/console doctrine:migrations:migrate

Add cronjob

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