簡體   English   中英

如何在magento中為新的選擇類型客戶地址屬性設置來源?

[英]How to set the source for a new select type customer address attribute in magento?

在這里,我嘗試添加選擇類型客戶地址屬性。 我可以使用數組設置選項值和標簽嗎?

$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);

有人可以幫我這個忙嗎?

此頁面上的某些信息可能有助於回答您的問題。 這與客戶屬性無關,但確實討論了將下拉屬性添加到產品中的問題,應該為您指明正確的方向。

設置產品的下拉選項值

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM