I try to setup a XML feed so can add my products to Facebook Product Catalog. After search I found this but it get all product images.
function getProductData($iProduct) {
Mage::getmodel( 'catalog/product' );
$aData['title'] = mb_substr( $oProduct->getName( ), 0, 299, 'UTF-8' );
$aData['description'] = strip_tags( $oProduct->getShortDescription( ) );
$oProduct->getFinalPrice( );
$_finalPrice = ;
$aData['price'] = preg_replace( '/,/', '.', Mage::helper( 'tax' )->getPrice( $oProduct, $_finalPrice, true ) );
$aData['link'] = mb_substr( $oProduct->getProductUrl( ), 0, 299, 'UTF-8' );
$aData['image_link_large'] = mb_substr( Mage::getbaseurl( URL_TYPE_MEDIA ) . 'catalog/product' . $oProduct->getImage( ), 0, 399, 'UTF-8' );
What I want is to get only the images that the filename contain "facebook".
Something like this "image01facebook.jpg" or "image01_facebook.jpg"
$_product->getMediaGalleryImages()->getItemByColumnValue('label', 'LABEL_NAME')->getUrl();and I wonder if$aData['image_link_large'] =$_product->getMediaGalleryImages()->getItemByColumnValue('label', 'LABEL_NAME')->getUrl();do the job simply adding facebook to label name – panosdotk Jan 09 '16 at 19:53