Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

This plugin provides "send notification when product is available" feature for products out of stock.

License

Notifications You must be signed in to change notification settings

workouse/availability-notifier-sylius

Repository files navigation

availability-notifier-sylius

Scrutinizer Code Quality Build Status

This plugin provides "send notification when product is available" feature for products out of stock.

Screenshots:

Installation

$ composer require workouse/availability-notifier-sylius

Add plugin dependencies to your config/bundles.php file:

return [
    ...

    Workouse\AvailabilityNotifierPlugin\WorkouseAvailabilityNotifierPlugin::class => ['all' => true],
];

Import required config in your config/packages/_sylius.yaml file:

# config/packages/_sylius.yaml

imports:
    ...
    
    - { resource: "@WorkouseAvailabilityNotifierPlugin/Resources/config/config.yml" }

Import routing in your config/routes.yaml file:

# config/routes.yaml
...

workouse_availability_notifier_plugin:
    resource: "@WorkouseAvailabilityNotifierPlugin/Resources/config/routing.yml"

Finish the installation by updating the database schema and installing assets:

$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
$ bin/console cache:clear

Usage

You can use @WorkouseAvailabilityNotifierPlugin/_outOfStock.html.twig template to enable adding/removing/displaying wishlist from the Twig UI.

For an example on how to do that, take a look at these source files.

Testing & running the plugin

$ composer install
$ cd tests/Application
$ yarn
$ yarn build
$ bin/console assets:install public -e test
$ bin/console doctrine:database:create -e test
$ bin/console doctrine:schema:create -e test
$ bin/console server:run 127.0.0.1:8080 -d public -e test
$ open http://localhost:8080
$ vendor/bin/behat

About

This plugin provides "send notification when product is available" feature for products out of stock.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published