1:Go to Admin ->System -> currency set
add select currency
2: Go to Admin->System->Manage Currency
and Import and Don't forget to save currency rate
3: Add this line to you layout file: <block type="directory/currency" name="store_currency_selector" as="store_currency_selector" template="directory/currency.phtml"/>
4: And go to directory ->currency. phtml and replace all with this code or make change
<?php if($this->getCurrencyCount() > 1): ?>
<span>Select Currency:</span>
<select name="custom-currency-selector" id="custom-currency-selector">
<?php foreach ($this->getCurrencies() as $_code => $_name): ?>
<option value="<?php echo $this->getSwitchCurrencyUrl($_code)?>"
<?php if($_code == $this->getCurrentCurrencyCode()): ?>
selected="SELECTED"
<?php endif; ?>>
<?php echo $_code ?>
</option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<script type="text/javascript">
$('custom-currency-selector').observe('change',function(evt){
window.location = $('custom-currency-selector').value;
});
</script>
5: call this phtml in you file with this code:
<?php echo $this->getChildHtml('store_currency_selector') ?>
Comments
Post a Comment