Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <config>
- <modules>
- <Namespace_Module>
- <version>0.0.1</version>
- </Namespace_Module>
- </modules>
- <global>
- <resources>
- <module_setup>
- <setup>
- <module>Namespace_Module</module>
- <class>Mage_Eav_Model_Entity_Setup</class>
- </setup>
- <connection>
- <use>default_setup</use>
- </connection>
- </module_setup>
- </resources>
- </global>
- </config>
- <?php
- $installer = $this;
- $installer->startSetup();
- $customerEntityTypeId = $installer->getEntityTypeId('customer');
- $atttributeCode = 'display_name';
- $installer->removeAttribute($customerEntityTypeId, $atttributeCode );
- $installer->addAttribute('customer', $atttributeCode, array(
- 'type' => 'varchar',
- 'input' => 'text',
- 'label' => 'Display Name',
- 'global' => true,
- 'visible' => true,
- 'required' => false,
- 'user_defined' => true,
- 'visible_on_front' => true
- ));
- $usedInCustomerAddressForms = array(
- 'adminhtml_customer',
- 'customer_account_edit'
- );
- $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', $attributeCode);
- $attribute->setData('used_in_forms', $usedInCustomerAddressForms);
- $attribute->save();
- $this->endSetup();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement