albatore Posted July 7, 2015 Share Posted July 7, 2015 (edited) Bonjour, Je viens recemment de mettre un site en ligne sous une version prestashop 1.6.0.14 Je n'ai pas de souci particulier hormis lors d'une validation de paiement avec le module de virement bancaire il apparait l'erreur suivante : [PrestaShopDatabaseException] Unknown column 'os.pdf_invoice' in 'field list' SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`, os.`id_order_state`, os.`pdf_invoice`, os.`pdf_delivery` FROM `ps_order_history` oh LEFT JOIN `ps_orders` o ON oh.`id_order` = o.`id_order` LEFT JOIN `ps_customer` c ON o.`id_customer` = c.`id_customer` LEFT JOIN `ps_order_state` os ON oh.`id_order_state` = os.`id_order_state` LEFT JOIN `ps_order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`) WHERE oh.`id_order_history` = 1169 AND os.`send_email` = 1 LIMIT 1 at line 646 in file classes/db/Db.php 641. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);642. }643. elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))644. {645. if ($sql)646. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');647. throw new PrestaShopDatabaseException($this->getMsgError());648. }649. }650. 651. /** DbCore->displayError - [line 340 - classes/db/Db.php] - [1 Arguments]335. if ($this->connect())336. $this->result = $this->_query($sql);337. }338. 339. if (_PS_DEBUG_SQL_)340. $this->displayError($sql);341. return $this->result;342. }343. 344. /**345. * Execute an INSERT query Argument [0] SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`, os.`id_order_state`, os.`pdf_invoice`, os.`pdf_delivery` FROM `ps_order_history` oh LEFT JOIN `ps_orders` o ON oh.`id_order` = o.`id_order` LEFT JOIN `ps_customer` c ON o.`id_customer` = c.`id_customer` LEFT JOIN `ps_order_state` os ON oh.`id_order_state` = os.`id_order_state` LEFT JOIN `ps_order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`) WHERE oh.`id_order_history` = 1169 AND os.`send_email` = 1 LIMIT 1 DbCore->query - [line 558 - classes/db/Db.php] - [1 Arguments]553. if ($use_cache && $this->is_cache_enabled && ($result = Cache::getInstance()->get(Tools::encryptIV($sql))) !== false)554. {555. $this->last_cached = true;556. return $result;557. }558. $this->result = $this->query($sql);559. if (!$this->result)560. $result = false;561. else562. $result = $this->nextRow($this->result);563. $this->last_cached = false; Argument [0] SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`, os.`id_order_state`, os.`pdf_invoice`, os.`pdf_delivery` FROM `ps_order_history` oh LEFT JOIN `ps_orders` o ON oh.`id_order` = o.`id_order` LEFT JOIN `ps_customer` c ON o.`id_customer` = c.`id_customer` LEFT JOIN `ps_order_state` os ON oh.`id_order_state` = os.`id_order_state` LEFT JOIN `ps_order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`) WHERE oh.`id_order_history` = 1169 AND os.`send_email` = 1 LIMIT 1 DbCore->getRow - [line 390 - classes/order/OrderHistory.php] - [1 Arguments]385. FROM `'._DB_PREFIX_.'order_history` oh386. LEFT JOIN `'._DB_PREFIX_.'orders` o ON oh.`id_order` = o.`id_order`387. LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer`388. LEFT JOIN `'._DB_PREFIX_.'order_state` os ON oh.`id_order_state` = os.`id_order_state`389. LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`)390. WHERE oh.`id_order_history` = '.(int)$this->id.' AND os.`send_email` = 1');391. if (isset($result['template']) && Validate::isEmail($result['email']))392. {393. ShopUrl::cacheMainDomainForShop($order->id_shop);394. 395. $topic = $result['osname']; Argument [0] SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name`, os.`id_order_state`, os.`pdf_invoice`, os.`pdf_delivery` FROM `ps_order_history` oh LEFT JOIN `ps_orders` o ON oh.`id_order` = o.`id_order` LEFT JOIN `ps_customer` c ON o.`id_customer` = c.`id_customer` LEFT JOIN `ps_order_state` os ON oh.`id_order_state` = os.`id_order_state` LEFT JOIN `ps_order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`) WHERE oh.`id_order_history` = 1169 AND os.`send_email` = 1 OrderHistoryCore->addWithemail - [line 668 - classes/PaymentModule.php] - [2 Arguments]663. 664. // Set the order status665. $new_history = new OrderHistory();666. $new_history->id_order = (int)$order->id;667. $new_history->changeIdOrderState((int)$id_order_state, $order, true);668. $new_history->addWithemail(true, $extra_vars);669. 670. // Switch to back order if needed671. if (Configuration::get('PS_STOCK_MANAGEMENT') && $order_detail->getStockState())672. {673. $history = new OrderHistory(); Argument [0]1Argument [1]Array( [{bankwire_owner}] => j'ai enlevé ces informations volontairement [{bankwire_details}] => j'ai enlevé ces informations volontairement [{bankwire_address}] => j'ai enlevé ces informations volontairement) PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments]59. '{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),60. '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),61. '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))62. );63. 64. $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);65. Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key);66. }67. } Argument [0]22Argument [1]10Argument [2]426Argument [3]Virement bancaireArgument [4]Argument [5]Array( [{bankwire_owner}] => j'ai enlevé ces informations volontairement [{bankwire_details}] => j'ai enlevé ces informations volontairement [{bankwire_address}] => j'ai enlevé ces informations volontairement)Argument [6]1Argument [7]Argument [8]4268b9242a198e19475305009f324777 BankwireValidationModuleFrontController->postProcess - [line 171 - classes/controller/Controller.php]166. // setMedia MUST be called before postProcess167. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))168. $this->setMedia();169. 170. // postProcess handles ajaxProcess171. $this->postProcess();172. 173. if (!empty($this->redirect_after))174. $this->redirect();175. 176. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) ControllerCore->run - [line 373 - classes/Dispatcher.php]368. // Execute hook dispatcher369. if (isset($params_hook_action_dispatcher))370. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);371. 372. // Running controller373. $controller->run();374. }375. catch (PrestaShopException $e)376. {377. $e->displayMessage();378. } DispatcherCore->dispatch - [line 28 - index.php] J'ai réinitialisé le module, essayé une version moins récente mais c'est pareil. Apparement il manque une colonne os.pdf_invoice dans la base...mais ou ???? est ce que quelq'un a une idée svp ? Merci d'avance Edited July 15, 2015 by albatore (see edit history) Link to comment Share on other sites More sharing options...
cachema Posted July 10, 2015 Share Posted July 10, 2015 je dirais dans la table ps_order_state Link to comment Share on other sites More sharing options...
albatore Posted July 10, 2015 Author Share Posted July 10, 2015 Merci pour ta réponse Cachema mais apparement cette colonne n'est pas présente dans ps_order_state ni sur les versions précédentes et cela fonctionnait quand même... Link to comment Share on other sites More sharing options...
cachema Posted July 10, 2015 Share Posted July 10, 2015 (edited) Bonjour, Sur ma table ps_order_state, version 1.6.0.14, j'ai ces deux champs qui sont présents : "pdf_invoice" et "pdf_delivery" et ils sont tous à 0. Il faudrait tester, en rajoutant ce champs, par une requête mysql. (Après avoir fait les sauvegardes d'usage....) : ALTER TABLE `ps_order_state` ADD `pdf_invoice` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `paid`; et s'il vous manque aussi la colonne `pdf_delivery`, faire : ALTER TABLE `ps_order_state` ADD `pdf_delivery` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `pdf_invoice`; Edited July 10, 2015 by cachema (see edit history) Link to comment Share on other sites More sharing options...
albatore Posted July 15, 2015 Author Share Posted July 15, 2015 IMPECCABLE Cachema !!!! Il me manquait effectivement ces 2 champs !! Impeccable, tout fonctionne maintenant ! j'ai lancé la création des 2 champs manquants et c'est tout bon, le virement passe bien maintenant Un énorme Merci pour ton aide ! 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