Jump to content

Mail alerts v3.4.4 - by PrestaShop


gavz

Recommended Posts

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` = 1
at 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.     /**
Link to comment
Share on other sites

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

  • 3 weeks later...

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 by starxox (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...