2012-06-05 157 views

回答

5

文選法師1.7.0.0:

function printGroupAttributes($groupId) { 
    $attributesCollection = Mage::getResourceModel('catalog/product_attribute_collection'); 
     $attributesCollection->setAttributeGroupFilter($groupId); 
     foreach ($attributesCollection as $attribute) { 
      echo $attribute->getAttributeCode()."<br/>"; // I launch it from browser 
     } 
} 
$attributeGroupId = 534; // Fill with yours 
printGroupAttributes($attributeGroupId); 

來源:Mage_Catalog_Model_Product_Attribute_Group->hasConfigurableAttributes()