Exchange fee added inclorrectly
-
I upgraded to pro and noted the exchange fee is not working as expected. At first it appeared to be doing nothing but then I realised the maths error.
In modules/APBDWMC_general.php you have this line:
$price=@$price*$this->active_currency->rate+floatval($this->active_currency->ex_fee);This takes the price and multiplies it by the exchange rate plus the fee.
However, due to BIDMASS rules the multiplication happens first and so the exchange fee is just added to the total and not to the rate.E.g. Price = 10, Exhchange rate is 2, fee is 0.5
Current code will make (10 * 2) + 0.5 = 20.5
When the expected result is 10 * (2 + 0.5) = 25When our order values very from £150-2000 adding a fixed amount to the total doesn’t work it needs to be the rate that changes.
I fixed this on my copy for now by calculating the rate before I multiply it by the price but it will get overwritten in the next update unless you fix it to.
Thanks.
- The topic ‘Exchange fee added inclorrectly’ is closed to new replies.