Installation
1. Enable community recipes
If prompted, allow community recipes to be used so that the plugin can configure itself automatically:
composer config extra.symfony.allow-contrib true
2. Require the plugin
Install the Refund Plugin via Composer:
composer require sylius/refund-plugin
3. Apply database migrations
Run the Doctrine migrations to create the refund-related tables:
bin/console doctrine:migrations:migrate
4. Rebuild frontend assets
Compile or rebuild your admin-panel assets:
yarn encore dev
# or for production
yarn encore production
5. Install wkhtmltopdf
The plugin uses wkhtmltopdf to generate PDF credit memos. You can download it from https://wkhtmltopdf.org/downloads.html.
By default, the plugin assumes the binary is located at:
/usr/local/bin/wkhtmltopdf
6. Set binary path (if needed)
If the executable is elsewhere, define its path in your environment configuration:
# .env
WKHTMLTOPDF_PATH=/path/to/wkhtmltopdf
7. Clear cache
After installation, clear your cache:
bin/console cache:clear
Result
Once these steps are complete, refund management features will appear in the Sylius Admin interface. You can issue full or partial refunds directly from the order view and automatically generate credit memo PDFs.
Optional configuration - PDF generator
By default, PDF generation is enabled.
If you prefer to disable it (for example, to avoid dependency on wkhtmltopdf), edit config/packages/sylius_refund.yaml
:
sylius_refund:
pdf_generator:
enabled: false
Ensure that your refund workflow operates correctly even when PDF generation is disabled.
Last updated
Was this helpful?