Please could you fix it for someone to take a loot at the glitch I've found in the '%off cheapest item' quantity based discounts that leads to bad discounting. It is very easy for anyone using Actinic to lose money through this glitch an it's been causing trouble for me and a lot of other people for a long time. I have described the problem and the cause below but I am not profficient enough at Perl to fix it myself. Please help.
Having looked at Actinic V8 code as far as I can see the problem persists in the new version and really needs fixing. This isn't just a little bit of an irritating bug or a problem with the way users are setting the discounting up - this is a genuine flaw in the discounting code that has the strong potential to lose money for anyone using quantity based '%off cheapest' discounting such as '3 for 2' offers.
The problem is in ActinicDiscounts.pm - search for 'reward % off cheapest'
As far as I can see Actinic sorts items by value high to low to identify discounts. Then counts backwards from the most expensive to calculate '% off cheapest' quantity based discounts.
If you offer 3 for 2 (100% off cheapest when you order 3 from a group of items) and the items cost £3, £2, and £1 and someone orders one of each this is fine, they get the £1 item free. But if people order more than 3 items from the discountable group the problems start. This is because the code is working on the principle that the next item on the list is the cheapest. However ...
If I order 2 x £3, 1 x £2 and 1 x £1 items then on our 3 for 2 offer Actinic counts backwards from the most expensive and discounts the 3rd item i.e. £2 - but the cheapest item is actually the £1 item. Worse still if I order 3 x £3, and 1 x £1 then it still discounts the 3rd item on the most expensive list ... which is £3!! Not the cheapest qualifying item which is £1. Try it - I'm not kidding.
I can think of a number of potential ways to fix this but I'm no Perl programmer so I don't know which is best. The crux is that the discounts should be applied to the last qualifying items on the list not the next qualifying items.
Having looked at Actinic V8 code as far as I can see the problem persists in the new version and really needs fixing. This isn't just a little bit of an irritating bug or a problem with the way users are setting the discounting up - this is a genuine flaw in the discounting code that has the strong potential to lose money for anyone using quantity based '%off cheapest' discounting such as '3 for 2' offers.
The problem is in ActinicDiscounts.pm - search for 'reward % off cheapest'
As far as I can see Actinic sorts items by value high to low to identify discounts. Then counts backwards from the most expensive to calculate '% off cheapest' quantity based discounts.
If you offer 3 for 2 (100% off cheapest when you order 3 from a group of items) and the items cost £3, £2, and £1 and someone orders one of each this is fine, they get the £1 item free. But if people order more than 3 items from the discountable group the problems start. This is because the code is working on the principle that the next item on the list is the cheapest. However ...
If I order 2 x £3, 1 x £2 and 1 x £1 items then on our 3 for 2 offer Actinic counts backwards from the most expensive and discounts the 3rd item i.e. £2 - but the cheapest item is actually the £1 item. Worse still if I order 3 x £3, and 1 x £1 then it still discounts the 3rd item on the most expensive list ... which is £3!! Not the cheapest qualifying item which is £1. Try it - I'm not kidding.
I can think of a number of potential ways to fix this but I'm no Perl programmer so I don't know which is best. The crux is that the discounts should be applied to the last qualifying items on the list not the next qualifying items.
Comment