I'm working on a site that has main categories and there are product attributes that appear in the layered nav such as brand, type, color.
I would like to have a dropdown when hovering on a category link in the main nav that would have links for some attributes under that category
For example the categories are "Men's Shoes" "women's shoes" and under each one would be links for "by color: white, brown, etc." by occasion: casual, dress, etc."
How would go about creating something like this?
Best Answer
Based on this question and this one. I've put up the following "module" that should do what you need.
The main idea is to get the categories menu, identify the attributes used in layered navigation and display a link to the filtered category for each option in the attribute.
The extension is called
Easylife_Nav
. The extension files:app/etc/modules/Easylife_Nav.xml
- the declaration fileapp/code/local/Easylife/Nav/etc/config.xml
- the configuration fileapp/code/local/Easylife/Nav/Helper/Data.php
- the module main helperapp/code/local/Easylife/Nav/Model/Observer.php
- the module observerClear the cache and try it out.