1

i would like to know how to get the frond end properties in magento because in the resource model that i got these properties are not available, i dont know why or how to get them, this is the collection that i got:

        $collection = Mage::getResourceModel('eav/entity_attribute_collection');

but if i try to get any front end property doesnot give anything:

  foreach($collection as $attribute){         
        Mage::log($attribute->getIsSearchable(),null,"layerfilter.log");
   }

Output: 2014-06-23T21:44:48+00:00 DEBUG (7):

  • Try $collection = Mage::getModel('eav/entity_attribute')->getCollection(); instead. – Niloct Jun 23 '14 at 22:52
0

After getting collection of all attributes, you should load each attribute individually by its attribute code then it will give you the front-end properties of respective attribute

<pre>
$attribute_code = "manufacturer"; 
$attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code); 
$options = $attribute_details->getSource()->getAllOptions(false);
echo $attribute_details->getIsSearchable(); 
</pre>

here we loaded 'manufacturer' attribute by passing its code. Here, It is returning its options and print 1 or 0 by getIsSearchable() .

| improve this answer | |
1

I assume, this is what you need:

$attribute_code = "name"; 
$attribute_details =
Mage::getSingleton("eav/config")->getAttribute('catalog_product',    $attribute_code);
$attribute = $attribute_details->getData();
print_r($attribute);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.