Question

It seems there are two VAT fields available and I am not sure which one to use.

One of the fields is tied to the customer/address model while the other seems to be tied directly to customer. In checkout/onepage there are places to output both fields (one is hardcoded as an address field) and the other is created with customer/widget_taxvat.

When using guest checkout or registering for an account during checkout both of these fields appear if their respective config are toggled on (customer/create_account/vat_frontend_visibility and customer/address/taxvat_show).

Which one of these should I be using?

Someone posed the same question on the Magento forum but the only response was:

I have simillar problem. Check http://www.magentocommerce.com/bug-tracking/issue?issue=13504 They say that \"VAT is related to address by design\” - I quess it means that old VAT field, related to customer rather than to billing address, is deprecated. So simply disable it…

And that is hardly conclusive given that post is from 2012 and Magento 1.7 and there are no @deprecated tags on the templates or widgets/blocks for the customer taxvat field in 1.9 some 2 years later.

I did try and take a look at that ticket in the bug tracker to see if there was some more detailed info but it seems to have been removed from the system (note: that direct link wont work since the routing has changed, but i tried to look up the ticket number as well as do a keyword search and got no joy).

Was it helpful?

Solution

While I can't find any tangible proof for this, I suspect the VAT field in the customer is a relic from the past and Magento at a later point added it to the address because the rest of the company specific information is in there as well.

If you want to do anything with the vat validation services you want to be using the address version of the field and ignore the other one.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top