Problems with Magento prices after included tax class to product

可紊 提交于 2019-12-13 04:36:45

问题


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


回答1:


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!



来源:https://stackoverflow.com/questions/17172442/problems-with-magento-prices-after-included-tax-class-to-product

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!