dazzza Posted July 11, 2011 Share Posted July 11, 2011 If anyone is using Prestashop as an online bookshop & is using the EAN13 number as the ISBN number you'll find some books ISBN numbers are only 10 characters long & include an x at the end "033376157X".As Prestashop is expecting a 13 'number sequence' It'll not accept this.To get around it just change line 504 in classes/Validate.php from return !$ean13 OR preg_match('/^[0-9]{0,13}$/ui', $ean13); to return !$ean13 OR preg_match('/^[a-z 0-9]{0,13}$/ui', $ean13); This is for Prestashop 1.3.7 Link to comment Share on other sites More sharing options...
Jabouty Posted April 1, 2012 Share Posted April 1, 2012 Sorry for the necromancy of this thread, but this is apparently still an issue in 1.4.7. I just ran into this today and it failed with a EAN10 with a final digit of "X". On or about Line 581 of the above referenced file, change: return !$ean13 OR preg_match('/^[0-9]{0,13}$/', $ean13); to return !$ean13 OR preg_match('/^[0-9a-zA-Z]{0,13}$/', $ean13); 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