I have an existing attribute for an embed code. I need to associate this attribute with 120+ existing attribute sets.
If I know the attribute set id, ho
$attributeSets = Mage::getResourceModel('eav/entity_attribute_set_collection')
->setEntityTypeFilter('4'); // Catalog Product Entity Type ID
foreach ($attributeSets as $attributeSet) {
$installer->addAttributeToSet(
Mage_Catalog_Model_Product::ENTITY, // Entity type
$attributeSet->getAttributeSetName(), // Attribute set name
'General', // Attribute set group name
$yourAttributeCode,
100 // Position on the attribute set group
);
}