As I understood, enabling in 'Stores > Configuration > Customer configuration > Create new account options' the assignment to a customer group according to valid/invalid Vat ID should suffice to the proper customer handling on registration.

As for now, it is not working, so I am forced to do that manually for each new customer. Am I missing something?

1 Answer 1


If you want to use the assignment with european VAT's it wont work cause in europe is the countrycode also in the VAT (eg. ATUXXXXXX, DEXXXXXX).

I wrote a module to fix this.

  • I tried registring with a valid italian VAT ID in the format IT**********, but the customer is still put in the default customer group.
    – gasper
    Jun 29, 2016 at 15:41
  • Regarding your module, it breaks magento, but I didn't investigate further on the issue, I just removed it. Here's the output when i run setup:upgrade imgur.com/NNO70Zx
    – gasper
    Jun 29, 2016 at 15:49
  • which version of Magento2 do you use ? see here for official documentation devdocs.magento.com/guides/v2.0/extension-dev-guide/build/…
    – roman204
    Jun 30, 2016 at 7:16
  • Magento 2.0.6. I don't know, it boggles me. I need to look more into it
    – gasper
    Jun 30, 2016 at 13:30
  • this happened because of some "old" spelling in xml's its fixed now.
    – roman204
    Apr 4, 2017 at 11:02

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.