0

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!

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

1 Answer 1

0

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);

}

2
  • 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
    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
    Jul 28, 2016 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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