snake-tn / catalog-promotion-plugin
Add catalog promotion to sylius application.
Installs: 368
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 2
Forks: 6
Open Issues: 5
Type:sylius-plugin
Requires
- php: ^7.1
- sylius/sylius: ^1.0.0
- webmozart/assert: *
Requires (Dev)
- liip/functional-test-bundle: ^1.7
- nelmio/alice: ^2.3
- phpunit/phpunit: >=5.6
This package is not auto-updated.
Last update: 2024-03-26 22:50:41 UTC
README
About
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.
Setting up the plugin
1) Download the plugin
$ composer require snake-tn/catalog-promotion-plugin
2) Enable the 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(), ]; // ... } }
3) Update routing configuration
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"
3) Update DB schema
$ bin/console doctrine:schema:update --force
4) Cleare cache
$ bin/console cache:clear