Programatically create a magento ‘Yes/No’ product attribute
程序员文章站
2022-06-04 11:06:20
...
$this->addAttribute( Mage_Catalog_Model_Product::ENTITY, 'yes_no_attribute', array(
'group' => 'General',
'type' => 'tinyint',
'backend' => '',
'frontend' => '',
'label' => 'Featured Product?',
'input' => 'boolean',
'source' => 'eav/entity_attribute_source_table',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => '',
'searchable' => false,
'filterable' => true,
'comparable' => false,
'visible_on_front' => true,
'visible_in_advanced_search' => true,
'used_in_product_listing' => true,
'unique' => false,
'apply_to' => 'simple',
) );