Magento – Show shop by and browse by left navigation

blockslayered-navigation

I have seen a few sites that have one block in the left sidebar that is browse by and shows subcategories in it and then a second separate block which is shop by with the rest of the attributes like color/brand in it, below.

Now as far as i know if the categories set anchor is set to "no", youll receive the browse by block and if the anchor is set then youll receive the shop by bloc.

My question is, how would i get both the browse by and shop by blocks showing on the top level navigation category pages?

I tried manually inserting the shop by XML in my localhost and bointing it towards the correct layout but no luck

thanks

Best Answer

This is pretty simple. You just need to dig some code.

1) Goto your catalog.xml file and find catalog_category_layered tag ie:(ANCHOR) tab.

2) insert the following code along with the layered navigation code.

<block type="catalog/navigation" name="catalog.leftnav1" after="-" template="catalog/navigation/left.phtml">
     <block type="core/text_list" name="catalog.leftnav.state.renderers1" as="state_renderers1" />
</block> 

3) This will show the Category filter which is shown in the Non-Anchor left navigation.

4) Now, you might need to remove the category filter from shop-by as it is already been called above. To do so edit the layered navigation code as follow

<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
    <block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
    <action method="unsetChild"><alias>category_filter</alias></action>
</block>