Jump to content

How to change length of ean13 code or avoid validation?


Judgin

Recommended Posts

Hello, I have some products which have ean code longer than 13 digits. And when on this product page the button "Add to cart" is pressed. This error is showed

Fatal error: Uncaught PrestaShopException: The length of property Combination->ean13 is currently 14 chars. It must be between 0 and 13 chars. in /data01/virt101310/domeenid/www.japanparts.ee/htdocs/classes/ObjectModel.php:1027 Stack trace: #0 /data01/virt101310/domeenid/www.japanparts.ee/htdocs/classes/ObjectModel.php(292): ObjectModelCore->validateFields() #1 /data01/virt101310/domeenid/www.japanparts.ee/htdocs/classes/ObjectModel.php(559): ObjectModelCore->getFields() #2 /data01/virt101310/domeenid/www.japanparts.ee/htdocs/classes/Combination.php(183): ObjectModelCore->add(true, false) #3 /data01/virt101310/domeenid/www.japanparts.ee/htdocs/classes/Product.php(2011): CombinationCore->add() #4 /data01/virt101310/domeenid/www.japanparts.ee/htdocs/classes/Product.php(1642): ProductCore->addAttribute('-0.73', '0', 0, false, '', 'Febest 95IBS-35...', ' 4056111133331', false, 'Febest', '922216730', 1, Array, NULL, 0, '', NULL, false, NULL) #5 /data01/virt101310/domeenid/www.japanparts.ee/htdocs/carparts/tocms/PrestaShop.1.7. in /data01/virt101310/domeenid/www.japanparts.ee/htdocs/classes/ObjectModel.php 

I changed the value of variable ean13 in many files and in the database tables as well. Bet still get this error. Could you help me please in this situation?

Link to comment
Share on other sites

On 12/7/2023 at 3:28 PM, endriu107 said:

Did you changed it in  Validate.php file too?

Yes, this was changed in the validate.php file too. I don't know why this error appeared after all the changes. I also cleared the cache. But yesterday this error gone and still does not appear.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...