Hello @brendmedia !
Hope you’re doing well today!
Sure, though there is one question with that – whether you want the discount to be applied to all items when a certain limit is reached, if so, then the calculations will look like this:
{number-1} * 1.4
- {number-1} * (1.4 * 0.1)
- min(max(floor(((({number-1} - 101) * (1 - 0)) / (200 - 101)) + 0)), 0), 1) * {number-1} * (1.4 * 0.05)
- min(max(floor(((({number-1} - 201) * (1 - 0)) / (300 - 201)) + 0)), 0), 1) * {number-1} * (1.4 * 0.05)
- min(max(floor(((({number-1} - 301) * (1 - 0)) / (400 - 301)) + 0)), 0), 1) * {number-1} * (1.4 * 0.05)
This will translate to:
– if number <= 100 – 10% discount on all
– if number <= 200 – 15% discount on all
– if number <= 300 – 20% discount on all
As you can see, you can add more of those at the end there until you reach your target value:
- min(max(floor(((({number-1} - 301) * (1 - 0)) / (400 - 301)) + 0)), 0), 1) * {number-1} * (1.4 * 0.05)
Where:
– 301 – lower range
– 400 – upper range
– 1.4 – price
– 0.05 – the additional applicable discount
But if you want it to be like this:
– if number <= 100 – 10% discount on all
– if number <= 200 – 10% discount on first 100, then 5% on the ones above 100
– if number <= 300 – 10% discount on first 100, then 5% on the ones above 100 and 3% on the ones above 200
Then the calculation will look like this:
{number-1} * 1.4
- {number-1} * (1.4 * 0.1)
- min(max(floor(((({number-1} - 101) * (1 - 0)) / (200 - 101)) + 0)), 0), 1) * ({number-1} - 100) * (1.4 * 0.05)
- min(max(floor(((({number-1} - 201) * (1 - 0)) / (300 - 201)) + 0)), 0), 1) * ({number-1} - 200) * (1.4 * 0.03)
Kind regards,
Pawel