Discounts for user groups

You can use the following methods to provide discounts for loyal clients:

  • Using the discount field for each user. This option is available in the Discount field under the Extended table. You can set up discounts for each user individually.
  • Using the field price2. You can see an example below of this field being used for discounts:
    # ID of the FE user group [usergroup = 1]
    priceNoReseller = 2
    [global]
    
  • Using the calculation configured by TypoScript. You can see an example below of how to set up a discount for a product:
    pricecalc {
    10.type = count
    10.field = price
    # Product with with ID 16 will be with 20% discount
    10.where = uid = 16
    # Full price is 1, so we set the 80% of full price
    10.prod.1 = 0.8
    }
    
  • Also, you can set up the discount depending on the number of product items in the basket (1 product costs 4.99, 2 products cost 8.99, and so on.):
    pricecalc {
    10.type = count
    10.field = price
    10.sql.where =
    10.prod.1 = 4.99
    10.prod.2 = 8.99
    10.prod.5 = 19.99
    }
    
    Discounts for user groups

Using the discount field can take too much time because you have to enter these values individually. In this way, user discounts are difficult to overview. If a user amount grows, it then will be more difficult to administrate the discount values if you change it. You can use this method only for special VIP clients who need these values.

If you use field price2, you can specify a global value (user group) that will be used for clients' group discount calculation:

[usergroup = 1]
plugin.tt_products.priceNoReseller = 2
plugin.tt_products.getDiscountPrice = 1
[global]
plugin.tt_products.discountprice {
10.type = count
10.field = price2
10.additive = 0
10.sql.where =
10.prod.1 = 18.25
10.prod.10 = 17.04
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.136.226