Magento 1.9 Product Price – Remove Precision from Price

magento-1.9priceproduct

As I said in the title, I want to remove precision from price ( .00 )

I did these :

  1. In app/code/core/Mage/Directory/Model/Currency.php

in

public function format()

I changed

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

to

 return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
  1. In /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php

in

public function getEscapedValue()

I changed

 return number_format($value, 2, null, '');

to

 return number_format($value, 0, null, '');
  1. In js/varien/js.js

I changed

var precision = isNaN(format.precision = Math.abs(format.precision)) ? 2 : format.precision;
var requiredPrecision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision;

to

var precision = 0;
var requiredPrecision = 0;
  1. And in app/code/core/Mage/Core/Model/Store.php

I changed

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

to

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

Then I cleared the cache, and reindexed Magento (which is i version1.9), But the precision didn't remove, Am I missing something? what should I do?

Best Answer

You could take a look at http://www.magentocommerce.com/magento-connect/et-currency-manager.html I have never used it but I can see you can manage the decimal places and more

"Who needs cents anyway? You can display price without zero cents. Example: display 49 instead of 49.00, but leave 49.99 unchanged."

Plus it free :-)

Related Topic