-
Require plugin with composer:
composer require sylius/refund-plugin
-
Add plugin class and other required bundles to your
config/bundles.php
:$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"
-
Check if you have
wkhtmltopdf
binary. If not, you can download it here.In case
wkhtmltopdf
is not located in/usr/local/bin/wkhtmltopdf
, add a following snippet at the end of your application'sconfig.yml
:knp_snappy: pdf: enabled: true binary: /usr/local/bin/wkhtmltopdf # Change this! :) options: []
-
Apply migrations to your database:
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