Created
May 26, 2014 22:04
-
-
Save herveguetin/ee9218e2cb206d45a8ec to your computer and use it in GitHub Desktop.
Create a new price attribute for category in Magento
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 | |
| $catalogInstaller = new Mage_Catalog_Model_Resource_Setup('core_setup'); | |
| $catalogInstaller->addAttribute('catalog_category', 'myattribute_code', array( | |
| 'type' => 'decimal', | |
| 'label' => Mage::helper('myHelper')->__('Price From'), | |
| 'input' => 'text', | |
| 'input_renderer' => 'adminhtml/catalog_product_helper_form_price', | |
| 'required' => false, | |
| 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, | |
| 'sort_order' => 9999, | |
| 'group' => 'General Information', | |
| ) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment