AFemaleProdigy Posted November 17, 2015 Share Posted November 17, 2015 I just got this error during checkout on my website. I have not seen this before. Any ideas? Notice: Undefined offset: 19867 in /home/rotmgvaultgames/public_html/classes/stock/StockManager.php on line 836 [PrestaShopDatabaseException] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY s.`id_product` LIMIT 1' at line 5 SELECT SUM(s.`usable_quantity`) as quantity FROM ps_stock s LEFT JOIN ps_warehouse_carrier wc ON wc.`id_warehouse` = s.`id_warehouse` LEFT JOIN ps_carrier c ON wc.`id_carrier` = c.`id_reference` WHERE s.`id_product` = 397 AND s.`id_product_attribute` = 0 AND s.`id_warehouse` = 1 AND c.`id_carrier` IN () GROUP BY s.`id_product` LIMIT 1 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. } Link to comment Share on other sites More sharing options...
presta.show Posted November 17, 2015 Share Posted November 17, 2015 Why in IN condition you haven't got any value? Add some value to test example IN(1) and check if exists error or remove this contition SELECT SUM(s.`usable_quantity`) as quantity FROM ps_stock s LEFT JOIN ps_warehouse_carrier wc ON wc.`id_warehouse` = s.`id_warehouse` LEFT JOIN ps_carrier c ON wc.`id_carrier` = c.`id_reference` WHERE s.`id_product` = 397 AND s.`id_product_attribute` = 0 AND s.`id_warehouse` = 1 AND c.`id_carrier` IN (1) GROUP BY s.`id_product` LIMIT 1 Link to comment Share on other sites More sharing options...
desgnl Posted February 24, 2016 Share Posted February 24, 2016 I have this exact problem when : - one page checkout is activated - the user is a guest ($is_guest = 1) - then the user tries to log-in with an existing account I have no idea on how to solve this Link to comment Share on other sites More sharing options...
tuk66 Posted February 24, 2016 Share Posted February 24, 2016 Are you using the original one-page-checkout or a module? Link to comment Share on other sites More sharing options...
desgnl Posted February 29, 2016 Share Posted February 29, 2016 It was the original one page checkout module. But the problem is not here anymore for no reason. I guess it was linked to the advanced stock management… 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