<?php $attr = $_product->getResource()->getAttribute("unit_packaging");
if ($attr->usesSource()) {
echo $color_id = $attr->getSource()->getOptionText($_product->getUnitPackaging());
}
?>
if ($attr->usesSource()) {
echo $color_id = $attr->getSource()->getOptionText($_product->getUnitPackaging());
}
?>
where to add this code? in list.phtml?
ReplyDeleteyou can put this code to any file for example unit_packaging attribute you want to display in product view page so you have to put anywhere whenever you want to display in view page same for list page
Deleteplease replace your attribute name on the place of (;unit_packaging')
Thanks!