It's a really simpel question but I'm struggling to long on this one so I'm dropping the question here hoping someone could help me...
I want to get all the subcategories from a parent categorie (this one I got, I can choose the categorie id and I get all the subcategories). But I want to retrieve also the images from those subcategories. I have this in the .phtml file which is loaded on the homepage. So far I got this piece of code:
<?php
$category_childs = Mage::getModel('catalog/category')->getCategories(3);
?>
<?php if($_productCollection->count()): ?>
<div class="product-slider-container">
<div class="title-container">
<h2><?php echo $this->__($this->getBlockTitle());?></h2>
<a href="#" class="jcarousel-prev-horizontal" id="shopper_carousel_prev<?php echo $time; ?>"></a>
<a href="#" class="jcarousel-next-horizontal" id="shopper_carousel_next<?php echo $time; ?>"></a>
</div>
<ul id="featured_<?php echo $time; ?>" class="products-grid jcarousel-skin-tango clearfix">
<?php foreach ($category_childs as $_category): ?>
<li class="item">
<div class="regular">
<a href="<?php echo $_category->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?>" class="product-image">
<?php echo $this->helper('shoppersettings')->getLabel($_category); ?>
<img id="product-collection-image-" src="<?php echo $this->helper('catalog/image')->init($_category, 'small_image')->resize($imgX, $imgY) ?>" data-srcX2="<?php echo $this->helper('catalog/image')->init($_category, 'small_image')->resize($imgX*2, $imgY*2) ?>" width="<?php echo $imgX; ?>" height="<?php echo $imgY; ?>" alt="<?php echo $this->htmlEscape($_category->getName()) ?>" />
</a>
<div class="product-info">
<?php $_categoryNameStripped = $this->stripTags($_category->getName(), null, true); ?>
<h2 class="product-name"><a href="<?php echo $_category->getProductUrl() ?>" title="<?php echo $_categoryNameStripped; ?>"><?php echo $_helper->productAttribute($_category, $_category->getName() , 'name'); ?></a></h2>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
<div class="clear"></div>
</div>