Magento Forum

   
Showing a list of children of just one category
 
Lemmin
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2009-01-04
UK
 

Hi, I hope someone can help me out!  I’m new to magento, and my PHP is a bit rusty, so I’m struggling a bit with what should be quite a simple problem. I’ve done a quick search but I couldn’t find any obvious thread about this.

Heres what I want to do:
I’m making a site for a specialist clothing retailer. On the home page, I’d like a list of types of products on the left (clothing, footwear, bags etc) with children categories (clothing -> shirts). On the right side I’d like a series of logos of brands (bolle, north face etc). Customers can then use either route to see relevant products.

Heres how I’m trying to do it:
I’ve created two sets of categories - one is the product type, stored under the Default Category. The other set is under a new category parent called Brands, and I’ve assigned them images. Products are members of two categories, one for product type and one for brand (both sunglasses AND bolle, for instance).

As suggested in this thread http://www.magentocommerce.com/boards/viewthread/5026/P15/ I’ve changed app/code/core/Mage/Catalog/Block/Navigation.php and added in a ->addAttributeToSelect(’image’) so that I can use the image URL.

Heres the problem:
I can’t work out how to specify that I only want to display children of one category in a list. In fact, at the moment Navigation.php doesn’t display my brands at all - presumably because they aren’t children of the default category. Can someone please suggest (preferably with a code snippet for the hard-of-thinking) how I can specify that I want a list of all the children of the “brands” category?

I’m sure this is a problem thats come up before, hopefully someone has an easy solution smile

Thanks in advance for any help - I’ve wasted a few hours on this one today, so I’m going to take a break from it and go back to bashing my head on the template/block structure in an effort to understand how that works instead!

LEM

 
Magento Community Magento Community
Magento Community
Magento Community
 
TPB
Jr. Member
 
Total Posts:  13
Joined:  2008-12-09
 

Lemmin,

Were you able to resolve this?

TPB

 
Magento Community Magento Community
Magento Community
Magento Community
 
All About Doors and Windows
Member
 
Avatar
Total Posts:  51
Joined:  2008-10-13
Kansas City, MO USA
 

This may help out a bit:
http://www.magentocommerce.com/boards/viewthread/9938/

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