Forked from redesigned/magento_create_category_attribute.php
Last active
February 3, 2017 22:33
Create category attribute 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
// ## Note: If not in a module sql setup use the following 2 lines | |
require_once('app/Mage.php'); | |
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); | |
// ## Note: Setup the new category attribute | |
$installer = new Mage_Sales_Model_Mysql4_Setup; | |
$installer->startSetup(); | |
$installer->addAttribute('catalog_category', 'additional_css', array( | |
'type' => 'text', | |
'backend' => '', | |
'frontend' => '', | |
'label' => 'Custom CSS', | |
'input' => 'textarea', | |
'class' => '', | |
'source' => '', | |
'global' => false, | |
'visible' => true, | |
'required' => false, | |
'user_defined' => false, | |
'default' => '', | |
'searchable' => false, | |
'filterable' => true, | |
'comparable' => false, | |
'visible_on_front' => false, | |
'unique' => false, | |
'wysiwyg' => true, | |
'position' => 0, | |
'group' => 'Display Settings', | |
)); | |
$installer->endSetup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment