i have an Magento2 Shop and the countries Germany and France are allowed. Now i want the following settings:

DE = Vat ID is optional in checkout and register FR = Vat ID is required in checkout and register

It is one storeview. Any solution for this problem?

New contributor
Maximilian Schwarz is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

This can be enabled via admin panel:

Stores > Configuration > Customer Configuration > Name and Address Options > Show Tax/VAT Number

The possible options are:

  • No
  • Optional
  • Required

enter image description here

On checkout

enter image description here

Now, other possibilities are :

1 If you navigate to:

Stores > Configuration > Customers > Customer Configuration > (Change Scope to correct website/store view) > Create New Account Options > Show VAT Number on Storefront

Change dropdown to Yes.

You'll then have to set up your tax classes/tax rules/customer groups and then in the above section you can assign the correct values to the groups.

enter image description here

http://docs.magento.com/m2/ce/user_guide/tax/vat-validation-configure.html

2 From Database

UPDATE `eav_attribute` SET `is_required` = '1' WHERE `eav_attribute`.`attribute_id` = 36;

it's working

  • I can't do this, because i have only one storeview. I need an validation which country is selected in the checkout. – Maximilian Schwarz yesterday

Your Answer

Maximilian Schwarz is a new contributor. Be nice, and check out our Code of Conduct.
 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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