News:

Support the VirtueMart project and become a member

Main Menu

Payment discount not correct?

Started by mickey3k, July 30, 2015, 12:27:54 PM

Previous topic - Next topic

mickey3k

Hi all!

In my VM3 shop, I added a 3% discount to my payment method "prepayment". It seems to work in the checkout process, but not entirely correct..
If I have a cart total of 372,00€, 3% discount should be 11,16€, but Virtuemart gives me 11,11€. This increases with rising product price of course. With 2 items of said product it would be 744,00€, so 3% would be 22,32€. Virtuemart gives me 21,67€.

Does anyone have an idea where this slight difference could come from?

Thanks!
Michael

edit: I just read this post: https://forum.virtuemart.net/index.php?topic=117823.30

Apparently, this does not seem to be an error according to Milbo. But the calculation is wrong, nontheless, at least in the German version. Here, the discount in the payment options is labelled as "Skonto", which is a common thing in Germany and other countries to guarantee a customer a discount of some percent if he pays before a deadline.
The calculation is simple: 3% Skonto is just 3% off the final price. Say 100€ final price, 3% Skonto, would be 97€ to pay for the customer, nothing else.

But this is NOT what the "payment standard cost percent total" is calculating.

So I guess I would have to adapt the calculation myself.. This should be in the file plugins/payments/standard/standard.php right?
Can someone tell me where and how to change the calculation so that the 3% are subtracted from the final price?
I'm not that good in PHP unfortunately.

That would be a great help for everyone (at least in Germany ;)) who wants to use the Skonto discount. This is clearly not the correct calculation. Thanks!

razor7

MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store