Question

When creating an attribute inside an upgrade script (using class Mage_Catalog_Model_Resource_Setup)

Is it possible to also assign the attribute to a specific attribute set only?

My code is:

$installer->addAttribute('catalog_product', 'my_attribute', array(
    'type' => 'varchar',
    'input' => 'text',
    'label' => 'My Attribute',
    'visible' => true,
    'required' => false,
    'attribute_set' => 'My Attribute Set'
));

But the attribute only goes in default set

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top