odiseoteam/sylius-vendor-plugin

Vendor plugin for Sylius. Add Vendor (Brand) to your products.

Installs: 738

Dependents: 0

Suggesters: 0

Stars: 23

Watchers: 4

Forks: 5

Open Issues: 4

Language:JavaScript

Type:sylius-plugin


README

Description

This plugin add vendors (Brands) to the Sylius products. The vendors are fully customizable by the admin.

Now supporting Sylius 1.3 with Symfony 4 + Flex structure.

Vendors admin

Installation

  1. Run composer require odiseoteam/sylius-vendor-plugin.

  2. Add the plugin to the bundles.php but add it before SyliusResourceBundle.

  3. Import the plugin configurations. For example on services.yaml:

imports:
    - { resource: "@OdiseoSyliusVendorPlugin/Resources/config/config.yml" }
  1. Add the shop and admin routes:
odiseo_sylius_vendor_admin:
    resource: "@OdiseoSyliusVendorPlugin/Resources/config/routing/admin.yml"
    prefix: /admin

odiseo_sylius_vendor_shop:
    resource: "@OdiseoSyliusVendorPlugin/Resources/config/routing/shop.yml"
    prefix: /{_locale}
    requirements:
        _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
  1. Add the vendor select box to the product form edit page. So, you need to create "templates/bundles/SyliusAdminBundle/Product/Tab/_details.html.twig"
{# ... #}
{{ form_row(form.vendors) }}
{# ... #}
  1. Update your schema and/or migrations.

Fixtures

This plugin comes with fixtures:

Vendors

Simply add this configuration on your fixture suite:

vendor:
    options:
        vendors_per_channel: 12

Test the plugin

You can follow the instructions to test this plugins in the proper documentation page: Test the plugin.

Credits

This plugin is maintained by Odiseo. Want us to help you with this plugin or any Sylius project? Contact us on team@odiseo.com.ar.