I have code like this :
$setup->addAttribute('customer', 'my_custom_attr', array(
"type" => "text",
"backend" => "",
"label" => "Languages for filter in layered filter.",
"input" => "text",
"source" => "",
"visible" => false,
"required" => false,
"default" => "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15",
"frontend" => "",
"unique" => false,
"note" => "Imploded with comma array of language id's."
)
attribute adds successfully but the default value is not avaliable for all existed entity:
Mage::getModel('customer/customer')->getCollection()->getFirstItem()->getMyCustomAttr(); // null
but attribute exists, and i am able to update it, etc.
is it possible to set it as default or I need to update all existed records manually ?
I found this Set default value to custom attribute for all products but here it is Mage::getModel("catalog/product_action")
model is used to update attributes, is there some way of doing it for customer entities ?
Best Answer
Please create attribute like below -
OR following working for me.