Web Curator Posted May 29, 2017 Share Posted May 29, 2017 (edited) Hi Guys I have a problem with the IDENTIFICATION NUMBER during the checkout. Even if you complete the field correctly, I have this bad feedback: INVALID FORMAT Do you know how to fix this validation or disable it? somebody else with the same problem? Best Edited May 29, 2017 by Web Curator (see edit history) 1 Link to comment Share on other sites More sharing options...
Web Curator Posted May 30, 2017 Author Share Posted May 30, 2017 At the moment the validation of the Identification Number seems is made by the function isSiret in the file Validate.php but is made for only the french public... maybe is this one the error? For a w.w. e-commerce we need a check that include only String and Numbers? public static function isSiret($siret) { if (Tools::strlen($siret) != 14) { return false; } $sum = 0; for ($i = 0; $i != 14; $i++) { $tmp = ((($i + 1) % 2) + 1) * intval($siret[$i]); if ($tmp >= 10) { $tmp -= 9; } $sum += $tmp; } return ($sum % 10 === 0); } 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