Jump to content

How to move 'siret' field to 'Addresses' (checkout)


yari92

Recommended Posts

Hello, 

I would like to know if is it possible to move a "siret" field from section "Personal (or General) information" to "Addresses" section.

From here:

image001.png.2cdd8e9e2056a65e0406ff38201c06e3.png

To here:

image002.png.e52d65ec32b009a4f857fbb81e26f87d.png

This should enable the user to choose the "Invoice" option in the next section:

image003.png.f75a2720208d0c88697a4535543373d6.png

I found in  /classes/CustomerFormatter.php the code of this field and moved it to  /classes/CustomerAddressFormatter.php, but i couldn't find the logic of saving it and enabling that "Invoice" ("Fattura") radio button.

 $format['siret'] = (new FormField)
                ->setName('siret')
                ->setType('text')
                ->setLabel($this->translator->trans(
                    // Please localize this string with the applicable registration number type in your country. For example : "SIRET" in France and "Código fiscal" in Spain.
                    'Identification number', [], 'Shop.Forms.Labels'
                ));

Maybe there is a simpliest way to do this?
Can you help me?
Thank you :)

Link to comment
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...