I am trying to add the sub category name for each item in the list or grid view. The veiw that I am trying to add this info to is the parent category which has no products in it except for the children category products.
This is where I feel NEW to Magento... which I am, this should be totally easy, and it probably is... But how!
I can get the category like this...
$category = Mage::getModel('catalog/layer')->getCurrentCategory();
...and I can then echo it using this...
echo $category->getName();
and I have tried to get the sub category by doing this...
$subcategory = $category->getChildrenCategories();
but when I echo the $subcategory...
echo $subcategory->getName();
...it is error city!
Could someone tell me where I am flawed, this should be as easy as it gets. I would think that it should be as easy as $this-getCategory()-getName(); or something like that.
Anyways, if someone can help me get a grip on this I would be very appreciative. Thanks!