更新时间:2023-11-30 09:34:58
使用以下功能显示类别缩略图
Use this below function to display category thumbnail image
public function getThumbnailImageUrl()
{
$url = false;
if ($image = $this->getThumbnail()) {
$url = Mage::getBaseUrl('media').'catalog/category/'.$image;
}
return $url;
}
然后,将其用于任何类别:
Then, using for any category :
$ _ imageUrl = $ this-> getCurrentCategory()-> getThumbnailImageUrl()
$_imageUrl=$this->getCurrentCategory()->getThumbnailImageUrl()
您可以获取缩略图.
请参阅此文章 http://www.douglasradburn.co.uk/getting- category-thumbnail-images-with-magento/