babdev/supplier-plugin

Supplier processing for Sylius.

Installs: 390

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 2

Open Issues: 0

Type:sylius-plugin

This package is auto-updated.

Last update: 2020-10-06 00:52:35 UTC


README

Simple Supplier integration for Sylius.

Usage

  1. Install it:

    $ composer require babdev/supplier-plugin
  2. Add this plugin in AppKernel.php. Note that this plugin MUST be listed before the Sylius core bundles, therefore your registerBundles() method should look similar to the following (a pull request would be welcome removing this requirement, as of this writing I haven't identified the issue causing it):

    public function registerBundles(): array
    {
        $preResourceBundles = [
            new \BabDev\SyliusSupplierPlugin\BabDevSyliusSupplierPlugin(),
        ];
    
        $appBundles = [
            // Other local bundles you have installed
        ];
    
        return array_merge($preResourceBundles, parent::registerBundles(), $appBundles);
    }
  3. Import config file in app/config/config.yml:

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

    babdev_sylius_supplier_admin:
        resource: "@BabDevSyliusSupplierPlugin/Resources/config/app/admin_routing.yml"
        prefix: /admin # root path of SyliusAdmin
  5. Sync the database

    bin/console doctrine:migrations:diff 

    If you have already installed Sylius, you will need to run

    bin/console doctrine:migrations:migrate

    If you still need to run sylius:install, you can skip this last command.

Complementary documentation