Magento Coding Solutions

How to Get A List Of All Attributes

<?php
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')->getItems();
echo "<pre>";
foreach ($attributes as $attribute){
//print_r($attribute);
if($attribute->getIs_searchable()==1){

echo $attribute->getAttributecode();
echo '---';
echo $attribute->getFrontendLabel();
echo '<br>';
}
}
echo "</pre>";
?>

No comments:

Post a Comment