Posted By

WGenie on 08/04/12


Tagged

Switch store magento catalog frontend flags


Versions (?)

Magento storeswitch - flags


 / Published in: PHP
 

  • Mage 1.7* flag storeswitcher
  • images/flags/flag[storeviewname].png
  1. <?php if(count($this->getStores())>1): ?>
  2. <div class="form-language">
  3. <!--span class="label"><?php echo $this->__('Your Language:') ?></span-->
  4. <ul class="language-flags">
  5. <li class="label"><?php echo $this->__('Your Language:') ?></li>
  6. <?php foreach ($this->getStores() as $_lang): ?>
  7. <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' class="selected"' : '' ?>
  8. <li><a href="<?php echo $_lang->getCurrentUrl(false) ?>" title="<?php echo $this->htmlEscape($_lang->getName()) ?>">
  9. <img src="<?php echo $this->getSkinUrl() ?>images/flags/flag_<?php echo $this->htmlEscape($_lang->getCode()) ?>.png" alt="<?php echo $this->htmlEscape($_lang->getName()) ?>"<?php echo $_selected; ?> />
  10. </a></li>
  11. <?php endforeach; ?>
  12. </ul>
  13. </div>
  14. <?php endif; ?>

Report this snippet  

You need to login to post a comment.