I already read the FAQ about the calculation method of payment fees, here https://forum.virtuemart.net/index.php?topic=123359.0 (https://forum.virtuemart.net/index.php?topic=123359.0), and I understand why is it good usually, but I would like to change it to the "simple way".
So if I give a 5% discount to a $100 cart total amount, I would like to see a $95 sum.
Where should I change the code?
VirtueMart 3.6.10 10211
Joomla 3.9.18
PHP 7.3.17
Find calculation for: $cartTotalAmount
Thank you pinochico!
I found the file (/administrator/components/com_virtuemart/plugins/vmpsplugin.php), and changed, now it works as I would like.
I have only one last question. Is there any way to move this file somwhere else, to make it an override, so if I update the VM, it won't be overwritten with the new version?
I try to put it to the /templates/my_template_name/html/com_virtuemart/plugins/ folder, as the other overrides, but it didn't works.
move it into your payment plugins
have a look at most of the bundled payment methods .. they all over ride the function
function setCartPrices (VirtueMartCart $cart, &$cart_prices, $method, $progressive = true) {
// your code
}