Cisterpe Posted July 26, 2016 Share Posted July 26, 2016 Hola tengo un problema aleatorio con algunos pedidos, y es que no se guardan en el sistema debido a que la clave "secure_key" no puede ser NULL a la hora de guardar el pedido. Me da error 500, he activado el debug y me devuelve el error en todo el proceso. Me he fijado y resulta que secure_key tampoco está con datos en el cliente. ¿Es normal que algunos clientes tengan secure_key en blanco, es esa misma clave la que se utiliza luego para guardar el pedido y por eso no funicona o no tiene nada que ver? Dejo aqui el error que me aparece Gracias [PrestaShopDatabaseException] Column 'secure_key' cannot be null INSERT INTO `ps_orders` (`id_address_delivery`, `id_address_invoice`, `id_cart`, `id_currency`, `id_shop_group`, `id_shop`, `id_lang`, `id_customer`, `id_carrier`, `current_state`, `secure_key`, `payment`, `module`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `total_discounts`, `total_discounts_tax_incl`, `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', 'ZBLUTDECB', '2016-07-26 08:21:42', '2016-07-26 08:21:42', '0', '0') at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 790. if ($sql) { 791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 792. } 793. 794. throw new PrestaShopDatabaseException($this->getMsgError()); 795. } 796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] Argument [0] INSERT INTO `ps_orders` (`id_address_delivery`, `id_address_invoice`, `id_cart`, `id_currency`, `id_shop_group`, `id_shop`, `id_lang`, `id_customer`, `id_carrier`, `current_state`, `secure_key`, `payment`, `module`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `total_discounts`, `total_discounts_tax_incl`, `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', 'ZBLUTDECB', '2016-07-26 08:21:42', '2016-07-26 08:21:42', '0', '0') DbCore->query - [line 763 - classes/db/Db.php] - [1 Arguments] Argument [0] INSERT INTO `ps_orders` (`id_address_delivery`, `id_address_invoice`, `id_cart`, `id_currency`, `id_shop_group`, `id_shop`, `id_lang`, `id_customer`, `id_carrier`, `current_state`, `secure_key`, `payment`, `module`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `total_discounts`, `total_discounts_tax_incl`, `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', 'ZBLUTDECB', '2016-07-26 08:21:42', '2016-07-26 08:21:42', '0', '0') DbCore->q - [line 514 - classes/db/Db.php] - [2 Arguments] Argument [0] INSERT INTO `ps_orders` (`id_address_delivery`, `id_address_invoice`, `id_cart`, `id_currency`, `id_shop_group`, `id_shop`, `id_lang`, `id_customer`, `id_carrier`, `current_state`, `secure_key`, `payment`, `module`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `total_discounts`, `total_discounts_tax_incl`, `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', 'ZBLUTDECB', '2016-07-26 08:21:42', '2016-07-26 08:21:42', '0', '0') Argument [1] 1 DbCore->insert - [line 487 - classes/ObjectModel.php] - [3 Arguments] Argument [0] orders Argument [1] Array ( [id_address_delivery] => 4559 [id_address_invoice] => 4559 [id_cart] => 14439 [id_currency] => 1 [id_shop_group] => 1 [id_shop] => 1 [id_lang] => 1 [id_customer] => 4335 [id_carrier] => 111 [current_state] => 0 [secure_key] => [payment] => Transferencia bancaria [module] => bankwire [recyclable] => 0 [gift] => 0 [gift_message] => [mobile_theme] => 0 [total_discounts] => 0 [total_discounts_tax_incl] => 0 [total_discounts_tax_excl] => 0 [total_paid] => 92.57 [total_paid_tax_incl] => 92.57 [total_paid_tax_excl] => 76.5 [total_paid_real] => 0 [total_products] => 73 [total_products_wt] => 88.33 [total_shipping] => 4.24 [total_shipping_tax_incl] => 4.24 [total_shipping_tax_excl] => 3.5 [carrier_tax_rate] => 21 [total_wrapping] => 0 [total_wrapping_tax_incl] => 0 [total_wrapping_tax_excl] => 0 [round_mode] => 2 [round_type] => 2 [shipping_number] => [conversion_rate] => 1 [invoice_number] => 0 [delivery_number] => 0 [invoice_date] => 0000-00-00 00:00:00 [delivery_date] => 0000-00-00 00:00:00 [valid] => 0 [reference] => ZBLUTDECB [date_add] => 2016-07-26 08:21:42 [date_upd] => 2016-07-26 08:21:42 [payment_fee] => 0 [payment_fee_rate] => 0 ) Argument [2] 1 ObjectModelCore->add - [line 309 - classes/order/Order.php] - [2 Arguments] Argument [0] 1 Argument [1] 1 OrderCore->add - [line 341 - classes/PaymentModule.php] 336. if (self::DEBUG_MODE) { 337. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order is about to be added', 1, null, 'Cart', (int)$id_cart, true); 338. } 339. 340. // Creating order 341. $result = $order->add(); 342. 343. if (!$result) { 344. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order cannot be created', 3, null, 'Cart', (int)$id_cart, true); 345. throw new PrestaShopException('Can\'t save Order'); 346. } PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments] Argument [0] 14439 Argument [1] 10 Argument [2] 92.57 Argument [3] Transferencia bancaria Argument [4] Argument [5] Array ( [{bankwire_owner}] => Web Hogar S.L. [{bankwire_details}] => ES84-2100-4214-69-2200054123 [{bankwire_address}] => La Caixa ) Argument [6] 1 Argument [7] Argument [8] BankwireValidationModuleFrontController->postProcess - [line 178 - classes/controller/Controller.php] 173. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 174. $this->setMedia(); 175. } 176. 177. // postProcess handles ajaxProcess 178. $this->postProcess(); 179. 180. if (!empty($this->redirect_after)) { 181. $this->redirect(); 182. } 183. ControllerCore->run - [line 367 - classes/Dispatcher.php] 362. if (isset($params_hook_action_dispatcher)) { 363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher); 364. } 365. 366. // Running controller 367. $controller->run(); 368. } catch (PrestaShopException $e) { 369. $e->displayMessage(); 370. } 371. } 372. DispatcherCore->dispatch - [line 28 - index.php] 23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24. * International Registered Trademark & Property of PrestaShop SA 25. */ 26. 27. require(dirname(__FILE__).'/config/config.inc.php'); 28. Dispatcher::getInstance()->dispatch(); Link to comment Share on other sites More sharing options...
drzraf Posted December 28, 2016 Share Posted December 28, 2016 Same issue. Found http://forge.prestashop.com/browse/PNM-3843 which pointed me on the right track: customer_id wasn't NULL but, for a still unknown reason, it had an empty "secure_key" value. Link to comment Share on other sites More sharing options...
leonardomarinio Posted May 10, 2021 Share Posted May 10, 2021 On 26/7/2016 at 3:29, Cisterpe said: Hola tengo un problema aleatorio con algunos pedidos, y es que no se guardan en el sistema debido a que la clave "secure_key" no puede ser NULL a la hora de guardar el pedido. Me da error 500, he activado el debug y me devuelve el error en todo el proceso. Me he fijado y resulta que secure_key tampoco está con datos en el cliente. ¿Es normal que algunos clientes tengan secure_key en blanco, es esa misma clave la que se utiliza luego para guardar el pedido y por eso no funicona o no tiene nada que ver? Dejo aqui el error que me aparece Gracias [PrestaShopDatabaseException] `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0', '0', '0000-00-00 00:00:00', `total_discounts_tax_incl`, `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0' `total_discounts_tax_incl`, `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0' `total_discounts_tax_incl`, `total_discounts_tax_excl`, `total_paid`, `total_paid_tax_incl`, `total_paid_tax_excl`, `total_paid_real`, `total_products`, `total_products_wt`, `total_shipping`, `total_shipping_tax_incl`, `total_shipping_tax_excl`, `carrier_tax_rate`, `total_wrapping`, `total_wrapping_tax_incl`, `total_wrapping_tax_excl`, `round_mode`, `round_type`, `shipping_number`, `conversion_rate`, `invoice_number`, `delivery_number`, `invoice_date`, `delivery_date`, `valid`, `reference`, `date_add`, `date_upd`, `payment_fee`, `payment_fee_rate`) VALUES ('4559', '4559', '14439', '1', '1', '1', '1', '4335', '111', '0', NULL, 'Transferencia bancaria', 'bankwire', '0', '0', NULL, '0', '0', '0', '0', '92.57', '92.57', '76.5', '0', '73', '88.33', '4.24', '4.24', '3.5', '21', '0', '0', '0', '2', '2', NULL, '1', '0' Argument [0] 14439 Argument [1] 10 Argument [2] 92.57 Argument [3] Transferencia bancaria Argument [4] Hola tengo el mismo error, pudiste encontrar la solucion? 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