Download the PHP package tavy315/sylius-sales-prices-plugin without Composer
On this page you can find all versions of the php package tavy315/sylius-sales-prices-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tavy315/sylius-sales-prices-plugin
More information about tavy315/sylius-sales-prices-plugin
Files in tavy315/sylius-sales-prices-plugin
Package sylius-sales-prices-plugin
Short Description Sylius plugin for sales prices.
License MIT
Informations about the package sylius-sales-prices-plugin
Sylius Sales Prices Plugin
The sales prices plugin for Sylius allows you to configure nice badges for different set of products based on specific rules. It provides a common set of configuration by default and is very flexible when it comes to adding new ones.
Supports Doctrine ORM driver only.
Installation
Step 1: Install the plugin
Open a command console, enter your project directory and execute the following command to download the latest stable version of this plugin:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the plugin
Then, enable the plugin by adding it to the list of registered plugins/bundles
in config/bundles.php
file of your project:
Step 3: Configure plugin
Step 4: Import routing
Step 5: Customize models
Read more about Sylius models customization here.
Customize your ProductVariant model
Add a Tavy315\SyliusSalesPricesPlugin\Traits\SalesPriceableTrait
trait to your App\Entity\Product\ProductVariant
class.
-
If you use
annotations
mapping: - If you use
xml
mapping:
Step 6: Update your database schema
Usage
From now on you should be able to add new sales prices in the admin panel.