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?

  • so it seems that a select is needed, I don’t have the implementation code at hand, but I did through one observer that modifies the grid, the second tracks the massaction of this grid and stores it. easier to add massaction choose products, in massaction choose aprove and save in general. - Naumov
  • @Naumov, if suddenly this code appears at hand - I will be grateful for an example) - Maybe_V
  • drip to the masektion it will be the easiest - Naumov
  • the code does not appear exactly - Naumov
  • @Naumov, I already did it) - Maybe_V

0