Durand Posted May 31, 2018 Share Posted May 31, 2018 Bonjour, Mon site a un problème quand on passe une commande après la selection de paiement par LCR ou comptant à la livraison on obtient une page comme ceci : C'est un problème assez urgent .. Merci Comment régler les problèmes au sein du fichier DB.php ? Je fonctionne sous prestashop 1.6.0.9 Merci beaucoup [PrestaShopDatabaseException] Unknown column 'id_shop' in 'field list' SELECT id_customer, customer_email, id_shop, id_lang FROM `pss_mailalert_customer_oos` WHERE `id_product` = 3796 AND `id_product_attribute` = 0 at line 539 in file classes/db/Db.php 533. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 534. } 535. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) 536. { 537. if ($sql) 538. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 539. throw new PrestaShopDatabaseException($this->getMsgError()); 540. } 541. } 542. /** 543. * Sanitize data which will be injected into SQL query DbCore->displayError - [line 270 - classes/db/Db.php] - [1 Arguments] 264. { 265. if ($sql instanceof DbQuery) 266. $sql = $sql->build(); 267. $this->result = $this->_query($sql); 268. if (_PS_DEBUG_SQL_) 269. $this->displayError($sql); 270. return $this->result; 271. } 272. /** 273. * Execute an INSERT query 274. * DbCore->query - [line 426 - classes/db/Db.php] - [1 Arguments] 420. if ($use_cache && $this->is_cache_enabled && $array && ($result = Cache::getInstance()->get(md5($sql)))) 421. { 422. $this->last_cached = true; 423. return $result; 424. } 425. $this->result = $this->query($sql); 426. if (!$this->result) 427. return false; 428. $this->last_cached = false; 429. if (!$array) 430. return $this->result; DbCore->executeS - [line 288 - modules/mailalerts/MailAlert.php] - [1 Arguments] 282. $sql = ' 283. SELECT id_customer, customer_email, id_shop, id_lang 284. FROM `'._DB_PREFIX_.self::$definition['table'].'` 285. WHERE `id_product` = '.(int)$id_product.' AND `id_product_attribute` = '.(int)$id_product_attribute; 286. 287. return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); 288. } 289. } MailAlert::getCustomers - [line 171 - modules/mailalerts/MailAlert.php] - [2 Arguments] 165. 166. public static function sendCustomerAlert($id_product, $id_product_attribute) 167. { 168. $link = new Link(); 169. $context = Context::getContext()->cloneContext(); 170. $customers = self::getCustomers($id_product, $id_product_attribute); 171. 172. foreach ($customers as $customer) 173. { 174. $id_shop = (int)$customer['id_shop']; 175. $id_lang = (int)$customer['id_lang']; MailAlert::sendCustomerAlert - [line 554 - modules/mailalerts/mailalerts.php] - [2 Arguments] 548. } 549. } 550. } 551. 552. if ($this->customer_qty && $quantity > 0) 553. MailAlert::sendCustomerAlert((int)$product->id, (int)$params['id_product_attribute']); 554. } 555. 556. public function hookActionProductAttributeUpdate($params) 557. { 558. $sql = ' MailAlerts->hookActionUpdateQuantity - [line 507 - classes/Hook.php] - [1 Arguments] 501. if ($use_push && isset($moduleInstance->push_filename) && file_exists($moduleInstance->push_filename)) 502. Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit); 503. 504. // Call hook method 505. if ($hook_callable) 506. $display = $moduleInstance->{'hook'.$hook_name}($hook_args); 507. elseif ($hook_retro_callable) 508. $display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args); 509. // Live edit 510. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee'))) 511. { HookCore::exec - [line 473 - classes/stock/StockAvailable.php] - [2 Arguments] 467. array( 468. 'id_product' => $id_product, 469. 'id_product_attribute' => $id_product_attribute, 470. 'quantity' => $stock_available->quantity 471. ) 472. ); 473. 474. Cache::clean('StockAvailable::getQuantityAvailableByProduct_'.(int)$id_product.'*'); 475. 476. return true; 477. } StockAvailableCore::updateQuantity - [line 418 - classes/order/OrderDetail.php] - [3 Arguments] 412. { 413. if ($id_order_state != Configuration::get('PS_OS_CANCELED') && $id_order_state != Configuration::get('PS_OS_ERROR')) 414. { 415. $update_quantity = true; 416. if (!StockAvailable::dependsOnStock($product['id_product'])) 417. $update_quantity = StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity']); 418. 419. if ($update_quantity) 420. $product['stock_quantity'] -= $product['cart_quantity']; 421. 422. if ($product['stock_quantity'] < 0 && Configuration::get('PS_STOCK_MANAGEMENT')) OrderDetailCore->checkProductStock - [line 575 - classes/order/OrderDetail.php] - [2 Arguments] 569. $productQuantity = (int)(Product::getQuantity($this->product_id, $this->product_attribute_id)); 570. $this->product_quantity_in_stock = ($productQuantity - (int)($product['cart_quantity']) < 0) ? 571. $productQuantity : (int)($product['cart_quantity']); 572. 573. $this->setVirtualProductInformation($product); 574. $this->checkProductStock($product, $id_order_state); 575. 576. if ($use_taxes) 577. $this->setProductTax($order, $product); 578. $this->setShippingCost($order, $product); 579. $this->setDetailProductPrice($order, $cart, $product); OrderDetailCore->create - [line 613 - classes/order/OrderDetail.php] - [7 Arguments] 607. 608. $this->id_order = $order->id; 609. $this->outOfStock = false; 610. 611. foreach ($product_list as $product) 612. $this->create($order, $cart, $product, $id_order_state, $id_order_invoice, $use_taxes, $id_warehouse); 613. 614. unset($this->vat_address); 615. unset($products); 616. unset($this->customer); 617. } OrderDetailCore->createList - [line 352 - classes/PaymentModule.php] - [7 Arguments] 346. if (self::DEBUG_MODE) 347. PrestaShopLogger::addLog('PaymentModule::validateOrder - OrderDetail is about to be added', 1, null, 'Cart', (int)$id_cart, true); 348. 349. // Insert new Order detail list using cart for the current order 350. $order_detail = new OrderDetail(null, null, $this->context); 351. $order_detail->createList($order, $this->context->cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']); 352. $order_detail_list[] = $order_detail; 353. 354. if (self::DEBUG_MODE) 355. PrestaShopLogger::addLog('PaymentModule::validateOrder - OrderCarrier is about to be added', 1, null, 'Cart', (int)$id_cart, true); 356. PaymentModuleCore->validateOrder - [line 59 - modules/cashondelivery/controllers/front/validation.php] - [9 Arguments] 53. 54. if (Tools::getValue('confirm')) 55. { 56. $customer = new Customer((int)$this->context->cart->id_customer); 57. $total = $this->context->cart->getOrderTotal(true, Cart::BOTH); 58. $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); 59. Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->module->id.'&id_order='.(int)$this->module->currentOrder); 60. } 61. } 62. 63. /** CashondeliveryValidationModuleFrontController->postProcess - [line 171 - classes/controller/Controller.php] 165. // setMedia MUST be called before postProcess 166. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) 167. $this->setMedia(); 168. 169. // postProcess handles ajaxProcess 170. $this->postProcess(); 171. 172. if (!empty($this->redirect_after)) 173. $this->redirect(); 174. 175. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) ControllerCore->run - [line 373 - classes/Dispatcher.php] 367. // Execute hook dispatcher 368. if (isset($params_hook_action_dispatcher)) 369. Hook::exec('actionDispatcher', $params_hook_action_dispatcher); 370. 371. // Running controller 372. $controller->run(); 373. } 374. catch (PrestaShopException $e) 375. { 376. $e->displayMessage(); 377. } DispatcherCore->dispatch - [line 28 - index.php] 22. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 23. * International Registered Trademark & Property of PrestaShop SA 24. */ 25. 26. require(dirname(__FILE__).'/config/config.inc.php'); 27. Dispatcher::getInstance()->dispatch(); Link to comment Share on other sites More sharing options...
Eolia Posted May 31, 2018 Share Posted May 31, 2018 Peut-être mettre votre module mailalerts à jour ??? Il lui manque une colonne dans sa table. La structure doit être celle-ci: Link to comment Share on other sites More sharing options...
Durand Posted May 31, 2018 Author Share Posted May 31, 2018 47 minutes ago, Eolia said: Peut-être mettre votre module mailalerts à jour ??? Il lui manque une colonne dans sa table. La structure doit être celle-ci: Bonjour, je l'ai déjà mis à jour hier donc je ne sais pas ... Par ailleurs je ne comprends pas comment lire ce panneau ... D'où provient le problème d’affichage de ma page ? Link to comment Share on other sites More sharing options...
Eolia Posted May 31, 2018 Share Posted May 31, 2018 Allez faire un tour dans votre base de données et regardez la structure de votre table pss_mailalert_customer_oos vous comprendrez la différence^^ Link to comment Share on other sites More sharing options...
doekia Posted May 31, 2018 Share Posted May 31, 2018 Désinstaller le module et le reinstaller peux résoudre le problème (cela recréera le table) Link to comment Share on other sites More sharing options...
Eolia Posted May 31, 2018 Share Posted May 31, 2018 Euh.... oui mais il va perdre toutes ses alertes en cours^^ Link to comment Share on other sites More sharing options...
Durand Posted May 31, 2018 Author Share Posted May 31, 2018 3 hours ago, Eolia said: Euh.... oui mais il va perdre toutes ses alertes en cours^^ re-bonjour, Merci je vais essayer de désinstaller le module, mais qu'est ce que je perds si je le désinstalle exactement ? Les messages des clients envoyés lors des commandes ? Merci Link to comment Share on other sites More sharing options...
Eolia Posted May 31, 2018 Share Posted May 31, 2018 Non, toutes les adresses mails des clients qui attendent la remise en stock des produits pour lesquels ils ont posé une alerte Link to comment Share on other sites More sharing options...
doekia Posted May 31, 2018 Share Posted May 31, 2018 @Eolia Dans la mesure où son module ne fonctionne sûrement pas depuis bien longtemps ... @Durand Tu vas perdre les clients inscrit à la notification sur produit hors stock, c'est tout et probablement que tu n'as personne d'inscrit car le module était en panne Link to comment Share on other sites More sharing options...
Durand Posted May 31, 2018 Author Share Posted May 31, 2018 @doekia Je crois que ce module n'a jamais fonctionné car mes clients ne recevaient aucun emails, notemment en faisant mot de passe oublié @eolia Ces adresses emails ne posent pas de problème je tente donc une désinstallation et réinstallation Merci Link to comment Share on other sites More sharing options...
Durand Posted May 31, 2018 Author Share Posted May 31, 2018 Super merci beaucoup, le problème est réglé. Link to comment Share on other sites More sharing options...
doekia Posted May 31, 2018 Share Posted May 31, 2018 Ce module n'a rien à voir avec la fonction du coeur mot de passe oublié Link to comment Share on other sites More sharing options...
Durand Posted June 1, 2018 Author Share Posted June 1, 2018 @doekia Pardonnez moi je ne savais pas, mais sauriez vous m'aider à régler le problème qui fait que mes clients ne reçoivent aucun mail lors de l'utilisation du système mot de passe oublié? 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