fenderstr Posted April 2, 2013 Share Posted April 2, 2013 at checkout in the final file validate.php I get a blank page, and in the error log I see this: Fatal error: Uncaught exception 'PrestaShopException' with message 'Property OrderDetail->product_upc is not valid' in /web/htdocs/www.XXX.XXX/home/classes/ObjectModel.php:837 Stack trace: #0 /web/htdocs/www.XXX.XXX/home/classes/ObjectModel.php(264): ObjectModelCore->validateFields() #1 /web/htdocs/www.XXX.XXX/home/classes/ObjectModel.php(464): ObjectModelCore->getFields() #2 /web/htdocs/www.XXX.XXX/home/classes/ObjectModel.php(426): ObjectModelCore->add(true, false) #3 /web/htdocs/www.XXX.XXX/home/classes/order/OrderDetail.php(579): ObjectModelCore->save() #4 /web/htdocs/www.XXX.XXX/home/classes/order/OrderDetail.php(603): OrderDetailCore->create(Object(Order), Object(Cart), Array, '16', 0, true, 0) #5 /web/htdocs/www.XXX.XXX/home/classes/PaymentModule.php(283): OrderDetailCore->createList(Object(Order), Object(Cart), '16', Array, 0, true, 0) #6 /web/htdocs/www.XXX.XXX/home/modules/takeaway/validation.php(38): PaymentModuleCore->valid in /web/htdocs/www.XXX.XXX/home/classes/ObjectModel.php on line 837 HELP.... Link to comment Share on other sites More sharing options...
NemoPS Posted April 2, 2013 Share Posted April 2, 2013 The UPC field is not valid for one of the products you're trying to buy Link to comment Share on other sites More sharing options...
fenderstr Posted April 2, 2013 Author Share Posted April 2, 2013 THANK'S IT's WORK Link to comment Share on other sites More sharing options...
nish Posted November 7, 2013 Share Posted November 7, 2013 (edited) I have modified upc_code filed for using size display and changed databse too, but getting following error at the checkout, any help how to stop validating this filed at the checkout? Property OrderDetail->product_upc is not valid at line 837 in file classes/ObjectModel.php 831. 832. $message = $this->validateField($field, $this->$field); 833. if ($message !== true) 834. { 835. if ($die) 836. throw new PrestaShopException($message); 837. return $error_return ? $message : false; 838. } 839. } 840. 841. return true; ObjectModelCore->validateFields - [line 255 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->getFields - [line 455 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->add - [line 417 - classes/ObjectModel.php] - [2 Arguments] ObjectModelCore->save - [line 589 - classes/order/OrderDetail.php] - [0 Argument] OrderDetailCore->create - [line 613 - classes/order/OrderDetail.php] - [7 Arguments] OrderDetailCore->createList - [line 279 - classes/PaymentModule.php] - [7 Arguments] PaymentModuleCore->validateOrder - [line 64 - modules/cheque/controllers/front/validation.php] - [9 Arguments] ChequeValidationModuleFrontController->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument] Edited November 7, 2013 by nish (see edit history) Link to comment Share on other sites More sharing options...
jaxTus Posted August 27, 2015 Share Posted August 27, 2015 I have modified upc_code filed for using size display and changed databse too, but getting following error at the checkout, any help how to stop validating this filed at the checkout? Property OrderDetail->product_upc is not valid at line 837 in file classes/ObjectModel.php 831. 832. $message = $this->validateField($field, $this->$field); 833. if ($message !== true) 834. { 835. if ($die) 836. throw new PrestaShopException($message); 837. return $error_return ? $message : false; 838. } 839. } 840. 841. return true; ObjectModelCore->validateFields - [line 255 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->getFields - [line 455 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->add - [line 417 - classes/ObjectModel.php] - [2 Arguments] ObjectModelCore->save - [line 589 - classes/order/OrderDetail.php] - [0 Argument] OrderDetailCore->create - [line 613 - classes/order/OrderDetail.php] - [7 Arguments] OrderDetailCore->createList - [line 279 - classes/PaymentModule.php] - [7 Arguments] PaymentModuleCore->validateOrder - [line 64 - modules/cheque/controllers/front/validation.php] - [9 Arguments] ChequeValidationModuleFrontController->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument] Hi Nish, Did you find a solution to this? I'm having the same problem but with price. Thanks. Link to comment Share on other sites More sharing options...
NemoPS Posted August 31, 2015 Share Posted August 31, 2015 As the error mentions OrderDetail, you can check that out in the classes/ folder, and change its validation rules Link to comment Share on other sites More sharing options...
Recommended Posts