Tuesday, September 13, 2011

Getting or Displaying Attributes value and label of product in magento programmatically


//value or label which you select in back end
echo $_product->getResource()->getAttribute('size')->getFrontend()->getValue($_product);

//label of the attribute
echo $_product->getResource()->getAttribute('size')->getFrontend()->getLabel();


// value or option Id
echo $_product->getSize()

No comments:

Post a Comment