Prestashop 1.7.1 | Set fiscal code as “required” on address’s form on checkout
For a customer’s website made in prestashop that we re optimizing, we need to adds required fiscal code on address checkout form.
We know that prestashop give the managing of this from backend.
We need to login on backend, and go to :
International -> Locality
Here we need to selct the locality or localites that we need to update.
(In my case is Italy ), click “modfy” button ( on right ).
You see a screen shot like this:
FIrst step is to scroll down to ” address settings ” section and click on “dni” on right side of this section.
You see that a ” dni ” tag is addedd on left side cell.
scroll down a little bit , and you see a “switch” that have lable with ” Fiscal Code Required “.
Switch it on “yes” and save.
Now go in the frontend go in checkout and try to complate a purchase, you see the ” fiscal code ” field on form, that’s ok, but, if you pay attention, the field isn’t required.
We need one more step.
Let’s back on administration and go in :
Customers -> Adresses
Scroll down and click on button ” set mandatory fields for this section “.
Appears a new section called ” Required Fields”.
Flag the DNI field.
Back on frontend, go in checkout and try to complate a purchase, now the Fiscal Code is required.
Tha’s all