Sylius / PriceHistoryPlugin

Implementation of "Directive (EU) 2019/2161 of the European Parliament and of the Council", also known as the "Omnibus Directive".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Price History Plugin

⚙️ Installation

We encourage you to use the installation instructions based on Rector and Recipes as it is more convenient and faster. The legacy installation guide is available here.

Installation with Recipes and Rector

Before you start, you need to have both SyliusRecipes and SyliusRector installed. You can find how to install them here:

  1. Run:

    composer require sylius/price-history-plugin --no-scripts
  2. Update <project_root>/rector.php

    + use Sylius\SyliusRector\Set\SyliusPriceHistory;
    
    return static function (RectorConfig $rectorConfig): void {
        // ...
    +    $rectorConfig->sets([SyliusPriceHistory::PRICE_HISTORY_PLUGIN]);
    };
    
  3. Run:

    vendor/bin/rector
  4. Ensure you have modified resource configured in config/packages/_sylius.yaml:

    sylius_channel:
        resources:
            channel:
                classes:
                    model: App\Entity\Channel\Channel
    sylius_core:
        resources:
            channel_pricing:
                classes:
                    model: App\Entity\Channel\ChannelPricing
  5. Execute migrations:

    bin/console doctrine:migrations:migrate
  6. Rebuild the cache to display all new translations correctly:

    bin/console cache:clear
    bin/console cache:warmup
  7. Run messenger consumer:

    bin/console messenger:consume main

    For more information check official Symfony docs.

About

Implementation of "Directive (EU) 2019/2161 of the European Parliament and of the Council", also known as the "Omnibus Directive".

License:MIT License


Languages

Language:PHP 80.5%Language:Gherkin 13.2%Language:Twig 4.6%Language:JavaScript 1.5%Language:Makefile 0.2%