Magento – Tierprice decimals display

priceproducttierprice

I am trying to display all prices with 4 decimals (i know a little bit weird but the customer demanded this). I have overwritten Mage/Core/Store, changed the currency.php precision in the Zend lib and adjusted Mage_Directory_Model_Currency.

In the backend, all my prices are displayed correctly but in the frontend i receive a price rounded to 2 decimals followed by 00. Especially the tier price is very crucial.

Since i dont have any knowledge in pricing i have tried some tutorials on Magento Forum with no success. I also tried 2 extensions with no luck.

Any help?

Best Answer

I think you'll find what you need in the format method inside app/code/core/Mage/Directory/Model/Currency.php.

/**
 * Format price to currency format
 *
 * @param   double $price
 * @param   bool $includeContainer
 * @return  string
 */
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
{
    return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
}
Related Topic