Skip to content

Instantly share code, notes, and snippets.

@nicksheffield
Created November 16, 2011 22:05
Show Gist options
  • Save nicksheffield/1371613 to your computer and use it in GitHub Desktop.
Save nicksheffield/1371613 to your computer and use it in GitHub Desktop.
Magento: Get category image
<?php
function getCategoryImage($category) {
$categoryCollection = Mage::getModel('catalog/category')->setStoreId(Mage::app()->getStore()->getId())->getCollection()->addAttributeToSelect('image')->addIdFilter($category->getId());
foreach($categoryCollection as $category) {
return $category->getImageUrl();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment