Answer the question
In order to leave comments, you need to log in
How to select correctly in gid?
I have an attribute in the table eav_attribute
that I added myself:
$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,
));
Нужно реализовать возможность чтоб в grid отображался select и зависимо от того 0 или 1 в таблице установлено отображало yes/no з возможностью выбрать,
Делаю это так:
$this->addColumn('dropdown', array(
'header' => $helper->__('Aprove public'),
'filter' => false,
'sortable' => false,
'index' => 'aprove',
'type' => 'select',
'values' => array(1 =>'yes', 0 =>'no')
));
Answer the question
In order to leave comments, you need to log in
What's wrong? Turn on developer mode and you will get more information
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question