在这里,我尝试添加一个select类型的客户地址属性。我可以使用数组来设置选项值和标签吗?
$newAttributeName = "adt";
$attribute = array(
'type' => 'int',
'input' => 'select',
'label' => 'Ad TYPE',
'visible' => true,
'required' => true,
'user_defined' => true,
'searchable' => true,
'filterable' => true,
'comparable' => true,
'visible_on_front' => true,
'source' =>
);
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->addAttribute('customer_address', $newAttributeName, $attribute);
有人能帮我个忙吗?
发布于 2013-02-18 12:50:11
此页包含一些可能有助于回答您的问题的信息。它不是关于客户属性的,但它确实讨论了向产品添加下拉属性,并应该为您指明正确的方向。
Set Dropdown Option Value of a Product
https://stackoverflow.com/questions/14929425
复制相似问题