Brille24 / SyliusTierpricePlugin

A plugin for Sylius that implements tier pricing
MIT License
44 stars 38 forks source link
price product-variant sylius tier-prices variants

Sylius Tier Price Plugin

Build Status

This plugin adds tier pricing to Sylius one product has different prices based on the quantity.

Installation

Integration

Usage

First of all you have to set up a product with as many variants as you want. Then in each of these variants you can set the tier pricing based on the channels. The table automatically sorts itself to provide a better overview for all different tiers, you configured.

In the frontend the user will see a nice looking table right next to the "add to cart" button that shows the discount for the different tiers like so:

Creating data

You can easily create the tier prices with fixtures like that.

sylius_fixtures:
    suites:
        my_suite:
            fixtures:
                tier_prices:
                    options:
                        custom:
                            - product_variant: "20125148-54ca-3f05-875f-5524f95aa85b"
                              channel: US_WEB
                              quantity: 10
                              price: 5

For this the products need to be created first and the product variant must also exist.