Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Problem with price display / strange rounding errors 49.95 €
 
sepan77
Jr. Member
 
Total Posts:  9
Joined:  2012-01-29
 

Hello,

I\’m running a Magento 1.6.2 webshop and set up that prices entered in the backend are included taxes. Tax rate is set to 20%.
I have a simple product which price is 49.95 €. Price is correctly displayed in the backend, I verified the price in the database table
catalog_product_entity_decimal and it is set to 49.95000
On the product detail page the price shown is 49.94 €. If you put the product in the cart and proceed to the checkout page, 49.95 € is displayed.

I have no extensions installed that manipulate the display of price, according to EasyPathHints the template frontend/base/default/template/catalog/product/price.phtml and the block Mage_Catalog_Block_Product_Price is used.

Did somebody have the same problem or maybe knows a solution to that?

Thank you very much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sepan77
Jr. Member
 
Total Posts:  9
Joined:  2012-01-29
 

I solved the problem by following this tutorial (in german):
Rundungsfehler in Magento beheben

For all non-german speaking readers:
copy file /app/code/core/Mage/Core/Model/Store.php to /app/code/local/Mage/Core/Model/Store.php
and change the following function at line 715 (mine was at line 928 in Magento 1.6.2):

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

copy file /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php to /app/code/local/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php
and change code at line 78

public function getEscapedValue($index=null)
{
$value 
$this->getValue();
if (!
is_numeric($value))
{
return null;
}
return number_format($value4null'');
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top