Magento: getting attributes from an attribute set without a product -


I have set up a feature in my Magento store, which has many binary properties.

For a pulldown, I need a list of all the attributes inside this one attribute, which includes their internal names and their labels. Since this pulldown should appear in those places, for which no product is selected, I can not go to "the normal way of attaining the attributes of a product".

How do I get a list of all the attributes inside my set?

OK, I realized that I remember that you want a complete set of properties, no Just try one of the following:

$ productEntityType = Mage :: getModel ('eav / entity_type') - & gt; LoadBox (Mage_Catalog_Model_Product :: ENTITY); $ AttributeSetCollection = Dana :: getResourceModel ('eav / entity_attribute_set_collection'); $ AttributesInfo = Mage :: getResourceModel ('eav / entity_attribute_collection') - & gt; SetEntityTypeFilter ($ productEntityType-> getId ()) / 4 = Product entities - & gt; AddSetInfo () - & gt; GetData ();

You will then need to repeat through that array that comes back with something:

  foreach ($ attributesInfo $ attribute of Form): $ attribute = Dana :: getModel ('EAV / entity_attribute') - & gt; Load ($ attribute ['attribute_id']); Resonance 'label =' $ Attribute- & gt; GetFrontendLabel (). '& Lt; Br / & gt; '; Echo 'code =' $ Attribute- & gt; GetAttributeCode () '& Lt; Br / & gt; & Lt; Br / & gt; '; Endforeach; 


Comments