Subototal : 44,00 €
Free shipping : 0,00 €
Group discount 30%: -13,20 €
TAX 20% : 5,13 €
Total : 28,60 €
This is what i get on checkout. But 44,00€ - 13,20€ = 30,80€ not 28,60€
What's wrong here?
Tnx
Subototal : 44,00 €
Free shipping : 0,00 €
Group discount 30%: -13,20 €
TAX 20% : 5,13 €
Total : 28,60 €
This is what i get on checkout. But 44,00€ - 13,20€ = 30,80€ not 28,60€
What's wrong here?
Tnx
exact same problem here
any help?
http://www.discoverthedivinetruth.com - Can you believe it?
Hi all,
the group pricing module is not calculating the discounts correctly.
I.E.
Subototal : 44,00 €
Free shipping : 0,00 €
Group discount 30%: - 15,40 € (correct would be -13,20 €)
TAX 20% : 5,13 €
Total : 28,60 €
This is what i get on checkout. But 44,00€ - 13,20€ = 30,80€ not 28,60€
Where is the calculation done and what is wrong?
Thanks a lot
http://www.discoverthedivinetruth.com - Can you believe it?
I am experiencing the exact same issue with group pricing.
Has anyone resolved this?
Sean
There's a piece of code in the ot_group_pricing like this:
I don't have any idea why a small ratio to avoid divide by zero errors would be calculated this way ...Code:$discount = ($order_total - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100; $od_amount['total'] = round($discount, 2); $ratio = $od_amount['total']/$order_total; /** * when calculating the ratio add some insignificant values to stop divide by zero errors */
With my 15,10eur test purchase and 3% discount, it sets the ratio to:
0.45 / 15.1 = 0.0298013245033
0.45 is the right discount, but for somereason the 0,029801... is added to the discount a bit further down in the code.... Why?
Anyway, I got my discounts working by adding a truelly insignificant ration of 0.0000000001
So replace
$ratio = $od_amount['total']/$order_total;
with
$ratio = 0.0000000001;
in the module code and it should work!
Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004
ok... disrecard what I just posted
It only works with certain cases and will not work in most cases
The problem with the ot_group_pricing module seems to be, that if you calculate the discount so it includes shipping it works, but if you don't want to calculate it with shipping, it deducts the shipping cost from the order_total before calculating BUT does not remove the shipping costs TAX from the order_total tax field when it calculates the new tax... Thus the shipping costs tax is still calculated even there's no shipping included in the discount!
makes any sense?
Please make these damn modules more straight forward with in 2.0 PLEASE!
Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004