Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 1.67 KB

legacy_installation.md

File metadata and controls

67 lines (49 loc) · 1.67 KB

Legacy installation (without Symfony Flex)

  1. Require plugin with composer:

    composer require sylius/invoicing-plugin
  2. Add plugin class to your AppKernel:

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

    imports:
        - { resource: "@SyliusInvoicingPlugin/Resources/config/config.yml" }
  4. 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})?$
  5. 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's config.yml:

    knp_snappy:
        pdf:
            enabled: true
            binary: /usr/local/bin/wkhtmltopdf # Change this! :)
            options: []
  6. Apply migrations to your database:

    bin/console doctrine:migrations:migrate
  7. 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
  8. Clear cache:

    bin/console cache:clear