Search This Blog

Friday, February 10, 2012

Magento retrive product attribute like image

$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('image')
->addFieldToFilter('sku', 'mysku');
$productsName = array();
foreach($products as $p){
$productsName[] = $p->getData('image');
}
print_r($productsName);

No comments:

Post a Comment