kateclouds Posted November 17, 2016 Share Posted November 17, 2016 Dear All, I encountered a big problem in my website, running Prestashop 1.6.1.4., www.cartemurali.it. I put DNI field (=fiscal code field) as mandatory only for ITALIAN nation, because in other countries it is not necessary. I defined the mandatory field as additional in BO, Localizzazione > Nazione > Italia. I added DNI only for Italy, NOT for other countries, please see the screenshot in attachment. The problem is the following: if customers from abroad try to register their address, they are blocked by the message asking for DNI field to be filled, and the form is refreshed showing again Italy as default country, even if I am in the english version of the shop. Moreover, DNI field appears as mandatory also for customers out of Italy, after checking the module compiling, NOT before. I checked the file AddressController.php in /controllers/front/ folder, seems to me that this elseif is wrong, but I am not sure... Can you please help me to solve this issue? Probably thins is not only a problem of mine.... // Check country DNI if ($country->isNeedDni() && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni')))) { $this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.'); } elseif (!$country->isNeedDni()) { $address->dni = null; } } Thanks a lot for your kind support Caterina Link to comment Share on other sites More sharing options...
kateclouds Posted November 18, 2016 Author Share Posted November 18, 2016 Please...can anyone help me? Thanks a lot... 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