Round cart total after applying coupon. Virtuemart 3.x


  • Default avatar
    artem1    
     2 years ago
    0

    Hello everyone,


    Is there any way to round Cart Total after submitting coupon?

    For example Product costs 252 euro.

    Coupon Discount is 21%. Total is 199.08
    I'd like to get 199 without 08.

    Virtuemart gives opportunity to manage prices and currency digits inside administration panel. But it works only for displaying in cart and email message sent to user. When customer hits "Confirm order", VM sends full, not rounded Total to payment system no matter what is set in VM configuration.


    See the some example of what payment system gets



    Hope I'm clear enough.

    Thank you in advance.

  • Your avatar
    seyi    
     2 years ago
    0

    Hello,

    That is really a virtuemart question.  I do not think you will find an option for that, the only thing you would probably be able to do in that case is modify the code.

    The calculations for virtuemart are done in
    www/administrator/components/com_virtuemart/helpers/calculationh.php, function getCheckoutPrices.

    Towards the end somewhere, you could round $this->_cart->cartPrices['billTotal']