sylius/price-history-plugin

Implementation of the Omnibus Directive for Sylius application.

Installs: 14 939

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-04-11 20:05:58 UTC


README

Sylius Logo.

Price History Plugin

68747470733a2f2f73796c6975732e636f6d2f6173736574732f62616467652d6f6666696369616c2d73796c6975732d706c7567696e2e706e67

⚙️ 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.