[email protected] Posted July 31, 2016 Share Posted July 31, 2016 Prestashop :1.6.1.6 Sir, I m creating a multisore shop. I want to give links for all stores in menu using a dropdown menu like thing. Pl. Help how can I do that. Thanks Link to comment Share on other sites More sharing options...
rocky Posted August 1, 2016 Share Posted August 1, 2016 Assuming you're using the default PrestaShop theme and you want to add a new "Shops" submenu to the end of the "Top horizontal menu", you can change line 6 of themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl from: {$MENU} to: {$MENU} <li><a class="sf-with-ul" title="{l s='Shops' mod='blocktopmenu'}" href="#">{l s='Shops' mod='blocktopmenu'}</a> <ul> {foreach from=Shop::getShops(true) item='shop'} <li><a href="http://{$shop.domain}{$shop.uri}">{$shop.name}</a></li> {/foreach} </ul> </li> If you use SSL everywhere, you'll need to add {if $force_ssl}s{/if} after the http above. 1 Link to comment Share on other sites More sharing options...
[email protected] Posted August 3, 2016 Author Share Posted August 3, 2016 Assuming you're using the default PrestaShop theme and you want to add a new "Shops" submenu to the end of the "Top horizontal menu", you can change line 6 of themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl from: {$MENU} to: {$MENU} <li><a class="sf-with-ul" title="{l s='Shops' mod='blocktopmenu'}" href="#">{l s='Shops' mod='blocktopmenu'}</a> <ul> {foreach from=Shop::getShops(true) item='shop'} <li><a href="http://{$shop.domain}{$shop.uri}">{$shop.name}</a></li> {/foreach} </ul> </li> If you use SSL everywhere, you'll need to add {if $force_ssl}s{/if} after the http above. Thank You Sir, It works fine. Sir, this code is creating a menu category as other products. I want a Drop Down Box /Combo Box like thing for our multistore shops. Pl. Help Thanks Again Link to comment Share on other sites More sharing options...
rocky Posted August 4, 2016 Share Posted August 4, 2016 Then you'll need put code like the following in the TPL file where you want the dropdown: <select onchange="if ($(this).val() != 0) window.location = $(this).val();"> <option value="0">{l s='Select shop'}</option> {foreach from=Shop::getShops(true) item='shop'} <option value="http://{$shop.domain}{$shop.uri}">{$shop.name}</option> {/foreach} </select> Link to comment Share on other sites More sharing options...
[email protected] Posted August 4, 2016 Author Share Posted August 4, 2016 Thank You Sir, It works fine. Sir, this code is creating a menu category as other products. I want a Drop Down Box /Combo Box like thing for our multistore shops. Pl. Help Thanks Again Sir, Can You please tell me in which TPL I should place this code. I am using the default template Thanks you Link to comment Share on other sites More sharing options...
rocky Posted August 4, 2016 Share Posted August 4, 2016 Where do you want the dropdown displayed? Link to comment Share on other sites More sharing options...
[email protected] Posted August 4, 2016 Author Share Posted August 4, 2016 Where do you want the dropdown displayed? sir , I want it to be place above top horizontal menu. Almost below Sign In or in the left of Sign IN Thanks Link to comment Share on other sites More sharing options...
rocky Posted August 4, 2016 Share Posted August 4, 2016 You could put it at the top of themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl, but having a combo box sitting between the top bar and menu is not very attractive. I suspect you want a dropdown similar to the "Language" and "Currency" dropdowns, but I think doing that will require copying one of those modules and modifying the code to get the shops. Link to comment Share on other sites More sharing options...
[email protected] Posted August 4, 2016 Author Share Posted August 4, 2016 You could put it at the top of themes/default-bootstrap/modules/blocktopmenu/blocktopmenu.tpl, but having a combo box sitting between the top bar and menu is not very attractive. I suspect you want a dropdown similar to the "Language" and "Currency" dropdowns, but I think doing that will require copying one of those modules and modifying the code to get the shops. Ys sir, showing shops in this way as currency and language is nice. Can u please give code for that. Thanking you Link to comment Share on other sites More sharing options...
rocky Posted August 5, 2016 Share Posted August 5, 2016 I wrote a free module for you and posted it here. Link to comment Share on other sites More sharing options...
[email protected] Posted August 6, 2016 Author Share Posted August 6, 2016 Sir, Many Thanks It is working fine as I thought. its great. You should add this in marketplace It is very helpful for people working with multistore. An another option for this can be like this site. www.justdial.com. In this site people are given choice with search bar what do you think about it. Link to comment Share on other sites More sharing options...
rocky Posted August 6, 2016 Share Posted August 6, 2016 It would be possible to modify the existing "Search block" to do that. Just need to add the shop dropdown and then use JavaScript to change the form URL to the selected shop URL. 1 Link to comment Share on other sites More sharing options...
Morbaks Posted October 18, 2019 Share Posted October 18, 2019 Hello rocky, Thanks for creating a free module for this. Unfortunatly the module isn't available anymore on your first post Is it possible for you to upload it again ? Thanks in advance. Link to comment Share on other sites More sharing options...
rocky Posted October 19, 2019 Share Posted October 19, 2019 I just checked and I'm still able to download the module from my post here. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now