kiamaru Posted March 3, 2013 Share Posted March 3, 2013 hi i want to change the size of EAn (13 max) and UPC (12) and allow spécial caractères like '+, @, etc' thanks for your replies Link to comment Share on other sites More sharing options...
tuk66 Posted December 27, 2013 Share Posted December 27, 2013 Change the isEan13() and isUpc() functions in /classes/Validate.php for special characters. Change values (size' => ...) for the ean13 and upc keys under 'fields' => array(... in /classes/Product.php as well as the ean13 and upc field lengths in the ps_product and ps_product_attribute tables. And of course finally, use a barcode which supports special characters. 1 Link to comment Share on other sites More sharing options...
vjy.kumavat Posted April 16, 2015 Share Posted April 16, 2015 Thanks Bro Link to comment Share on other sites More sharing options...
Wouter van der Horst Posted July 23, 2017 Share Posted July 23, 2017 I have try dis in prestashop 1.7.x its not working. My ean is 14 characters and not 13 Everybody a fixed for this problem? Link to comment Share on other sites More sharing options...
mma87 Posted February 4, 2018 Share Posted February 4, 2018 Hello, i had the same problem with ps 1.7 go to your database, find the ps_product and change the max value of ean13 column to 14 in src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php find ->add('ean13', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, 'error_bubbling' => true, 'label' => $this->translator->trans('EAN-13 or JAN barcode', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\Regex("/^[0-9]{0,13}$/"), ) )) and change new Assert\Regex("/^[0-9]{0,13}$/"), to new Assert\Regex("/^[0-9]{0,14}$/"), then go to classes/product.php and modify array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13), to array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 14), bye! Matteo Link to comment Share on other sites More sharing options...
Birnex Posted May 19, 2019 Share Posted May 19, 2019 Hello, doesnt work. I cant open the admin page. What i do wrong? Link to comment Share on other sites More sharing options...
mma87 Posted May 20, 2019 Share Posted May 20, 2019 On 5/19/2019 at 3:51 PM, Birnex said: Hello, doesnt work. I cant open the admin page. What i do wrong? Hello, what do you mean when you say "i can't open the admin page"? Link to comment Share on other sites More sharing options...
Adrian Posted September 26, 2019 Share Posted September 26, 2019 (edited) Hi. Does this still work? I currently have the same problem and we don't make them work. I made all the changes marked here. I did what @ tuk66 marked and still marks me as invalid. I also made the changes of @ mma87. I have version 1.7.4.3 Edited September 26, 2019 by Adrian (see edit history) Link to comment Share on other sites More sharing options...
mma87 Posted September 26, 2019 Share Posted September 26, 2019 Hello, backup first! then you can try with this: delete var/cache/prod/class_index.php and var/cache/dev/class_index.php so it will rebuild the class cache file. Link to comment Share on other sites More sharing options...
Adrian Posted September 26, 2019 Share Posted September 26, 2019 Hi! Thank you for answering so quickly! That would be like clearing the cache from the backoffice, right? Link to comment Share on other sites More sharing options...
Adrian Posted September 26, 2019 Share Posted September 26, 2019 Do I delete the file or delete all the content from top to bottom? Link to comment Share on other sites More sharing options...
mma87 Posted September 26, 2019 Share Posted September 26, 2019 you can delete the cache from backoffice than check in the FTP if the files I tell you are still here. If yes you have to delete them manually. Link to comment Share on other sites More sharing options...
Adrian Posted September 26, 2019 Share Posted September 26, 2019 I have already deleted them and it still doesn't work. - I have tried to increase the length in "Validate.php" and "Product.php". - To change the length in the ps_product and ps_product_attribute tables of the database. - To increase the length in "ProductOptions.php" - And finally clear the cache you told me. I do not know what else to do Link to comment Share on other sites More sharing options...
Adrian Posted September 26, 2019 Share Posted September 26, 2019 (edited) Ok, it's my fault. That does work. I have not explained well. I wanted to say in the EAN13 (or ISBN, no matter) of a product with combinations. I need it in the combinations, not in the product. Product: Combinations: (i want this) Edited September 27, 2019 by Adrian (see edit history) Link to comment Share on other sites More sharing options...
Adrian Posted September 27, 2019 Share Posted September 27, 2019 (edited) Any ideas? @mma87 Maybe in the ProductCombination.php file? Edited September 27, 2019 by Adrian (see edit history) Link to comment Share on other sites More sharing options...
Adrian Posted September 27, 2019 Share Posted September 27, 2019 (edited) Yes, finally! You just had to edit that file! Thanks for the help! src/PrestaShopBundle/Form/Admin/Product/ProductCombination.php Edited September 27, 2019 by Adrian (see edit history) Link to comment Share on other sites More sharing options...
mma87 Posted September 27, 2019 Share Posted September 27, 2019 I'm sorry for the delay, well done! Link to comment Share on other sites More sharing options...
fonteyne131 Posted March 18, 2020 Share Posted March 18, 2020 Hi, i would like to translate "upc" into "cnk" but i can't find it. I did already in backoffice but no changes in frontend. Somebody who can give ma good advice? This is link to product https://wecarepro.be/nl/bedden-en-toebehoren/23-1598-23-tempur_hoofdkussen_original.html#/518-grootte-medium Best regards Jurgen 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