Jump to content

Link to other Stores in Multistore


bhushan98@gmail.com

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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

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

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

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

 

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

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

  • 3 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...