Notice: Undefined index: product_id in /customers/3/3/9/casamarrakech.se/httpd.www/system/pavothemes/widget/product_deal.php on line 176 Fatal error: Uncaught exception 'Exception' with message 'Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND o.order_status_id=5' at line 2
Error No: 1064
SELECT sum(quantity) as total FROM `oc_order_product` op LEFT JOIN `oc_order` AS o ON op.order_id = o.order_id WHERE op.product_id = AND o.order_status_id=5' in /customers/3/3/9/casamarrakech.se/httpd.www/system/library/db/mysqli.php:40 Stack trace: #0 /customers/3/3/9/casamarrakech.se/httpd.www/system/library/db.php(16): DB\MySQLi->query('SELECT sum(quan...', Array) #1 /customers/3/3/9/casamarrakech.se/httpd.www/catalog/model/pavdeals/product.php(126): DB->query('SELECT sum(quan...') #2 [internal function]: ModelPavdealsproduct->getTotalBought(NULL, 5) #3 /customers/3/3/9/casamarrakech.se/httpd.www/system/engine/loader.php(150): call_user_func_array(Array, Array) #4 [internal function]: Loader->{closure}(Array) #5 /customers/3/3/9/casamarrakech.se/httpd.www/s in /customers/3/3/9/casamarrakech.se/httpd.www/system/library/db/mysqli.php on line 40