Earlier add a new custom attribute biography_desc
was added for customer:
$installer = $this;
$installer->startSetup();
$installer->addAttribute("customer", "biography_desc", array(
"type" => "text",
"backend" => "",
"label" => "Biography",
"input" => "textarea",
"source" => "",
"visible" => true,
"required" => false,
"default" => "",
"frontend" => "",
"unique" => false,
"note" => ""
));
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "biography_desc");
$used_in_forms = array();
$used_in_forms[] = "adminhtml_customer";
$used_in_forms[] = "customer_account_edit";
$attribute->setData("used_in_forms", $used_in_forms)
->setData("is_used_for_customer_segment", true)
->setData("is_system", 0)
->setData("is_user_defined", 1)
->setData("is_visible", 1)
->setData("sort_order", 100);
$attribute->save();
Now, i had to make it store dependent, so that i could add description on differnet languages: en, fr и etc.
For products this is not a problem, because table eav_entity_text has a field store_id. And all examples where it requires to do such things work on products.
Please advice how to solve this problem,now i can see only one solution json or create attributes biography_desc_en
, biography_desc_fr
etc.