ikuzostudio/stock-alert-plugin

Stock Alert implementation for Sylius.


README

68747470733a2f2f64656d6f2e73796c6975732e636f6d2f6173736574732f73686f702f696d672f6c6f676f2e706e67

Stock Alert

Add Stock Alert & subscription into Sylius.

/!\ Currently in alpha /!\

Quickstart

$ composer require ikuzostudio/stock-alert-plugin

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

return [
  // ...
  Ikuzo\SyliusStockAlertPlugin\IkuzoSyliusStockAlertPlugin::class => ['all' => true],
];

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

# config/packages/_sylius.yaml

imports:
  ...
  - { resource: "@IkuzoSyliusStockAlertPlugin/Resources/config/app/config.yaml"}

Add routes in config/routes.yaml

# config/routes.yaml

ikuzo_stock_alert_routes:
    resource: "@IkuzoSyliusStockAlertPlugin/Resources/config/routing.yaml"

Add the StockAlertChannelInterface to the Channel model and implement it with the StockAlertChannelChannelTrait

use Ikuzo\SyliusStockAlertPlugin\Model\StockAlertChannelInterface;
use Ikuzo\SyliusStockAlertPlugin\Model\StockAlertChannelTrait;

class Channel extends BaseChannel implements StockAlertChannelInterface
{
    use StockAlertChannelTrait;
}