Due to the business logic and requirement, I need the order item price not to be rounded. Because if you are purchasing the product with high quantity, the loss could be numbered.

E.g: Product price: $48.9383 Qty: 10

The collect total process will give a result at below Cart Subtotal: $48.94

I see the roundPrice function they used in currency interface but I wonder how can I just skip the round step for only a few specific places and not touch or mess up other processes.

1 Answer 1


find below files and than override and try with round function.


find total->setGrandTotal and apply php round function.

i hope its work for you.

  • Thanks, @Anas, I have resolved it by using an observer to listen to the process before the quote is submitted and calculate anything before it becomes an order. Core rewrite is the last choice I would ever make. Jul 30, 2019 at 19:11
  • @phucnguyen.sw Please share your solution. Oct 20, 2020 at 14:54

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.