I need to change Magento's core pricing precision from ($price, 4) to ($price, 8). However, I still need it to display as ($price, 2). I sell a product that we tier in 50, 250, 500, 1000, 2000, 5000, 10000, 20000, and 50000 and my pricing needs those fractions of cents to display properly. I have read all over the web and can't figure it out. Changed Zend, Changed the core files in Magento...still no luck. Any help would be appreciated!

  • Non-answer: Magento stores prices in 4-digit precision throughout the core database tables, nevermind code. Changing that would be incredibly invasive.
    – Ryan Hoerr
    Commented Jul 26, 2016 at 1:35

1 Answer 1


You need to edit the Currency.php file at app\code\core\Mage\Directory\Model.

I changed pricing precision from 2 to 8.

public function format($price, $options = array(), $includeContainer = true, $addBrackets = false) {

return $this->formatPrecision($price, 8, $options, $includeContainer, $addBrackets);


  • I did that, and it is still only using 4 decimals in its math. I also made sure I updated the tables to 12, 8 just in case. It is still rounding math to the 4th decimal.
    – Paul
    Commented Jul 27, 2016 at 21:13
  • May be Third Party extension overwrite this file. Use this module conflictor for checking confliction. magentocommerce.com/magento-connect/…
    – Sourav
    Commented Jul 28, 2016 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.