Reputation: 2673
I want to get category image:
<?php foreach ($this->getCurrentChildCategories() as $_category): ?>
url: <?php echo $_category->getURL() ?>
name: <?php echo $this->htmlEscape($_category->getName()) ?>
img: <?php echo $_category->getThumbnail() /// returns nothing ?>
<?php endforeach; ?>
Upvotes: 0
Views: 1381
Reputation: 2673
Just make call on category model:
Mage::getModel('catalog/category')->load($_category->getId())->getThumbnail()
so:
<?php foreach ($_categories as $_category): ?>
url: <?php echo $_category->getURL() ?>
name: <?php echo $this->htmlEscape($_category->getName()) ?>
img: <?php echo Mage::getModel('catalog/category')->load($_category->getId())->getThumbnail() ?>
<?php endforeach; ?>
Upvotes: 1