gravita/notify-when-available

A Sylius plugin that enables the option of setting a future date when the product will be available. Users can add an email to notify then when the product can be purchased

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

Open Issues: 0

Type:sylius-plugin

pkg:composer/gravita/notify-when-available


README

Plugin Skeleton

Installation

  1. Run composer require gravita/notify-when-available.

  2. Add the plugin to AppKernel.php:

    public function registerBundles(): array
    {
        return array_merge(parent::registerBundles(), [
            
            // ...
    
            new \Gravita\SyliusNotifyWhenAvailablePlugin\GravitaSyliusNotifyWhenAvailablePlugin(),
        ]);
    }
  3. Add the required resource files to your config.yml:

    imports:
       # ...
       - { resource: "@GravitaSyliusNotifyWhenAvailablePlugin/Resources/config/config.yml" }
       - { resource: "@GravitaSyliusNotifyWhenAvailablePlugin/Resources/config/resources.yml" }
  4. Add the bundle routing file to your routing.yml

    gravita_notify_when_available_shop:
        resource: "@GravitaSyliusNotifyWhenAvailablePlugin/Resources/config/app/shop_routing.yml"
  5. Update your database:

    php bin\console doctrine:schema:update --force

Usage

Running plugin tests

Once installed, the plugin adds two fields to the product variant form "Details" tab:

  • Available from: this fields holds the message showed to the user if this product variant is not checked as "Available"
  • Available for purchase: if this fields is not checked the message that is set on "Available from" will bee shown to the user. With this message will be a form to register an email on the notification list of the product variant.