Fatal error: Uncaught exception 'Exception' with message 'Error: Unknown column 'instock' in 'order clause'
Error No: 1054
SELECT DISTINCT ps.product_id, (SELECT AVG(rating) FROM balt_review r1 WHERE r1.product_id = ps.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM balt_product_special ps LEFT JOIN balt_product p ON (ps.product_id = p.product_id) LEFT JOIN balt_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN balt_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.quantity != 0 AND p.date_available <= NOW() AND p2s.store_id = '0' AND ps.customer_group_id = '3' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) GROUP BY ps.product_id ORDER BY instock DESC, p.sort_order ASC, LCASE(pd.name) ASC LIMIT 0,25' in /home/b/baltco/newbaltco/public_html/system/library/db/mysqli.php:40 Stack trace: #0 /home/b/baltco/newbaltco/public_html/system/library/vendor/isenselabs/nitropack/core/nitro_db.php(82): DB\MySQLi->query('SELECT DISTINCT...', Array) #1 /home/b/baltco/newbaltco/storage/modification/system/library/db.php(53): NitroDb->query('SELECT DISTINCT...') #2 /home/b/baltco/newbaltco/storage/modification/catalog/model/catalog/product.php(381): DB->query('SELECT DISTINCT...') #3 [internal function]: ModelCatalogProduct->getProductSpecials(Array) #4 /home/b/baltco/newbaltco/storage/modification/system/engine/loader.php(280): call_user_func_array(Array, Array) #5 [internal function]: Loader->{closure}(Array, Array) #6 /home/b/baltco/newbaltco/public_html/system/engine/proxy.php(47): call_user_func_array(Object(Closure), Array) #7 /home/b/baltco/newbaltco/storage/modification/catalog/controller/product/special.php(83): Proxy->__call('getProductSpeci...', Array) #8 /home/b/baltco/newbaltco/storage/modification/catalog/controller/product/special.php(83): Proxy->getProductSpecials(Array) #9 [internal function]: ControllerProductSpecial->index() #10 /home/b/baltco/newbaltco/storage/modification/system/engine/action.php(79): call_user_func_array(Array, Array) #11 /home/b/baltco/newbaltco/public_html/system/engine/router.php(67): Action->execute(Object(Registry)) #12 /home/b/baltco/newbaltco/public_html/system/engine/router.php(56): Router->execute(Object(Action)) #13 /home/b/baltco/newbaltco/public_html/system/framework.php(168): Router->dispatch(Object(Action), Object(Action)) #14 /home/b/baltco/newbaltco/public_html/system/startup.php(104): require_once('/home/b/baltco/...') #15 /home/b/baltco/newbaltco/public_html/index.php(20): start('catalog') #16 {main} thrown in /home/b/baltco/newbaltco/public_html/system/library/db/mysqli.php on line 40