Hi I am trying to create attributes. I need to create an attribute which accepts any value between 1 to 9999. The code is as follows,
$installer->addAttribute('catalog_product', 'number_of_codes', array(
'type' => 'text',
'backend' => '',
'frontend' => '',
'label' => 'Number of Codes to Generate',
'input' => 'select',
'class' => '',
'source' => 'catalog/product_attribute_source_layout',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'visible' => false,
'required' => false,
'user_defined' => true,
'default' => '1',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'unique' => false,
'group' => 'Code_Generation'
));