How to add store selector to settings?

Any body know how to add the store selector to settings block?

6 answers

Profile photo of Seoki Lee 1510.00 $tone November 28, 2014

Dear Richardmax,
To be frank, I’m not entirely sure of ‘add to settings block’ here, could you tell me more specific like which block are you referring to? or send me some screenshots illustrating how you want to achieve?

Profile photo of Seoki Lee 1510.00 $tone December 1, 2014

Dear Richardmax,
It’s possible, you should go to file: app\design\frontend\default\jm_megamall\layout\page.xml, after this rule:

 <block type="page/html_header" name="header" as="header">

Add this rule:

 <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>

Hope this helps.

Profile photo of Eddy Ricardo Santos 340.00 $tone December 1, 2014

I solved already and work perfect: (lamentably i don’t now how to upload the screenshot to ubertheme’s post. Insert link is disabled too)
I did so:
1- Go to file: app\design\frontend\default\jm_megamall\layout\page.xml and search this rule (maybe in 96 line)

<block type="page/html" name="jmtoolbar" as="jmtoolbar" template="page/html/jmtoolbar.phtml">
<block type="page/html_welcome" name="welcome" as="welcome"/>
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/switch" name="store_language" as="store_language" template="page/switch/flags.phtml"/>
<block type="directory/currency" name="custom_currency_selector" template="currency/currency.phtml"/>

2- Add this rule after: 

<block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>

3- Copy app\design\frontend\base\default\template\page\switch\stores.phtml to app\design\frontend\default\jm_megamall\template\page\switch\
4- Open app\design\frontend\default\jm_megamall\template\page\html\jmtoolbar.phtml and search following code:

<?php echo $this->getChildHtml('store_language') ?>
<?php echo $this->getChildHtml('custom_currency_selector') ?>

5- Add store switcher like this:

<div class="inner-toggle">
<?php echo $this->getChildHtml('store_language') ?>
<?php echo $this->getChildHtml('custom_currency_selector') ?>
<?php echo $this->getChildHtml('store_switcher') ?>
<!-- BEGIN: CUSTOM -->
<div class="colors-setting"><label for="select-colors"><?php echo $this->__('Setting Colors:') ?></label>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('colors')->toHtml() ?>
<!-- END: CUSTOM -->

6- Save all changes
7- Refresh website …. and Surprise!!!! Store Selector is in Setting Area:

  • Language selector
  • Currency Selector
  • Store Selector
  • Colors 

NOTE: The store switch only appear if you have more than one store in “Store Management”
Thanks you very much Seoki
Richard Max


This question is now closed

Written By