Skip to content

matthiez/sylius-origin-plugin

Repository files navigation

Sylius Origin Plugin

Adds a "origin" field to your product entity and a filter to the frontend.

Installation

  1. Add the "repositories" key to to composer.json
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:ecolos-de/sylius-origin-plugin.git"
        }
    ],
  1. Install package from Github via terminal
composer require ecolos/sylius-origin-plugin
  1. add to config/bundles.php
    Ecolos\SyliusOriginPlugin\EcolosSyliusOriginPlugin::class => ['all' => true],
  1. Add to config/packages/_sylius.yml
    - { resource: "@EcolosSyliusOriginPlugin/Resources/config/_sylius.yml" }
  1. Add to config/services.yml
    - { resource: "@EcolosSyliusOriginPlugin/Resources/config/services.yml" }
  1. Add to src/Entity/Product.php
use Ecolos\SyliusOriginPlugin\Entity\OriginTrait;
class Product extends BaseProduct implements ProductInterface
{ 
    use EuTrait, MakerTrait, OriginTrait, SeoTrait;
}
  1. Update doctrine changes
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:execute --up XXXXXXXXXXX

ToDo

  • Write tests

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published