Tuesday, February 14, 2012

CHANGE LANGUAGE DROPDOWN INTO LINKS MAGENTO

GOTO: /app/design/frontend/*/template/page/switch   
There You will find languages.phtml


Replace the code with:


<?php if(count($this->getStores())>1): ?>
<div class="form-language cls-lang">
  <ul class='cls-ul-lang'>
<?php foreach ($this->getStores() as $_lang): ?>
        <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
       <li>
  <a href="<?php echo $_lang->getCurrentUrl() ?>"><img src="<?php echo $this->getSkinUrl('images/flags/' . $this->htmlEscape($_lang->getCode()) . '.jpg') ?>" alt="<?php echo $this->htmlEscape($_lang->getName()) ?>"/></a>
  </li>
    <?php endforeach; ?>
    </ul>
</div>
<?php endif; ?>




Now in the frontend you will see links instead of dropdown.
upload images for the links in the path by inspecting those links.


create flags folder under
/skin/frontend/base/default/images/
and upload images there




No comments:

Post a Comment