gavz Posted December 8, 2014 Share Posted December 8, 2014 Mail alerts v3.4.4 - by PrestaShop is causing the performance of my website to deteriorate, slow load time etc. This is the error: [PrestaShopDatabaseException] Unknown column 'id_shop' in 'where clause' SELECT * FROM `ps_mailalert_customer_oos` WHERE (id_customer=20 OR customer_email='[email protected]') AND `id_product` = 557 AND `id_product_attribute` = 0 AND `id_shop` = 1at line 635 in file classes/db/Db.php 629. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);630. }631. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))632. {633. if ($sql)634. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');635. throw new PrestaShopDatabaseException($this->getMsgError());636. }637. }638.639. /**DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 501 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 80 - modules/mailalerts/MailAlert.php] - [1 Arguments] MailAlert::customerHasNotification - [line 426 - modules/mailalerts/mailalerts.php] - [4 Arguments] MailAlerts->hookActionProductOutOfStock - [line 507 - classes/Hook.php] - [1 Arguments] HookCore::exec - [line 262 - controllers/front/ProductController.php] - [2 Arguments] ProductControllerCore->initContent - [line 180 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Link to comment Share on other sites More sharing options...
bellini13 Posted December 8, 2014 Share Posted December 8, 2014 what version of Prestashop are you using? Link to comment Share on other sites More sharing options...
tuk66 Posted December 8, 2014 Share Posted December 8, 2014 You should use the Mail alerts module distributed with your PrestaShop version. Link to comment Share on other sites More sharing options...
gavz Posted December 8, 2014 Author Share Posted December 8, 2014 I'm using PS 1.6.0.6 The previous version of Mail Alerts was causing the fault also. Upgrading to the latest version did not solve the problem. Link to comment Share on other sites More sharing options...
tuk66 Posted December 8, 2014 Share Posted December 8, 2014 Your ps_mailalert_customer_oos table has id_shop field missing. The correct schema is: CREATE TABLE IF NOT EXISTS `ps_mailalert_customer_oos` ( `id_customer` int(10) unsigned NOT NULL, `customer_email` varchar(128) NOT NULL, `id_product` int(10) unsigned NOT NULL, `id_product_attribute` int(10) unsigned NOT NULL, `id_shop` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, PRIMARY KEY (`id_customer`,`customer_email`,`id_product`,`id_product_attribute`,`id_shop`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Link to comment Share on other sites More sharing options...
starxox Posted December 23, 2014 Share Posted December 23, 2014 (edited) I started getting this error a while after upgrading to 1.6.0.9 I solved it by disabling it, uninstalling it, reinstalling, reset and then configure. No errors anymore! I've found that a lot of modules need resetting. I upgraded from a 1.4 version Edited December 23, 2014 by starxox (see edit history) Link to comment Share on other sites More sharing options...
starxox Posted December 27, 2014 Share Posted December 27, 2014 (edited) Ok I realised that there was still a problem with my mail alerts and it was caused by a bug when you edit mail translations in the back office. This then was causing problems with paypal. See here for a fix (not sure if this helps you but may help others) http://www.prestashop.com/forums/topic/343780-fatal-error-uncaught-exception-smartycompilerexception-with-message-syntax-error-in-template/ Edited December 27, 2014 by starxox (see edit history) 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