sylius/price-history-plugin

Implementation of the Omnibus Directive for Sylius application.

Installs: 18 209

Dependents: 0

Suggesters: 0

Security: 0

Stars: 10

Watchers: 11

Forks: 9

Open Issues: 2

Type:sylius-plugin

This package is auto-updated.

Last update: 2024-07-11 20:38:01 UTC


README

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.