Any body know how to add the store selector to settings block?
Regards,
Richardmax
6 answers
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?
Hi Seoki,
I say the settings area for language, currency and color selection. I want add store selector too. Can do it?
Thanks
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.
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() ?>
</div>
<!-- END: CUSTOM -->
</div>
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 is the screenshot:
http://i1374.photobucket.com/albums/ag420/Richardmaximun/setting_zps6b0517d4.jpg
This question is now closed