Reputation: 858
In Magento, I am trying to round up the grand total value at the shopping basket stage. I apply a discount voucher and end up with decimals like .24. I would like to round it to the nearest number.
It wouldn't be as simple as rounding the display value. The grand total needs to be sent to Paypal, Sagepay, etc...
Upvotes: 3
Views: 3310
Reputation: 379
You must override "grand total" total class and implement rounding there. See Sales module config.xml (sales/totals section) and Tax module config.xml (same, sales/total section). Inspect code from Mage_Sales_Model_Quote_Address_Total_Grand
Upvotes: 3
Reputation: 12750
You have to do it in collectTotals() method or some method that get's called while totals are collected. Best bet would be tax calculation object/methods.
Upvotes: 2