Get configurable products attributes Magento

<?php
$obj = Mage::getModel(‘catalog/product’);
$_product = $obj->load(19);
$configurableAttributeCollection=$_product->getTypeInstance()->getConfigurableAttributes();
foreach($configurableAttributeCollection as $attribute){
echo “Attr-Code:”.$attribute->getProductAttribute()->getAttributeCode() .” – “;
echo “Attr-Label:”.$attribute->getProductAttribute()->getFrontend()->getLabel().” – “;
echo “Attr-Id:”.$attribute->getProductAttribute()->getId().” <br /> “;
}
?>

Share