Remove decimal value from price of product in magento

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.

Shashi Dhar Kumar Experience in Web/software development including client server and implementation using PHP, XML, MySQL and SQL Server. Experience of working on Apache, Linux projects, Javascript, Ajax, Putty, FTP, Remote Connection, XML parsing, Mod-Rewriting, Payment Gateways and shipping modules, Trouble shooting and Manual Testing.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *