i want to show currency drop down before my account in top links.
i added below code in links.phtml but nothing shows.
<?php if($this->getCurrencyCount()>1): ?>
<div class="block block-currency">
<div class="block-content">
<select name="currency" onchange="setLocation(this.value)">
<?php foreach ($this->getCurrencies() as $_code => $_name): ?>
<option>
<a href="<?php echo $this->getSwitchCurrencyUrl($_code) ?>" title="<?php echo $_code ?>" <?php if($_code==$this->getCurrentCurrencyCode()): ?> class="selected"<?php endif; ?>>
<?php echo Mage::app()->getLocale()->currency($_code)->getSymbol()?>
</a>
</option>
<?php endforeach; ?>
</select>
</div>
<div class="block-title-currency">
<strong><span><?php echo $this->__('Currencies') ?></span></strong>
</div>
</div>
<?php endif; ?>
Best Answer
You need to add
currency dropdown as child block of toplink
using layout xml code.Create local.xml at
app/design/frontend/your package/your template//layout/
Create a
new template file topcurrency.phtml
atapp/design/frontend/your package/your template/template/directory
and your code.then in links.phtml call this template file as child block using below code: