Created
April 27, 2017 04:55
-
-
Save meminuygur/13475ac96ef4a21dadffea7ea0f36b4d to your computer and use it in GitHub Desktop.
custom attribute for category
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 | |
require_once 'app/Mage.php'; | |
Mage::app()->getCache()->getBackend()->clean('old'); | |
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); | |
$installer = new Mage_Sales_Model_Mysql4_Setup; | |
$attribute = array( | |
'type' => 'int', | |
'label'=> 'Show Breadcrumb Image', | |
'input' => 'select', | |
'source' => 'eav/entity_attribute_source_boolean', | |
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, | |
'visible' => true, | |
'required' => false, | |
'user_defined' => true, | |
'default' => "", | |
'group' => "General Information" | |
); | |
$installer->addAttribute('catalog_category', 'show_category_breadcrumb', $attribute); | |
$installer->endSetup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment