I'm trying to add an image attribute by the following code:
<?php
$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
$installer->startSetup();
$installer->addAttribute('catalog_product','my_image_attribute_1',
array (
'group' => 'General',
'type' => 'varchar',
'frontend' => 'catalog/product_attribute_frontend_image',
'label' => 'Additional product image',
'input' => 'media_image',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'configurable' => false,
'visible_on_front' => true,
'default' => '',
'class' => '',
'source' => ''
)
);
$installer->endSetup();
The attribute is created but I can't see it on product edit page.
UPDATE:
Ok this code adds only a radio Button to default image gallery. Hm I wanted to create a custom upload form for a single image...