I've created several custom product attributes like this:
$installer->addAttribute('catalog_product', $data['name'], array(
'group' => 'General',
'type' => $data['type'],
'backend' => '',
'frontend' => $data['front_end'],
'label' => $data['label'],
'input' => $data['input'],
'source' => 'eav/entity_attribute_source_table',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
));
Because I'm creating several attributes, the above code runs in a loop (hence the data variable). I've copied the relevant portion (I think); there's several more fields being set, but I've excluded them for brevity.
I'd like to change their group to a custom one I've created in an upgrade script. I'm able to set this correctly if I remove the module and recreate it. However, I would like to be able to change the group through an upgrade script since the code has already been deployed.
I've tried this with no luck:
$installer->updateAttribute('catalog_product', $data['name'], array(
'group' => 'Custom Product Tab'
));
How can I modify a product attribute's group in an upgrade script?
Mage_Catalog_Model_Resource_Setup