I have a drop-down attribute called "Housing" (the attribute code is "housing"). I want to get the text of the selected option for the product, but the getAttributeText function returns nothing.
My code is:
$product_object = Mage::getModel('catalog/product')->load($productId); $housing = $product_object->getHousing(); echo $housing; echo "<br>"; $housing = $product_object->getAttributeText('housing'); echo $housing; echo "<br>"; $housing = $product_object->getHousingText(); echo $housing; echo "<br>";
The getHousing function returns the correct parameter identifier, but "getAttributeText" and "getHousingText" returns nothing.
Any ideas why?
source share