public function getAttributes()
{
$result = [];
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')
->getItems();
foreach ($attributes as $attribute){
$result[] = [
'label' => $attribute->getAttributecode(),
'value' => $attribute->getFrontendLabel()
];
}
return $result;
}
Или:
public function getAttributes()
{
$attributes = Mage::getModel('catalog/product')->getAttributes();
$attributeArray = [];
foreach($attributes as $a){
foreach ($a->getEntityType()->getAttributeCodes() as $attributeName) {
$attributeArray[] = [
'label' => $attributeName,
'value' => $attributeName
];
}
break;
}
return $attributeArray;
}