Price of product is : 135,00 $ => 135 $
How to remove two decimal digits ?
In order to remove decimal digits in price of product magento, we need to custom some code :Go to this file : code/core/Mage/Directory/Model/Currency.php
Open 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 by this code :
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false) { return $this->formatPrecision($price, 0 , $options, $includeContainer, $addBrackets); }
Clear your caches and it’s done. Cheers
POST HASN'T TAG.
Imron Bin M. Husin
June 9
Not fully clear decimal, doesn’t work for general decimal.
Dhaval Dave
June 9
Magento 2 remove decimal points from the price?
Markus
June 9
If it could only be this simple but it’s not.