0
我試圖完成一個選擇框與多個選項 - 在類別的後端選擇。使用選擇框(多選)擴展類別屬性集
創建選擇框的腳本到目前爲止仍在工作,但僅限於單一選擇。
$installer = $this;
$installer->startSetup();
$attribute = array(
'group' => 'Examplegroup',
'input' => 'select', // also tried multiselect
'type' => 'varchar',
'label' => 'Examplelabel',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'visible' => 1,
'required' => 0,
'visible_on_front' => 0,
'is_html_allowed_on_front' => 0,
'is_configurable' => 0,
'searchable' => 0,
'filterable' => 1,
'comparable' => 0,
'unique' => false,
'user_defined' => true,
'default' => '',
'is_user_defined' => false,
'used_in_product_listing' => true,
'option' => array('values' => array('option1', 'option2', 'option3', 'option4'))
);
$installer->addAttribute('catalog_category', 'attribute_name', $attribute);
$installer->endSetup();
如何做到這一點
我認爲它應該與輸入型多選的工作,但它一直在升級後單選擇選項。
這正是我想要的。謝謝朋友! – Slatyoo