How to Get A List Of All Attributes of product in magento

/
/
/
68 Views

You can get all the attribute by using the sql query.

products-magento

Run the following sql query to get the list of all product attributes in magento

select attribute_id, attribute_code, frontend_label from mgsu_eav_attribute where entity_type_id IN (select entity_type_id from mgsu_eav_entity_type where entity_type_code = ‘catalog_product’ order by attribute_id)

If you want to get all product attribute title and code then you can use the following magento code.

$attributes = Mage::getResourceModel(‘catalog/product_attribute_collection‘)
->getItems();

foreach ($attributes as $attribute){
echo $attribute->getAttributecode();
echo ‘<br>’;
echo $attribute->getFrontendLabel();
}

 

Sign up for our newsletter to get Daily Updates

It is main inner container footer text