Catalog promotion is a sylius plugin used to selectively apply promotions on certain products. The promotion is triggered before a product is placed into the shipping cart.
$ composer require snake-tn/catalog-promotion-plugin
Enable the plugin by adding the following line in the app/AppKernel.php file of your sylius project:
// app/AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
// ...
new \SnakeTn\CatalogPromotion\CatalogPromotionPlugin(),
];
// ...
}
}
Add the following routing config to your app/config/routing.yml file of your sylius project:
catalog_promotion_admin:
prefix: /admin
resource: "@CatalogPromotionPlugin/Resources/config/routing.yml"
$ bin/console doctrine:schema:update --force
$ bin/console cache:clear