Steffen Posted October 14, 2012 Share Posted October 14, 2012 (edited) Hej En kunde har netop gennemført en ordre uden at indtaste telefonnummer, så jeg gik straks igang med at undersøge hvordan det kunne lade sig gøre. Jeg fandt ret hurtigt ud af, at man blot kan indsætte et mellemrum (altså et enkelt tryk på space-tasten). Dermed registrerer den, at man har indtastet i det obligatoriske telefonnummer-felt. Kan man ikke lave en kode, så disse felter skal indeholde mindst 8 cifre? På forhånd tak for hjælpen! Edit: V.1.4.4.1 Edited October 17, 2012 by Nondo (see edit history) Link to comment Share on other sites More sharing options...
Prestafan1234 Posted October 14, 2012 Share Posted October 14, 2012 Er det den indbyggede check out eller Canin's OPC modul? Link to comment Share on other sites More sharing options...
Steffen Posted October 16, 2012 Author Share Posted October 16, 2012 Det er den indbyggede checkout (1- og 5-trins)... Link to comment Share on other sites More sharing options...
markottnilsen Posted October 16, 2012 Share Posted October 16, 2012 (edited) Du skal ind og ændre i AuthController.php i mappen controllers. Her skal du ændre hvilke regler der gælder for validering. Ændre til følgende på linje 84. if ((Tools::getValue('phone') && (strlen(Tools::getValue('phone')) != 8 || !is_numeric(Tools::getValue('phone')))) || (Tools::getValue('phone_mobile') && (strlen(Tools::getValue('phone_mobile')) != 8 || !is_numeric(Tools::getValue('phone_mobile')))) || (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))) $this->errors[] = Tools::displayError('You must register at least one phone number that\'s 8 numbers long'); Edited October 16, 2012 by markottnilsen (see edit history) Link to comment Share on other sites More sharing options...
presta-dyr Posted October 17, 2012 Share Posted October 17, 2012 I PrestaShop 1.5.1.0 kan man vælge om telefonnummeret er obligatorisk under Preferences > Customers. /Kjeld Link to comment Share on other sites More sharing options...
Steffen Posted October 17, 2012 Author Share Posted October 17, 2012 (edited) Glemte at skrive, at jeg bruger v. 1.4.4.1 @markottnilsen: Jeg prøver ... og det virkede! Tak for hjælpen. PS: Hvorfor får jeg ikke en e-mail, som jeg plejer, når der svares på emnet? Edited October 17, 2012 by Nondo (see edit history) 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