Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 1.68 KB

File metadata and controls

67 lines (50 loc) · 1.68 KB

Legacy installation (without SymfonyFlex)

  1. Require plugin with composer:

    composer require sylius/refund-plugin
  2. Add plugin class and other required bundles to your AppKernel:

    $bundles = [
       new \Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
       new \Sylius\RefundPlugin\SyliusRefundPlugin(),
    ];
  3. Import configuration:

    imports:
        - { resource: "@SyliusRefundPlugin/Resources/config/app/config.yml" }
  4. Import routing:

    sylius_refund:
        resource: "@SyliusRefundPlugin/Resources/config/routing.yml"
  5. Configure KnpSnappyBundle (if you don't have it configured yet):

    knp_snappy:
        pdf:
            enabled: true
            binary: #path to your wkhtmltopdf binary file
            options: []
  6. 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
  7. 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/
  8. Clear cache:

    bin/console cache:clear
  9. (optional) If you don't use symfony/messenger component yet, it is required to configure one of the message buses as a default bus:

    framework:
        messenger:
            default_bus: sylius_refund_plugin.command_bus