Remove precision from price of a product

Remove precision from price of a product

 

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?

 

 

i am using its working thank bro

How to check if Magento is running in production mode or developer mode

If you want to know. your Magento 2 website is running on which environment you can run below command on terminal and very easily you can kn...

Popular Posts

Posts