juanmlg Posted December 17, 2015 Share Posted December 17, 2015 (edited) When I try to sort my products list by price in the back office, I see a Blank products list, so if I turn ON errors , and I see this error, I am using PrestaShop 1.5.3.1 [PrestaShopDatabaseException]Column 'price' in order clause is ambiguous SELECT SQL_CALC_FOUND_ROWS a.`id_product`,b.name as name,`reference`,a.price as price,sa.active as active , shop.name as shopname, cl.name `name_category` , image_shop.`id_image`, sa.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, sa.`active` FROM `ps_product` a LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product` AND b.`id_lang` = 4 AND b.`id_shop` = 1) LEFT JOIN `ps_image` i ON (i.`id_product` = a.`id_product` ) JOIN `ps_product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = 1) LEFT JOIN `ps_category_lang` cl ON (sa.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = 1) LEFT JOIN `ps_shop` shop ON (shop.id_shop = 1) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop=1) LEFT JOIN `ps_stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0 AND sav.id_shop_group = 1 AND sav.id_shop = 0 ) WHERE 1 AND (i.id_image IS NULL OR image_shop.id_shop=1) ORDER BY price asc LIMIT 0,50at line 605 in file classes/db/Db.php 599. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);600. }601. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))602. {603. if ($sql)604. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');605. throw new PrestaShopDatabaseException($this->getMsgError());606. }607. }608.609. /** DbCore->displayError - [line 307 - classes/db/Db.php] - [1 Arguments]DbCore->query - [line 482 - classes/db/Db.php] - [1 Arguments]DbCore->executeS - [line 2110 - classes/controller/AdminController.php] - [1 Arguments]AdminControllerCore->getList - [line 311 - controllers/admin/AdminProductsController.php] - [6 Arguments]AdminProductsControllerCore->getList - [line 1461 - classes/controller/AdminController.php] - [1 Arguments]AdminControllerCore->renderList - [line 2149 - controllers/admin/AdminProductsController.php] - [0 Argument]AdminProductsControllerCore->renderList - [line 1414 - classes/controller/AdminController.php] - [0 Argument]AdminControllerCore->initContent - [line 2141 - controllers/admin/AdminProductsController.php] - [0 Argument]AdminProductsControllerCore->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument]ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument]DispatcherCore->dispatch - [line 50 - admin/index.php] - [0 Argument] So please, can you help me to fix it? Thanks Edited December 17, 2015 by juanmlg (see edit history) Link to comment Share on other sites More sharing options...
juanmlg Posted December 20, 2015 Author Share Posted December 20, 2015 Please Link to comment Share on other sites More sharing options...
juanmlg Posted January 6, 2016 Author Share Posted January 6, 2016 Any ideas? 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