-
Require plugin with composer:
composer require sylius/refund-plugin
-
Add plugin class and other required bundles to your
AppKernel:$bundles = [ new \Knp\Bundle\SnappyBundle\KnpSnappyBundle(), new \Sylius\RefundPlugin\SyliusRefundPlugin(), ];
-
Import configuration:
imports: - { resource: "@SyliusRefundPlugin/Resources/config/app/config.yml" }
-
Import routing:
sylius_refund: resource: "@SyliusRefundPlugin/Resources/config/routing.yml"
-
Configure
KnpSnappyBundle(if you don't have it configured yet):knp_snappy: pdf: enabled: true binary: #path to your wkhtmltopdf binary file options: []
-
Copy plugin migrations to your migrations directory (e.g.
src/Migrations) and apply them to your database:cp -R vendor/sylius/refund-plugin/migrations/* src/Migrations bin/console doctrine:migrations:migrate -
Copy Sylius templates overridden in plugin to your templates directory (e.g
templates/bundles/):mkdir -p templates/bundles/SyliusAdminBundle/ cp -R vendor/sylius/refund-plugin/src/Resources/views/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/ -
Clear cache:
bin/console cache:clear
-
(optional) If you don't use
symfony/messengercomponent yet, it is required to configure one of the message buses as a default bus:framework: messenger: default_bus: sylius_refund_plugin.command_bus