-
-
Save mladenilic/6707beb88285084e3df3 to your computer and use it in GitHub Desktop.
Magento - Add customer attribute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var Mage_Customer_Model_Resource_Setup $this */ | |
$this->addAttribute('customer', 'customer_number', array( | |
'type' => 'int', | |
'input' => 'text', | |
'label' => 'Customer Number', | |
'visible' => true, | |
'required' => false, | |
'is_system' => false, | |
'default' => 0, | |
)); | |
$attribute = Mage::getSingleton('eav/config')->getAttribute($this->getEntityTypeId('customer'), 'customer_number'); | |
$attribute->setData('used_in_forms', array('adminhtml_customer')) | |
->save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment