For every product in my magento i have custom attributes like - food_taste, food_brand and many more. I use them for filtering my products in category view. But now i want when clients open the product to see attributes.
Example: Brand: Royal Canin Taste: Chicken ...... I try with some codes that i found here, but...
$productId = 52;
$product = Mage::getModel('catalog/product')->load($productId);
$attributes = $product->getAttributes();
foreach ($attributes as $attribute) {
$attributeCode = $attribute->getAttributeCode();
$label = $attribute->getStoreLabel($product);
$value = $attribute->getFrontend()->getValue($product);
echo $attributeCode . '-' . $label . '-' . $value; echo "<br />";
}
Can you help me to do that.
Thank you