I have an attribute in the eav_attribute
table which I myself added:
$setup->addAttribute('catalog_product', 'aprove', array( 'group' => 'Special Attributes', 'input' => 'boolean', 'type' => 'int', 'label' => 'AproveProduct', 'backend' => '', 'visible' => 1, 'required' => 0, 'default' => 0, 'user_defined' => 1, 'searchable' => 1, 'filterable' => 0, 'comparable' => 1, 'visible_on_front' => 1, 'visible_in_advanced_search' => 0, 'is_html_allowed_on_front' => 0, 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, ));
It is necessary to realize the possibility for the grid
display select
and, depending on whether 0 or 1 is set in the table, displayed yes / no with the ability to choose
I do it like this:
$this->addColumn('dropdown', array( 'header' => $helper->__('Aprove public'), 'filter' => false, 'sortable' => false, 'index' => 'aprove', 'type' => 'select', 'values' => array(1 =>'yes', 0 =>'no') ));
But only throws a mistake!
How to do it right?