+91-943-185-6038 me@shashidharkumar.com
Remove decimal value product price magento

Remove decimal value product price Magento

Price of product is : 135.00USD => 135USD
How to remove decimal value from product price in magento?
In order to remove decimal digits in price of product magento, we need to custom some code :Go to this file : app/code/core/Mage/Directory/Model/Currency.php
Open app/code/core/Mage/Directory/Model/Currency.php Find the following code on line no 195 :-
Find this code:

public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
{
return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
}

and replaced it with this:

public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
{
return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
}

Due to the nature of free and open-source software and the ubiquity of its components, each and every component of the Magento stack is very well tested regarding performance and security and there is an abundance of experienced contractors to do the tailoring respectively the system administration. There is also a constant development going on.

See also  Steps To Follow When Updating WordPress