PHP code example of aropixel / sylius-stock-alert-plugin

1. Go to this page and download the library: Download aropixel/sylius-stock-alert-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aropixel / sylius-stock-alert-plugin example snippets

 bin/console assets:install

...
use Aropixel\SyliusStockAlertPlugin\Entity\ProductVariantTrait as AropixelSyliusStockAlertProductVariantTrait;
...

/**
 * @ORM\Entity
 * @ORM\Table(name="sylius_product_variant")
 */
class ProductVariant extends BaseProductVariant
{
    use AropixelSyliusStockAlertProductVariantTrait {
        AropixelSyliusStockAlertProductVariantTrait::__construct as private __stockAlertTraitConstruct;
    }

    public function __construct()
    {
        $this->__stockAlertTraitConstruct();
        parent::__construct();
    }

...
}


php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate