Hello Everyone,
Today I’m going to tell you how to change Currency symbol in magento.In simple words, This tutorial will tell to change the currency symbol of rupee (from Rs to an rupee image). By default, the currency symbol for rupee is Rs.
For this, you need to edit app\design\frontend\base\default\template\catalog\product\new.phtml
if you want to change rupee symbol in new arrival page
Go to line no 38
wherever you see the following code
<?php echo $this->getPriceHtml($_product, true, '-new'); ?>
replace it by
<?php
$string = $this->getPriceHtml($_product, true, '-new');
$string = str_replace("Rs", "<img src='http://www.myiris.com/insurance/images/rupee_icon.gif'>", $string);
echo $string;
?>
You can also refer to the video showing how it actually works
if you want to change rupee symbol in new arrival page
Go to line no 38
wherever you see the following code
<?php echo $this->getPriceHtml($_product, true, '-new'); ?>
replace it by
<?php
$string = $this->getPriceHtml($_product, true, '-new');
$string = str_replace("Rs", "<img src='http://www.myiris.com/insurance/images/rupee_icon.gif'>", $string);
echo $string;
?>
You can also refer to the video showing how it actually works
Alternate Solution:
We have previously posted the solution for INR symbol. But that was playing with code, finally we were able to solve that problem in easy way. Here it goes:
Step 1: Goto: lib/Zend/Locale/Data/root.xml
Make changes in root.xml
find <currency type=”INR”> replace next line with this <symbol>Rs. </symbol>
Step 2: Goto: http://cdn.webrupee.com/js
save the page as rupee.js and save it inside /js folder of the root.
Step 3: Goto: \app\design\frontend\default\your-theme\layout edit page.xml
After this <block type=”page/html_head” name=”head” as=”head”>
add <action method=”addJs”><script>rupee.js</script></action>
Step 4 : Clear cache by deleting all the files and folder inside /var/cache folder. Clear cache from back-end as well.
All done, u have just replaced Rs. with INR new symbol, which was designed by an IIT Graduate.
No comments:
Post a Comment