I need to add attribute through a setup script.Attribute properties are working,but the frontend properties are not applied as specified in the setup script.For example, visible_on_front is_html_allowed_on_front not working.

$installer = $this;


$entityType = 'catalog_product';
$attributeCode= 'video';

$data = array(
    'label' => 'Video',
    'input' => 'textarea',
    'type'  =>  'text',     //database input type
    'visible' => true,
    'required'  =>  false,
    'comparable'=> false,
    'searchable'    => false,
    'filterable'    => false,
    'unique'    => false,
    'visible_on_front'  => true,
    'is_html_allowed_on_front' => true,
    'global'    =>  Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'user_defined' => true,
    'apply_to'  =>  '',
    'is_configurable'   =>  false,

$installer->addAttribute($entityType, $attributeCode, $data);


Part of config.xml


1 Answer 1


I think the installer does not run correctly because you are using the wrong setup class.

In your config.xml try placing the following:

  • 1
    Depending on the magento version I recommend to use Mage_Catalog_Model_Resource_Setup Commented Feb 21, 2013 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.