addAttribute('customer', $disableAGCAttributeCode, array( 'type' => 'static', 'label' => 'Disable Automatic Group Change Based on VAT ID', 'input' => 'boolean', 'backend' => 'customer/attribute_backend_data_boolean', 'position' => 28, 'required' => false )); $disableAGCAttribute = Mage::getSingleton('eav/config') ->getAttribute('customer', $disableAGCAttributeCode); $disableAGCAttribute->setData('used_in_forms', array( 'adminhtml_customer' )); $disableAGCAttribute->save(); $attributesInfo = array( 'vat_id' => array( 'label' => 'VAT number', 'type' => 'varchar', 'input' => 'text', 'position' => 140, 'visible' => true, 'required' => false ), 'vat_is_valid' => array( 'label' => 'VAT number validity', 'visible' => false, 'required' => false, 'type' => 'int' ), 'vat_request_id' => array( 'label' => 'VAT number validation request ID', 'type' => 'varchar', 'visible' => false, 'required' => false ), 'vat_request_date' => array( 'label' => 'VAT number validation request date', 'type' => 'varchar', 'visible' => false, 'required' => false ), 'vat_request_success' => array( 'label' => 'VAT number validation request success', 'visible' => false, 'required' => false, 'type' => 'int' ) ); foreach ($attributesInfo as $attributeCode => $attributeParams) { $installer->addAttribute('customer_address', $attributeCode, $attributeParams); } $vatAttribute = Mage::getSingleton('eav/config')->getAttribute('customer_address', 'vat_id'); $vatAttribute->setData('used_in_forms', array( 'adminhtml_customer_address', 'customer_address_edit', 'customer_register_address' )); $vatAttribute->save();