Add new media attribute for category



<?php
$installer = $this;
$installer->startSetup();
$installer->addAttribute('catalog_category', 'cat_img', array(
'group' => 'General',
'label' => 'Category image',
'note' => "",
'type' => 'varchar',
'input' => 'image',
'visible' => true,
'required' => false,
'backend' => 'catalog/category_attribute_backend_image',
'frontend' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'user_defined' => true,
'visible_on_front' => true,
'wysiwyg_enabled' => true,
'is_html_allowed_on_front' => true,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
));
$installer->endSetup();

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s