Magento2 5 cent rounding
Question
in magento 1.x for price roud i used extension https://github.com/openstream/Magento5CentRounding Does have somebody any solution for magento 2, or which functions i need rewrite ?
Is https://marketplace.magento.com/pits-module-five-cent-rounding.html a good option?
Solution
For round the price on checkout page you need to extend
magento2/vendor/magento/module-quote/Model/Quote/Address/Total/Grand.php file.
for rounding grandtotal or base grandtotal in your grand.php (which you have extend) in collect method.
$total->setGrandTotal(round($totals,0));
$total->setBaseGrandTotal(round($baseTotals,0));
Using preference you can do this easily. Let me know if you need further assistance. Thank you
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange