Question

I used an option to add 21% tax to all products and for some reason some prices now came up as ± 1 cent, e.g.:

http://vinylshop.lt/dj-3/patefonai-priedai/dj-patefonu-adatos/ortofon-concorde-pro-s-adata.html

http://vinylshop.lt/dj-3/patefonai-priedai/dj-patefonu-adatos/stanton-trackmaster-v3-mp4-2-adatos.html

In admin - showing OK, but in frontend - NOT.

Have you ever encountered an issue like this? How can this be fixed? My Magento version 1.6.2

Was it helpful?

Solution

this is the famous magento rounding bug:

go to /app/code/core/Mage/Core/Model/Store.php

change method round to 4 digits:

public function roundPrice($price)
{
return round($price, 4);
}

Best practice would of course be not to hack the core file. At least copy file to app/code/local/Mage/Core/Model/Store.php or do a rewrite. Well good is neither of the actions, but there might be no other way....

have fun!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top