Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. $customerSetup->addAttribute(
  2. Customer::ENTITY, 'company_name', [
  3. 'type' => 'varchar',
  4. 'label' => 'Company Name',
  5. 'input' => 'text',
  6. 'required' => true,
  7. 'visible' => true,
  8. 'user_defined' => true,
  9. 'backend' => '',
  10. 'frontend'=>''
  11. ]);
  12. $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'company_name')
  13. ->addData([
  14. 'attribute_set_id' => $attributeSetId,
  15. 'attribute_group_id' => $attributeGroupId,
  16. 'used_in_forms' => ['adminhtml_customer','customer_account_create','customer_account_edit'],
  17. ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement