0

I've create multiple website like below:

enter image description here

And in frontEnd i've displaying Store Switcher in the footer but my problem is not displaying all the stores defined above it will display only main website.

enter image description here

Any suggestion please?

0

As you indicated correctly, you have multiple websites - yet you are referring to the store-switcher in frontend.

So, you will have to implement a website-switcher in your template. Examples are given in the references linked below:

<!-- BEGIN website switcher -->
<select id="website-changer" onChange="document.location=this.options[selectedIndex].value">
< ?php
$websites = Mage::getModel('core/website')->getCollection();
foreach($websites as $website)
{
    $default_store = $website->getDefaultStore();
    $url_obj = new Mage_Core_Model_Url();
    $default_store_path = $url_obj->getBaseUrl(array('_store'=> $default_store->getCode()));
?>
    <option <?php if(strstr($this->helper('core/url')->getCurrentUrl(), $default_store_path)):?>selected="selected"< ?php endif; ?> value="< ?php echo $default_store_path ?>">< ?php echo $website->getName()?></option>
< ?php
}
?>
</select>
<!-- END website switcher -->

Some references on your question:

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.