magento / data-migration-tool

Magento Data Migration Tool
https://devdocs.magento.com/guides/v2.3/migration/bk-migration-guide.html
Open Software License 3.0
336 stars 200 forks source link

Customer VAT ID not saved in frontend or backend #797

Closed dragonfly4 closed 4 years ago

dragonfly4 commented 4 years ago

Below is a copy from https://github.com/magento/magento2/issues/7668#issuecomment-588259398

Migration from v1.6 to v2.3.3 with the Data Migration Tool resulted in not saving the VAT number. Neither in frontend and backend.

SELECT * FROM eav_attribute where attribute_code = 'vat_id'

Resulted in ID 563 while a fresh install returned ID 2.

ID 563 was not added to table customer_form_attribute so I added 3 records.

form_code                            attribute_id   
adminhtml_customer_address               563    
customer_address_edit                        563    
customer_register_address                563    

Table eav_entity_attribute was also missing ID 563. So ran below query.

INSERT INTO eav_entity_attribute (entity_type_id, attribute_set_id, attribute_group_id, attribute_id, sort_order) VALUES (2, 2, 2, (SELECT attribute_id from eav_attribute where attribute_code = 'vat_id' and entity_type_id = (select entity_type_id from eav_entity_type where entity_type_code = 'customer_address')), 150);

Problem solved!

dragonfly4 commented 4 years ago

More FYI as I spent 1 day finding what caused this.

Just here to save other people from going thru the same struggle so closing the issue.