0

I am facing one problem of multi-store option. Both stores are showing but I want to hide the current store and only show the other stores.

These two options are showing at top left side.

Store URL: www.image.pk

Magento 1.9.1.0 version

  • If we are in Export Leftovers than only polo republica show.

  • if we are in polo republica than only export leftovers shows.

code for un-order List style:

<ul class="store-selector-ul">
<?php foreach ($this->getGroups() as $_group): ?>
    <li><a href="<?php echo $_group['home_url'];?>"><?php echo $this->htmlEscape($_group['name']);?></a></li>
<?php endforeach; ?>
</ul>
1

Replace your code with below one:

<ul class="store-selector-ul">
    <?php foreach ($this->getGroups() as $_group): ?>
        <?php if($_group->getId() != Mage::app()->getStore()->getCode()): ?>
            <li><a href="<?php echo $_group['home_url'];?>"><?php echo $this->htmlEscape($_group['name']);?></a></li>
        <?php endif; ?>
    <?php endforeach; ?>
</ul>

It should work for you.

0

Please use below code.This code is not tested but, I hope it will work :

<ul class="store-selector-ul">
<?php foreach ($this->getGroups() as $_group): ?>
<?php $_selected = ($_group->getId()==$this->getCurrentGroupId()) ? 'hide' : 'show' ?>
<?php if($_selected == 'show') { ?>
<li><a href="<?php echo $_group['home_url'];?>"><?php echo $this->htmlEscape($_group['name']);?></a></li>
<?php } ?>
<?php endforeach; ?>
</ul>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.