<?php
$productModel = Mage::getModel('catalog/product');
$attr = $productModel->getResource()->getAttribute("manufacturer");
if ($attr->usesSource()) {
echo $color_label = $attr->getSource()->getOptionText(45);
}
?>
Note:- manufacturer (product attribute code)
45 ==> (option value id)
$productModel = Mage::getModel('catalog/product');
$attr = $productModel->getResource()->getAttribute("manufacturer");
if ($attr->usesSource()) {
echo $color_label = $attr->getSource()->getOptionText(45);
}
?>
Note:- manufacturer (product attribute code)
45 ==> (option value id)
No comments:
Post a Comment