Jump to content

dni field never shown


slillobss

Recommended Posts

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.

 

dnimandatory.png

addressformcompiled.png

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 3 years later...

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

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...