Guest User

Untitled

a guest
Jun 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. $installer = $this;
  2. $installer->startSetup();
  3.  
  4. $installer->addAttribute('catalog_product', 'attribute_name',array(
  5. 'attribute_set' => 'attribute_set_code',
  6. 'group' => 'General',
  7. 'label' => 'My Attribute',
  8. 'type' => 'varchar',
  9. 'input' => 'multiselect',
  10. 'backend' => 'eav/entity_attribute_backend_array',
  11. 'frontend' => '',
  12. 'source' => '',
  13. 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
  14. 'visible' => true,
  15. 'required' => false,
  16. 'is_user_defined' => true,
  17. 'searchable' => false,
  18. 'filterable' => false,
  19. 'comparable' => false,
  20. 'option' => array (
  21. 'value' => array('1' => array('Option One'),
  22. '2' => array('Option Two'),
  23. '3' => array('Option Three'),
  24. )
  25. ),
  26. 'visible_on_front' => false,
  27. 'visible_in_advanced_search' => false,
  28. 'unique' => false
  29. ));
  30.  
  31. $installer->endSetup();
Add Comment
Please, Sign In to add comment