Created
July 13, 2012 17:47
-
-
Save fusco/3106233 to your computer and use it in GitHub Desktop.
remplace dropdown store menu by flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(count($this->getGroups())>1): ?> | |
<div class="store-switcher"> | |
<?php foreach ($this->getGroups() as $_group): ?> | |
<a href="<?php echo $_group->getHomeUrl() ?>"><img | |
src="<?php echo $this->getSkinUrl('images/store/store_' . strtolower(str_replace(' ', '_',$this->htmlEscape($_group->getName()))) . '.png') ?>" width="30" height="20" | |
alt="<?php echo $this->htmlEscape($_group->getName()) ?>"/></a> | |
<?php endforeach; ?> | |
</div> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(count($this->getGroups())>1): ?> | |
<div class="store-switcher"> | |
<label for="select-store"><?php echo $this->__('Select Store:') ?></label> | |
<select id="select-store" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value"> | |
<?php /*foreach ($this->getStores() as $_store): ?> | |
<option value="<?php echo $_store->getUrl('') ?>"<?php if($_store->getId()==$this->getCurrentStoreId()): ?> selected="selected"<?php endif; ?>><?php echo $_store->getName() ?></option> | |
<?php endforeach;*/ ?> | |
<?php foreach ($this->getGroups() as $_group): ?> | |
<?php $_selected = ($_group->getId()==$this->getCurrentGroupId()) ? ' selected="selected"' : '' ?> | |
<option value="<?php echo $_group->getHomeUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_group->getName()) ?></option> | |
<?php endforeach; ?> | |
</select> | |
</div> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment