Created
October 10, 2014 15:26
-
-
Save riterrani/d9cabb85e967a02c995c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$installer = $this; | |
$installer->startSetup(); | |
$entityTypeId = $installer->getEntityTypeId('catalog_category'); | |
$attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId); | |
$attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId); | |
$installer->addAttribute('catalog_category', 'new_cat_attrb', array( | |
'type' => 'int', | |
'label' => 'New Category Attribute', | |
'input' => 'text', | |
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, | |
'visible' => true, | |
'required' => false, | |
'user_defined' => false, | |
'default' => 0 | |
)); | |
$installer->addAttribute('catalog_category', 'new_cat_attrb', array( | |
'type' => 'int', | |
'label' => 'New Category Attribute', | |
'input' => 'text', | |
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE, | |
'visible' => true, | |
'required' => false, | |
'user_defined' => false, | |
'default' => 0 | |
)); | |
$installer->addAttributeToGroup($entityTypeId,$attributeSetId,$attributeGroupId,'new_cat_attrb','11'); | |
$installer->endSetup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment