-
Require plugin with composer:
composer require sylius/invoicing-plugin
-
Add plugin class to your
AppKernel
:$bundles = [ new \Knp\Bundle\SnappyBundle\KnpSnappyBundle(), new \Sylius\InvoicingPlugin\SyliusInvoicingPlugin(), ];
-
Import configuration:
imports: - { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" }
-
Import routing:
sylius_invoicing_plugin_admin: resource: "@SyliusInvoicingPlugin/Resources/config/app/routing/admin_invoicing.yml" prefix: /admin sylius_invoicing_plugin_shop: resource: "@SyliusInvoicingPlugin/Resources/config/app/routing/shop_invoicing.yml" prefix: /{_locale} requirements: _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
-
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
-
If you want to generate invoices for orders placed before plugin's installation run the following command using your terminal:
bin/console sylius-invoicing:generate-invoices
-
Clear cache:
bin/console cache:clear