No image available

Customer DNI

Adds a validated national identity document (DNI) field at the customer account level in PrestaShop, with configurable uniqueness, regex validation, address sync, and back office support.

Developed by Enzo Biggio

Get This Module Free on PS Forum EN
PS 1.7 – 9.x License: GPL-3.0 Status: Active Health: Excellent

Info updated 1 month ago

Sources
PS Forum EN Visit →
Stars: 4 Forks: 1 Last commit: Jun 2, 2025
Type
Module

Info checked: Mar 2, 2026

Customer DNI is a free PrestaShop module that moves the customer's national identity document (DNI) field from the address level to the customer account level. By default, PrestaShop stores the DNI field per address, which means a single customer can have multiple addresses with different DNI values, and the same DNI can appear across different customers. This module solves that problem by creating a dedicated, validated DNI field tied directly to the customer's personal information record.

  • Customer-level DNI field: Adds a DNI input to the customer registration and account-edit forms, storing the value in a separate database table linked to the customer's ID — independent of the address table.
  • Configurable validation: Set the field as required, enforce uniqueness across all customers, and optionally validate the value against a custom regular expression. Additional validation logic can be added via a custom PHP validator class; a Chilean RUT validator is included as a working example.
  • Back office integration: Displays the DNI in the customer list and edit form in the back office, with support for filtering and sorting by DNI value.
  • Address sync option: Optionally overwrite the DNI field on all of a customer's addresses whenever the customer-level DNI is updated — useful for invoice generation or other modules that read the address DNI.
  • Developer-friendly: Provides custom hooks that fire when a DNI is saved or deleted, enabling deeper integration with other modules. Fully translatable, with no core file modifications or overrides.

This module is particularly useful for stores operating in countries where a national ID number is required for customer verification, discount eligibility, or invoicing — such as the DNI in Spain and Argentina, or the RUT in Chile. It is well suited for developers and merchants who need a robust, validated, and uniquely-constrained customer identifier beyond the standard email address.

  • Reference
    customer_dni

  • License
    GPL-3.0
  • PS Compatibility
    1.7.x
    8.x
    9.x
  • Status
    Active

Comments (0)

No customer reviews for the moment.
Loading...