After viewing the magento code and reading the wiki, I was able to complete, my new attribute was saved in the address editing form in the profile, but was not saved when I enter it into the extract form, this was because I needed to redefine some of the main magento files, the first step was to add a new attribute in app\code\core\Mage\Customer\etc\config.xml , I copied to app\code\core\Mycompany\Customer\etc\config.xml , since my new attribute code is rfc , I find the <fieldsets> entry and
<customer_dataflow> .... <rfc><billing>1</billing><shipping>1</shipping></rfc> </customer_dataflow>
Now I need to add a new attribute in app\code\core\Mage\Customer\Model\Entity\Setup.php , I did the same to override, copy to my local namespace and in the getDefaultEntities() function find the local
'customer_address'=>array( .... 'rfc' => array( 'label' => 'RFC', 'required' => false, 'sort_order' => 135, ), )
Now, I need to do the same in app\code\core\Mage\Sales\etc\config.xml , but now it should look like this:
<sales_copy_order_billing_address> ..... <rfc><to_order>*</to_order></rfc> </sales_copy_order_billing_address> <sales_copy_order_shipping_address> ...... <rfc><to_order>*</to_order></rfc> </sales_copy_order_shipping_address> <sales_convert_quote_address> ........ <rfc><to_order_address>*</to_order_address><to_customer_address>*</to_customer_address></rfc> </sales_convert_quote_address> <sales_convert_order_address> ......... <rfc><to_quote_address>*</to_quote_address></rfc> </sales_convert_order_address> <customer_address> ....... <rfc><to_quote_address>*</to_quote_address></rfc> </customer_address>
Hope this can help another person
source share