Created
June 18, 2013 13:42
-
-
Save redesigned/5805459 to your computer and use it in GitHub Desktop.
Magento Create Category Attribute
This file contains 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