Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save krillo/d307f5014797fc45537cb9039a994a48 to your computer and use it in GitHub Desktop.
Save krillo/d307f5014797fc45537cb9039a994a48 to your computer and use it in GitHub Desktop.
<?php
$this->startSetup();
$this->addAttribute('catalog_category', 'inkclub', array(
'group' => 'General Information',
"type" => "int",
"backend" => "",
"frontend" => "",
"label" => "Inkclub",
"input" => "select",
"class" => "",
"global" => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
"visible" => true,
"required" => false,
"user_defined" => true,
"default" => "0",
"searchable" => false,
"filterable" => false,
"comparable" => false,
'source' => 'eav/entity_attribute_source_boolean',
"visible_on_front" => true,
"unique" => false,
"note" => "",
"system" => false
));
$this->endSetup();
@krillo
Copy link
Author

krillo commented Apr 7, 2017

"checbox" doesn't seem to work in magento. "select" is the way to go. Compare your new attribute values with others in the database at the bottom of table "eav_attribute"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment