If I delete this block, the top catgeories are shown. But if I enter one catgeorei, I only see the subcategories under this one main_categorie. so it seems like this donesn`t work in Magento 1.0. Has anybody the same problem or fixed it for Magento 1.0?
Hi,
I’m using Magento 1.0 and managed to get the first level of the subcategories shown with this block of code:
Just replace the block you quoted with the following:
I drew the inspiration from the code for the top category menu bar:
app/design/frontend/default/default/template/catalog/navigation/top.phtml
There is a call to a function here:
$this->drawItem($_category)
drawItem() is a recursive function located in: app/code/core/Mage/Catalog/Block/Navigation.php.
I didn’t manage to figure out how to show more levels of sub-categories, but I hope other members may be able to figure something out from these functions.
I followed Joe’s implementation......but I’m using Magento 1.0, so the contents of his left_menu.phtml were giving me errors.
Instead I used the code from /template/catalog/navigation/top.phtml and put it in left_menu.phtml. I then altered the CSS a bit, I was able to add a simple category menu to the left sidebar.
That should work. I just wanted to post it in case anyone is looking for something like this.
You may add some style to it if you like, then share.
Thanks, Joe.
hi joe, this is great and work well on version 0.7..
but i am on version 1.0 now and it seems not working anymore. i got the following error
arse error: syntax error, unexpected T_VARIABLE in /home/snapshop/domains/snapshop.com.my/public_html/store/app/design/frontend/snapshop/default/template/catalog/navigation/left_menu.phtml on line 2
I have also a very big need of a vertical menu since we have a large number of categories and subcategories and a horisontal menu isn’t suitable. I get it to work with 0.7 but not the latest 1.0. Thanks
Adrian, I’m trying this code and I think it works!!!!
Let me make some tries anyway.
¿Do you know hot to show a menu with cats and subcats as in the top? I think the top one uses javascript to appear when mouse over. Something similar it would be good but at left column.
Adrian, I’m trying this code and I think it works!!!!
Let me make some tries anyway.
¿Do you know hot to show a menu with cats and subcats as in the top? I think the top one uses javascript to appear when mouse over. Something similar it would be good but at left column.
Thank you very much
Andrea
It’s fairly easy to put together, but you need to know some css. Luckily that’s easy to pick up.
These are the changes I’ve made to create a menu that:
- shows subcategories of the active category (how deep you dig down is based on your css)
- drops down subcategories when I hover over the main category
- highlights the category and subcategory I’m in
- works with magento 1.0 in IE 6, 7 and Firefox 2 and 3
And that’s it...you can make the menu behave any way you want through css from that point on.
If you have no idea where to begin, the article on drop down menu’s at ‘a list apart’ is a good start. Ask away if you need help…
I figured I would give a little copy and paste backup of the original before I make the change in the custom design area, just in case anyone needs to go back to default. I’m giving the new method a try to see if it works. Thanks for the hard work and help!
tried it, couldn’t figure out what was wrong at first. it works, but its only loading if you use a design that uses a left column (standard 3 column or 2 colum left, for example). of course this makes perfect sense, but i couldn’t figure out why it wasn’t working at first, lol.