Grabbing a custom product image label in Magento?

fahjblffela

New Member
I have a block on my front page that is grabbing the two newest products with a custom product image called \[code\]image_feature_front_right\[/code\]. I use this code as the query:\[code\]$_helper = $this->helper('catalog/output');$_productCollection = Mage::getModel("catalog/product")->getCollection();$_productCollection->addAttributeToSelect('*');$_productCollection->addAttributeToFilter("image_feature_front_right", array("notnull" => 1));$_productCollection->addAttributeToFilter("image_feature_front_right", array("neq" => 'no_selection'));$_productCollection->addAttributeToSort('updated_at', 'DESC');$_productCollection->setPageSize(2);\[/code\]I am able to get:
  • the image: \[code\]echo $this->helper('catalog/image')->init($_product, 'image_feature_front_right')->directResize(230,315,4)\[/code\]
  • the product url: \[code\]echo $_product->getProductUrl()\[/code\]
  • the product name: \[code\]$this->stripTags($_product->getName(), null, true)\[/code\]
The only thing I am unable to get is the custom images label. I have tried \[code\]echo $this->getImageLabel($_product, 'image_feature_front_right')\[/code\], but that seems to do nothing. Can anyone point me in the right direction?Thanks!Tre
 
Back
Top