Calculate weighted percentages to incorporate discounts

44 Views Asked by At

I apologize if I have titled this question incorrectly.

I am selling products online. Customers can purchase the products plain, or they can purchase it with one of two logo design applications, printed or embroidered.

I intended customers to benefit from bulk quantity discounts increasing as they purchased more products.

I initially intended to offer the following discounts

Product Price   4%  9%  15% 22% 30%
Embroidery      16% 25% 33% 50% 58%
Printing        8%  16% 25% 41% 58%

The quantity bands to which discounts are applied are consistent throughout all three categories. The quantity bands are as follows:

1-4 items (no discount)
5-9 items 
10-24 items  
25-49 items 
50-99 items 
100+ items 

Product prices range from £2-£200.

The base prices for both Embroidery and Printing are fixed at £5.99.

For example lets say someone wants to order 17 of a product that has a unit price of £19.99 with embroidery customisations.

The following two rules should apply:

Products
17 x £19.99 = £339.83
15% = 50.98
£339.83 - 50.98 = £288.85

Customisations
£3.90 x 17 = £66.30

Total
£355.25

For technical reasons I can only incorporate one discount rule per order. Therefore if a person wants to order uncustomised products I am able to apply the discount rule. However, if they order customised products I can only apply a rule that now needs to incorporate both the product discount and customisation discount.

How can I calculate the new rule for customisations that will correctly incorporate the desired combined discount in one rule?