Jump to content

Automaticly set the vat_number field in address form


Recommended Posts

Hi All,

I need some help to find/use the right hook in PrestaShop 1.7.6.

I want to automatically set the vat_number field for a new address in the checkout or creating a new address with a hook. Is this possible in PrestaShop 1.7.6?

I found the form in classes/form/CustomerAddressForm.php.

So I tried to set the field with the hook actionCustomerAddressFormBuilderModifier but it doesn't work.

public function hookActionCustomerAddressFormBuilderModifier(array $params)
        /** @var FormBuilderInterface $formBuilder */
        $formBuilder = $params['form_builder'];
		$params['data']['vatnumber'] = $vatReference['vatnumber'];


All help is welcome.

Edited by MARK-APP.com
typo (see edit history)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More