0

How can I copy the value in customer entity's taxvat field to the same customer's customer address entity's VAT ID field? It has to take into account that customer can have many addresses, and I want the same taxvat to be copied to all of the addresses.

I guess there are several ways to do this. With MySQL, with export-import functionality and with code.

1 Answer 1

0

I managed to do this with this SQL query:

UPDATE customer_address_entity,customer_entity SET customer_address_entity.vat_id = customer_entity.taxvat WHERE customer_address_entity.parent_id = customer_entity.entity_id;

It copied the taxvat to all of the addresses of customers'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.