Display magento product price with space and dot between, rupee symbol and price

1. In some time we have to give space or dot between magento product price and rupee symbol.

2. Normally we will do this changes throw locale file. But some time it won’t work.

3. In that synario, we have to override below file
Mage_Core_Model_Store – formatPrice (function)

4. Here am overriding the function like below way
class Jute_Model_Store extends Mage_Core_Model_Store
{
public function formatPrice($price, $includeContainer = true)
{
$currency = $this->getCurrentCurrency();

if ($currency) {
return $currency->format($price, array(
‘precision’ => 0,
‘symbol’ => Mage::app()->getLocale()->currency($currency->getCode())->getSymbol().’. ‘
), $includeContainer);
}
return $price;
}
}

5. This code will helpful to display the product like Ex: Rs. 100. This code will work with our SCP module.

6. If you are used SCP – Simple Configurable Products (Organic Internet), then the configurable product onchange price should not refelect with above changes. Then we have to do another change like below

7. Open Js file – htdocs\js\varien\js.js, line no : 265 (approximate), change the code as like below
return pattern.replace(‘%s’,”. “+ r).replace(/^\s\s*/, ”).replace(/\s\s*$/, ”);

8. That’s it. Referesh cache and check.