I am trying to make use of the Magento Category thumbnail, but it is not working. I ve followed many tutorials online (eg http://www.douglasradburn.co.uk/getting-category-thumbnail-images-with-magento/), and all of them make mention of the function :
$_category->getThumbnail()
which is supposed to be in the Category model. I m running Magento 1.6 and I can t find this function anywhere. I ve also downloaded 1.5 and 1.7, looked in there and it is nowhere to be found. When I run the code it gives me no errors however, just nothing is output.
我的全文如下:
<ul id="nav">
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $_category->getThumbnail(); ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>
(我 t惜把th子当成一面的菜单)
它工作。 秘密是,你需要重新排列使用该代码的“FUL”类数据:
Mage::getModel( catalog/category )->load($_category->getId())->getThumbnail()
我略感遵循这一理论:
http://www.h-o.nl/blog/using_ category_images_in_your_magento_navigation/。
for having category thumbnails in your menu.
thanks T