Fatal error: Uncaught Exception: Error: Unknown column 'score' in 'order clause'<br />Error No: 1054<br />SELECT p.product_id, (p.viewed)p_viewed, (p.sort_order)p_sort_order,pd.name as pd_name, (p.model) p_model, (p.qty) p_qty, (p.date_added) p_date_added, coalesce(p.data_replicacao_ecommerce, p.date_added, NULL) p_data_replicacao_ecommerce, SP_GET_PRODUTO_VALORFINAL(p.product_id, 1) as valor_product, (SELECT AVG(rating) AS total FROM oc_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM oc_product p INNER JOIN oc_category nsub ON (p.category_id = nsub.category_id) LEFT JOIN oc_category ncat ON (nsub.parent_id = ncat.category_id) LEFT JOIN oc_category ndep ON (ncat.parent_id = ndep.category_id) LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (nsub.category_id = '61' OR ncat.category_id = '61' OR ndep.category_id = '61') AND p.product_id not in(7163) AND p.qty > 0 and p.tipo not in (14,16) union select p.product_id, (p.viewed)p_viewed, (p.sort_order)p_sort_order,pd.name as pd_name,(p.model) p_model, (p.qty) p_qty, (p.date_added) p_date_added, coalesce(p.data_replicacao_ecommerce, p.date_added, NULL) p_data_replicacao_ecommerce, SP_GET_PRODUTO_VALORFINAL(p.product_id, 1) as valor_product, (SELECT AVG(rating) AS total FROM oc_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating from oc_product_grid pg inner join oc_product_grid_detail pgd on (pgd.product_grid_id = pg.product_grid_id) inner join oc_product p on (p.product_id = pgd.product_id) inner join oc_product_description pd on (pd.product_id = pgd.product_id) left join oc_product_to_store p2s ON (p.product_id = p2s.product_id) INNER JOIN oc_category nsub ON (p.category_id = nsub.category_id) LEFT JOIN oc_category ncat ON (nsub.parent_id = ncat.category_id) LEFT JOIN oc_category ndep ON (ncat.parent_id = ndep.category_id) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (nsub.category_id = '61' OR ncat.category_id = '61' OR ndep.category_id = '61') AND p.product_id not in(7163) AND p.qty > 0 and p.tipo in (14,16) and ( select p2.product_id from oc_product p2 inner join oc_product_grid_detail pgd2 on (p2.product_id = pgd2.product_id) INNER JOIN oc_product_grid pg2 ON (pg2.product_grid_id = pgd2.product_grid_id) inner join oc_product_description pd2 on (pd2.product_id = p2.product_id) LEFT JOIN oc_product_to_store p2s2 on (p2.product_id = p2s2.product_id) INNER JOIN oc_category nsub2 ON (p2.category_id = nsub2.category_id) LEFT JOIN oc_category ncat2 ON (nsub2.parent_id = ncat2.category_id) LEFT JOIN oc_category ndep2 ON (ncat2.parent_id = ndep2.category_id) where (pgd2.product_grid_id = pg.product_grid_id) and pd2.language_id = '1' AND p2.status = '1' AND p2.date_available <= NOW() and p2s2.store_id = '0' AND (nsub2.category_id = '61' OR ncat2.category_id = '61' OR ndep2.category_id = '61') AND p2.product_id not in(7163) AND p2.qty > 0 order by IF(p2.qty > 0 AND p2.product_grid_main='S', 0, 1) ASC, p2.qty desc limit 1 ) = p.product_id ORDER BY (CASE WHEN p_qty > 0 THEN 0 ELSE 1 END) ASC ,LCASE(score) DESC, LCASE(pd_name) DESC, p_model DESC LIMIT 0,6 in /montagem/sdb1/d12240etud/public_html/system/database/mysqliclass.php:46 Stack trace: #0 /montagem/sdb1/d12240etud/public_html/system/library/db.php(35): MySQLiClass->query('SELECT p.produc...') #1 /montagem/sdb1/d12240etud/public_html/catalog/model/catalog/product.php(776): DB->query('SELECT p.produc...') #2 /montagem/sdb1/d12240etud/public_html/catalog/controller/product/productList.php(741): ModelCatalogProduct->getProducts(Array) #3 /montagem/sdb1/d12240etud/public_html/catalog/controller/product/productList.php(686): ControllerProductProductList->getResults(Array, Array) #4 /montagem/sdb1/d12240etud/public_html/system/engine/controller.php(46): ControllerProductProductList->moduleProdutosrelacionados(Array) #5 /montagem/sdb1/d12240etud/public_html/system/engine/controller.php(118): Controller->getChildData('product/product...', Array) #6 /montagem/sdb1/d12240etud/public_html/catalog/controller/module/produtosrelacionados.php(51): Controller->render('module/produtos...') #7 /montagem/sdb1/d12240etud/public_html/system/engine/controller.php(66): ControllerModuleProdutosrelacionados->index(Array) #8 /montagem/sdb1/d12240etud/public_html/catalog/controller/common/column_left.php(100): Controller->getChild('module/produtos...', Array) #9 /montagem/sdb1/d12240etud/public_html/system/engine/controller.php(66): ControllerCommonColumnLeft->index(Array) #10 /montagem/sdb1/d12240etud/public_html/system/engine/controller.php(114): Controller->getChild('common/column_l...') #11 /montagem/sdb1/d12240etud/public_html/catalog/controller/product/product.php(229): Controller->render('product/product') #12 /montagem/sdb1/d12240etud/public_html/system/engine/front.php(42): ControllerProductProduct->index() #13 /montagem/sdb1/d12240etud/public_html/system/engine/front.php(29): Front->execute(Object(Action)) #14 /montagem/sdb1/d12240etud/public_html/index.php(424): Front->dispatch(Object(Action), Object(Action)) #15 {main} thrown in /montagem/sdb1/d12240etud/public_html/system/database/mysqliclass.php on line 46