0

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 ?

  • Where you want to round the price ? – Ramkishan Suthar Jan 25 '17 at 6:01
  • after looking this extension I think you want to round the price on checkout page. – Ramkishan Suthar Jan 25 '17 at 6:04
  • @Ramkishan i want to round in catalog, cart, checkout, order, invoice, shipping, emails – omelandr Jan 25 '17 at 7:24
  • if you round of price at checkout then round of price will save on db and you will see round price on order,invoice,shipping and emails – Ramkishan Suthar Jan 25 '17 at 8:33
  • And for catalog and cart where is mean of round of price ? – Ramkishan Suthar Jan 25 '17 at 8:35
4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.