Search code examples
magentoattributesconfigurable

magento get Configurable attributes in attribute set


How can I get all configurable attributes in attribute set?

I was looping all the attribute set then I want to display only its configurable attribute.


Solution

  • You should be able to get an attribute collection and filter it (based on the attribute set) - this would return you all attributes in the specified set that are configurable.

    $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
    ->setAttributeSetFilter($attributeSetId)
    ->addFieldToFilter("is_configurable", array("eq", "1"))
    ->getItems();