Magento – How to display custom attribute to admin product edit page

custom-attributesmagento-1.9product-page

I have created a custom product attribute in my install script using addAttributeGroup() method.

How to display this attribute on product edit page tabs programmatically?

Best Answer

Found the way. I don't need a separate tab.phtml file.

this portion of codes already put it in product edit tab

$setup->addAttribute('catalog_product', $attrCode, array(
    'group'         => 'Vela Cash On Delivery',
    'input'         => 'boolean',
    'type'          => 'int',
    'label'         => 'Allow Cash On Delivery',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'user_defined' => false,
    'searchable' => false,
    'filterable' => false,
    //'comparable'  => 1,
    'visible_on_front' => false,
    'visible_in_advanced_search'  => false,
    'is_html_allowed_on_front' => false,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'unique'        => false
));