JohnSmithUK Posted June 3, 2019 Share Posted June 3, 2019 Getting this error "Only on Category pages" [PrestaShopDatabaseException] Unknown column 'psi.id_country' in 'on clause' SELECT p.id_product, p.price, psi.price_min, psi.price_max FROM (SELECT p.id_product, p.id_manufacturer, sa.quantity, p.condition, p.weight, p.price FROM ps_product p LEFT JOIN ps_stock_available sa ON (p.id_product=sa.id_product AND 0 = sa.id_product_attribute AND sa.id_shop = 1 AND sa.id_shop_group = 0 ) INNER JOIN ps_category_product cp ON (p.id_product = cp.id_product) INNER JOIN ps_category c ON (cp.id_category = c.id_category AND c.active=1) INNER JOIN ps_product_shop ps ON (p.id_product = ps.id_product AND ps.id_shop = 1) WHERE p.visibility IN ('both', 'catalog') AND c.nleft>=3 AND c.nright<=50 AND ps.id_shop='1' AND p.active = TRUE GROUP BY p.id_product) p INNER JOIN ps_layered_price_index psi ON (psi.id_product = p.id_product AND psi.id_currency = 1 AND psi.id_country = 21) GROUP BY p.id_product ORDER BY psi.price_min ASC LIMIT 0, 39 at line 769 in file classes/db/Db.php 764. if ($webservice_call && $errno) { 765. $dbg = debug_backtrace(); 766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97); 767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 768. if ($sql) { 769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>'); 770. } 771. 772. throw new PrestaShopDatabaseException($this->getMsgError()); 773. } 774. } Link to comment Share on other sites More sharing options...
NemoPS Posted June 6, 2019 Share Posted June 6, 2019 There is no such a column in the layered price table, can you try to disable overrides and see if it still happens? If it still does there might be a bug in the layered navigation module Link to comment Share on other sites More sharing options...
Christophe Rouillé Posted June 7, 2019 Share Posted June 7, 2019 Answered here -> 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