Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Layered navigation at home page? 
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 

I add your code into my IndexController and everything works fine. The only problem I have is the Root Category that appears in the menu bar.

When I have the blank home page problem, is the ID in IndexController that is diferent from my root category ID. So if you change in my code

this:

$categoryId 17;

for this:

$categoryId 2;

Everything should work fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

I did that - I’m thinking the problem might be with a file I have leftover from the first method of layered navigation in this thread.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

When I deleted the local copy of Layer.php from the beginning of this thread, I started receiving this error:

Fatal errorCall to a member function getProductCollection() on a non-object in /home/minerva8/public_html/techusa/app/code/core/Mage/Catalog/Model/Layer.php on line 47
 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Alright, so it’s working - just not with a Root Category, which I believe is the same issue you mentioned having.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 

Post here the actual Layer.php code.

EDIT: Sorry I haven’t see that you solve the problem. Yes that is my issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

My Layer.php code is a fresh file from the 1.1.6 zip ... I think now the problem is trying to use a Root Category - when I changed the category ID to a sub category it worked just fine. There’s got to be a way to make this work with the Root Category so the navigation is still correct though.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 
sherrie - 30 September 2008 07:06 AM

My Layer.php code is a fresh file from the 1.1.6 zip ... I think now the problem is trying to use a Root Category - when I changed the category ID to a sub category it worked just fine. There’s got to be a way to make this work with the Root Category so the navigation is still correct though.

That is what i’m trying to find, and that is my issue. Anyone can help us??

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 

Now I have the blank home page problem that you have before. I already check the ID’s and everything is ok, but i still have a blank page. How do you solve yours blank page problem?

EDIT: The problem appear after delete all categorys.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Did you get it working again?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 

Yes I did, It was a stupid categories error.

Now I need a solution to put Home Page Layered Navigation using Root Category.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

Me too ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1655
Joined:  2007-12-14
Waterloo, ON
 

I’ve more or less figured out the issue is that Magento will not create a URL for a root category, the actual code is calling it correctly. I just don’t know how to make Magento call a URL for the root ... any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
burt
Member
 
Total Posts:  31
Joined:  2008-08-26
 

Hi there,

I know this is not all within this topic but I noticed that some of your posts in this thread might be relevant to my problem, too.

I was wondering if it is possible to have layered navigation on homepage and on categories as well filtering all items – not just all items within the current category.

My shop is supposed to have four sections: Boys/Girls and Winter/Summer. But I don’t want those to be my main categories since I want people to be able to search in two different sections in the same time. For example: “Show me all Shirts (which would be a category) for girls AND winter-season”. So I figured it would be the best to have two main attributes – Gender (boys/girls) and Season (winter/summmer) – in a multibox (some stuff might even be unisex or fit in both seasons). The categories then would be shirts/pants/hats and so on.

The features I would like to have are the following:

– main-top-menu with the attribute-filters as a root-level (boys/girls/summer/winter) and as a drop-down all categories which carry items within the filter

– leveled navigation on the side not only showing the set filter but also the not-set filter – so you don’t have to reset the filter but just can click on the opposite filter to change it. (For example: “You shop by boys. Rather shop by girls?")

– I would also like to have a fifth main-navigation-button. This one is supposed to filter all items by a third attribute “Manufacturer”. This one I almost got working. But there still is the problem, that it only filters the recent category and not all items. I figured it might be a possibility to have a non-active root category, holding all items and just filter that one – but I wasn’t able to do it.

I know I’m asking for quite a lot here – but I think this might be very interesting for other shops, too.
So please try to help me out here whoever has an idea.

Thanks in advance,
Burt

 
Magento Community Magento Community
Magento Community
Magento Community
 
Naresh Vajawat
Member
 
Total Posts:  47
Joined:  2008-09-22
India
 

I would appreciate if somebody could collate and give the final changes that need to be done to get the layered navigation of the categories on the left hand side.

Thanks in advance,
Naresh

 
Magento Community Magento Community
Magento Community
Magento Community
 
burt
Member
 
Total Posts:  31
Joined:  2008-08-26
 

Hey Naresh,
I’m not quite sure what you are trying to do. If you only want to move the layered navigation from the left sidebar to a different content block you will have to take a look on the catalog.xml in your layout folder:

<!--
Category layered navigation layout
-->

    <
catalog_category_layered>
        <
reference name="left">
            <
block type="catalog/layer_view" name="catalog.leftnav" after="-" template="catalog/layer/view.phtml"/>
        </
reference>
...

By referencing an other block you can put the navigation anywhere you want.

But if you want to split up layered navigation and for example have the state-information somewhere else please have a look on this thread.

I will also write my own “ultimate guide to layered navigation” soon, since there doesn’t seem to be anything like this around. I’m not an expert, but I figured out on how to do almost everything I have been asking for in my last post in this thread. So this might be interesting to other people too. Right now I’m very busy though …

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top