Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->startSetup();
- $this->addAttribute('catalog_category', 'top_brand', array(
- 'group' => 'General',
- 'type' => 'int',//can be int, varchar, decimal, text, datetime
- 'backend' => '',
- 'frontend_input' => '',
- 'frontend' => '',
- 'label' => 'Top Hersteller',
- 'input' => 'select', //text, textarea, select, file, image, multilselect
- 'option' => array(
- 'value' => array(
- 'optionone'=> array(
- 0 =>'No'),
- 'optiontwo'=> array(
- 0 =>'Yes')
- ),
- ),
- 'default' => array(0),
- 'class' => '',
- // 'source' => '',//this is necessary for select and multilelect, for the rest leave it blank
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,//scope can be SCOPE_STORE or SCOPE_GLOBAL or SCOPE_WEBSITE
- 'visible' => true,
- 'frontend_class' => '',
- 'required' => false,//or true
- 'user_defined' => true,
- 'default' => '',
- 'position' => 100,//any number will do
- ));
- $this->endSetup();
- $this->startSetup();
- $this->addAttribute('catalog_category', 'top_brand', array(
- 'group' => 'General',
- 'type' => 'int',//can be int, varchar, decimal, text, datetime
- 'backend' => '',
- 'frontend_input' => '',
- 'frontend' => '',
- 'label' => 'Top Hersteller',
- 'input' => 'select', //text, textarea, select, file, image, multilselect
- 'default' => array(0),
- 'class' => '',
- 'source' => 'eav/entity_attribute_source_boolean',//this is necessary for select and multilelect, for the rest leave it blank
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,//scope can be SCOPE_STORE or SCOPE_GLOBAL or SCOPE_WEBSITE
- 'visible' => true,
- 'frontend_class' => '',
- 'required' => false,//or true
- 'user_defined' => true,
- 'default' => '',
- 'position' => 100,//any number will do
- ));
- $this->endSetup();
- $this->addAttribute( 'catalog_category', 'top_brand', array(
- 'group' => 'General',
- 'type' => 'tinyint',
- 'backend' => '',
- 'frontend' => '',
- 'label' => 'Top Hersteller',
- 'input' => 'boolean',
- 'source' => 'eav/entity_attribute_source_boolean',
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
- 'visible' => true,
- 'required' => false,
- 'user_defined' => true,
- 'default' => '',
- 'unique' => false,
- ) );
- $this->endSetup();`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement