Advertisement
Guest User

asd

a guest
Feb 21st, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 KB | None | 0 0
  1. <?php
  2.  
  3. $installer = $this;
  4.  
  5. $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
  6.  
  7. $installer->startSetup();
  8. /**
  9.  * Adding Different Attributes
  10.  */
  11.  
  12. // adding attribute group
  13. $setup->addAttributeGroup('catalog_product', 'Default', 'Special Attributes', 1000);
  14.  
  15. // the attribute added will be displayed under the group/tab Special Attributes in product edit page
  16. $setup->addAttribute('catalog_product', 'vntvnt', array(
  17.     'group'         => 'Special Attributes',
  18.     'input'         => 'text',
  19.     'type'          => 'int',
  20.     'label'         => 'VntVnt',
  21.     'backend'       => '',
  22.     'visible'       => 1,
  23.     'required'        => 0,
  24.     'user_defined' => 1,
  25.     'searchable' => 1,
  26.     'filterable' => 0,
  27.     'comparable'    => 1,
  28.     'visible_on_front' => 1,
  29.     'visible_in_advanced_search'  => 0,
  30.     'is_html_allowed_on_front' => 0,
  31.     'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
  32. ));
  33.  
  34. $installer->endSetup();
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement