slillobss Posted February 17, 2020 Share Posted February 17, 2020 I'm on prestashop 1.6.1.7. I'm trying to ask customers to provide their DNI on addresses creation/update. I already set the field as mandatory in Address module as shown in attached screenshot, but DNI field is never shown. What am I missing? Thanks in advance. Link to comment Share on other sites More sharing options...
slillobss Posted February 20, 2020 Author Share Posted February 20, 2020 up Link to comment Share on other sites More sharing options...
marijn Posted April 14, 2020 Share Posted April 14, 2020 up, I'm using 1.7.5 and DNI field is not showing.. Link to comment Share on other sites More sharing options...
Experience of Design Posted October 19, 2021 Share Posted October 19, 2021 (edited) For showing DNI field you need update DB record in prefix_address_format and add "dni" to your record for using country id. If you need required field, this maybe add to some js file for validation. Do you know someone this solution? Edited October 19, 2021 by Experience of Design (see edit history) Link to comment Share on other sites More sharing options...
Davidlopez22 Posted August 15 Share Posted August 15 I was facing a similar issue a while back. It seems like the DNI field issue is related to your PrestaShop settings or database configuration. Here's a quick way to fix it: Check Database: Ensure the prefix_address_format table has a record for the DNI field. Add it if missing with values like: id_country: 21 (Spain) field: dni type: text required: 1 (or 0 if optional) position: set an appropriate number. Adjust Address Format in Admin: Go to Localization > Countries > Spain > Edit > Address Format, and ensure the DNI field is included in the format. Edit Template Files: In address.tpl, make sure the DNI field is correctly coded: {if $field_name eq 'dni'} <input type="text" name="dni" id="dni" value="{$address->dni|escape:'htmlall':'UTF-8'}" /> {/if} If the issue persists, it could be due to B2B settings or JavaScript validation. Also, if you need help navigating DNI issues or step-by-step guidance on the process, check Pedir Citas DNI, which offers support and information for DNI-related matters. The last step is just to clear the cache. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now