cancel
Showing results for 
Search instead for 
Did you mean: 

rounding errors all over the place?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

rounding errors all over the place?

searching through the code for places where a round( $xxx, 2) is done I get a lot of results. For example in \Mage\Core\Model\Store.php's function roundPrice. At least this one and another one in a template file cause rounding errors (i.e. price display 399,99 vs. 400) in my shop. Why are all these rounding to 2 decimal place done if it seems that internally 4 places are expected and mostly used? Changing the places to 4 in Store->roundPrice seems to fix most problems. Removing the rounding in the template fixed the display in the product list view.

 

I searched the code for 1.9.2.1 community edition.