Add an attribute, assign to the General group and to multiple attribute sets


/** @var Mage_Catalog_Model_Resource_Setup $this */
$installer = $this;
$installer->startSetup();

$installer->addAttribute('catalog_product', 'delivery_cutoff_date', array(
'type' => 'datetime',
'input' => 'date',
'class' => 'validate-date',
'backend' => 'eav/entity_attribute_backend_datetime',
'label' => 'Delivery Cut-off Date',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'visible_on_front' => false,
'used_for_price_rules' => false,
'group' => 'General',
'attribute_set' => array('Accessories', 'caps', 'Clearance', 'Curtains', 'Default', 'Electrical',
'Electronics', 'Parts', 'Seats', 'Swivels', 'Trim', 'Window fitting kit',
'Windows')
));

$installer->endSetup();

Leave a Reply

Your email address will not be published. Required fields are marked *