cancel
Showing results for 
Search instead for 
Did you mean: 

Changing between 2 menus if user clicks menu item

Changing between 2 menus if user clicks menu item

Hi,

On our website we have, apart from a webshop, a lot of additional information that is now crammed into a submenu. We would like to change that by using two menu bars, for example:

 

1)  About us - Info - B2B - Webshop

2)  Home - Cat 1 - Cat 2 - Cat 3 .... Cat Last

 

The idea is that if a visitor clicks on "Webshop" in Menu 1) the menu will change to Menu 2), and if in Menu 2) he clicks on "Home" the menu will change back to Menu 1) again.

 

So I presume for either menu I can set up a separate root category, but then how do I change between using different root categories?

The most straight forward solution I can actually think of is to define 2 stores, one with menu 1) and all its Root Category and CMS pages and another store with the second Root Category, products etc. When the user clicks on either "Home" or "Webshop" I just switch between stores ...

 

Is that indeed the most straightforward option to solve this or is there a simpler solution?

 

Thanks,

Dennis

 

3 REPLIES 3

Re: Changing between 2 menus if user clicks menu item

Hi @aqcycling,

 


In this case, you have to implement custom code for your navigation menu.


You have to add a static block containing the specific HTML structure that will work with jQuery to make the transitions between one menu and the other.

 

 

Best regards.
Gabriel

Welcome to the Magento Forums. Remember to introduce yourself and read the Magento Forums Guidelines.

Re: Changing between 2 menus if user clicks menu item

Does this imply that the idea of using 2 stores (an information pages store and a "real" store) and switch between stores doesn't work at all ?

Re: Changing between 2 menus if user clicks menu item

Hi,

 

@aqcycling

Having two root categories for two different store views is the optimal solution. For example,

storeview1 is your virtual store

storeview2 is your webshop

 

You also need to have two different theme packages for these two store views.

Now, you need to add ‘Webshop’ link in storeview1’s main navigation phtml and you need to add ‘Home’ link in storeview2’s main navigation phtml.

 

This should work for you without any module installation.