Magento 1.7 filter error (column not found: 1054 Unknown column "e.min_price" in the "where" section)

In my product list, when I filter by price, I get this error. Does anyone know how to fix this?

SQLSTATE [42S22]: Column not found: 1054 Unknown column 'e.min_price' in 'where clause'

Trace: 0 / var / www / vhosts / domain.nl / httpdocs / lib / Varien / Db / Statement / Pdo / Mysql.php (110): Zend_Db_Statement_Pdo → _ execution (Array) 1 / var / www / vhosts / domain. nl / httpdocs / lib / Zend / Db / Statement.php (300): Varien_Db_Statement_Pdo_Mysql → _ execute (array) 2 / var / www / vhosts / domain.nl / httpdocs / lib / Zend / Db / Adapter / Abstract.php ( 479): Zend_Db_Statement-> execute (Array) 3 / var / www / vhosts / domain.nl / httpdocs / lib / Zend / Db / Adapter / Pdo / Abstract.php (238): Zend_Db_Adapter_Abstract-> query ('SELECT COUNT ( DI ... ', Array) 4 / var / www / vhosts / domain.nl / httpdocs / lib / Varien / Db / Adapter / Pdo / Mysql.php (419): Zend_Db_Adapter_Pdo_Abstract-> query (' SELECT COUNT (DI. .. ', Array) 5 / var / www / vhosts / domain.nl / httpdocs / lib / Zend / Db / Adapter / Abstract.php (825): Varien_Db_Adapter_Pdo_Mysql-> query (Object (Varien_Db_Select), array) 6 / var /www/vhosts/domain.nl/httpdocs/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract-> fetchOne (Object (Varien_Db_Select), m css) 7 / var / www / vhosts / domain.nl / httpdocs / lib / Varien / Data / Collection.php (225): Varien_Data_Collection_Db-> GETSIZE () 8 / var / www / vhosts / domain.nl / httpdocs / lib /Varien/Data/Collection.php(211): Varien_Data_Collection-> getLastPageNumber () 9 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Eav / Model / Entity / Collection / Abstract. php (1036): Varien_Data_Collection-> getCurPage () 10 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Eav / Model / Entity / Collection / Abstract.php (871): Mage_Eav_Model_Entity_Collection_Abstract → _ loadEntities (false, false) 11 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Review / Model / Observer.php (78): Mage_Eav_Model_Entity_Collection_Abstract-> load () 12 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Model / App.php (1338): Mage_Review_Model_Observer-> catalogBlockProductCollectionBeforeToHtml (Object (Varien_Event_Observer)) 13 / var / www / vhosts / domain.n /httpdocs/app/code/core/Mage/Core/Model/App.php(1311): Mage_Core_M odel_App → _ callObserverMethod (Object (Mage_Review_Model_Observer), 'catalogBlockPro ...', Object (Varien_Event_Observer)) 14 / var / www / vhosts / domain.nl / httpdocs / app / Mage.php (447): Mage_Core_Modelatch 'catalog_block_p ...', Array) 15 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Catalog / Block / Product / List.php (163): Mage :: dispatchEvent (' catalog_block_p ... ', array) 16 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Abstract.php (862): Mage_Catalog_Block_Product_List → _ beforeToHtml () 17 / var /www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract-> toHtml () 18 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Abstract.php (526): Mage_Core_Block_Abstract → _ getChildHtml ('product_list', true) 19 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Catalog / Block / Category / View.php (85): Mage_Core_Block_Abstract-> getChildHtml ('product_list') 20 / var / www / vhosts / domain.nl / httpd ocs / app / design / frontend / domain / default / template / catalog / category / view.phtml (67): Mage_Catalog_Block_Category_View-> getProductListHtml () 21 / var / www / vhosts / domain.nl / httpdocs / app / code / core /Mage/Core/Block/Template.php(241): include ('/ var / www / virtual domains ...) 22 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Template.php (272): Mage_Core_Block_Template-> fetchView ('interface / Johans ...') 23 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core /Block/Template.php(286): Mage_Core_Block_Template-> RenderView () 24 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Abstract.php (863): Mage_Core_Block_Template → _ toHtml () 25 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Text / List.php (43): Mage_Core_Block_Abstract-> toHtml () 26 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Abstract.php (863): Mage_Core_Block_Text_List → _ toHtml () 27 / var / www / vhosts / domain.nl / h ttpdocs / app / code / core / Mage / Core / Block / Abstract.php (582): Mage_Core_Block_Abstract-> toHtml () 28 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core /Block/Abstract.php(526): Mage_Core_Block_Abstract → _ getChildHtml ('content', true) 29 / var / www / vhosts / domain.nl / httpdocs / app / design / frontend / domain / default / template / page / 2columns -right.phtml (50): Mage_Core_Block_Abstract-> getChildHtml ('content') 30 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Template.php (241): include ('/ var / www / virtual domains ...) 31 / var / www / vhosts / domain.nl / httpdocs / application / code / kernel /mag/kernel/block/template.php ( 272): Mage_Core_Block_Template-> fetchView ('interface / Johans ...') 32 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Template.php (286): Mage_Core_Block_Template-> RenderView () 33 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Block / Abstract .php (863): Mage_Core_Block_Template → _ toHtml () 34 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Model / Layout.php (555): Mage_Core_Block_Abstract-> toHtml ( ) 35 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Controller / Varien / Action.php (390): Mage_Core_Model_Layout-> getOutput () 36 / var / www / vhosts / domain.nl/httpdocs/app/code/core/Mage/Catalog/controllers/CategoryController.php(159): Mage_Core_Controller_Varien_Action-> renderLayout () 37 / var / www / vhosts / domain.nl / httpdocs / app / code / core / core /Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_CategoryController-> viewAction () 38 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Controller / Varien / Router / Standard.php (250): Mage_Core_Controller_Varien_Action-> send ('view') 39 / var / www / vhosts / domain.nl / httpdocs / app / code / core / Mage / Core / Controller / Varien / Front.php ( 176): Mage_Core_Controller_Varien_Router_Standard-> match (Object (Mage_Core_Controller_Request_Http)) 40 / var / www / vhosts / domain .nl / httpdocs / app / code / core / Mage / Core / Model / App.php (354): Mage_Core_Controller_Varien_Front-> submit () 41 / var / www / vhosts / domain.nl / httpdocs / app / Mage.php ( 683): ​​Mage_Core_Model_App-> run (Array) 42 / var / www / vhosts / domain.nl / httpdocs / index.php (92): Mage :: run ('', 'store')

+4
source share
2 answers

Found a solution: it was a compatible problem. I changed the price filter in Magento 1.6 (app / code / local / Mage / Catalog / Model / Layer / Filter / price.php)

In 1.7 this file changed, so I had to change it also in the app / code / local directory.

+1
source

At line 114 in:

Application / code / local / Mana / Filters / Resource / Filter / Price.php

Edit:

$select->group($rangeExpr)->order("$rangeExpr ASC"); 

To:

 $select->group($rangeExpr)->order($rangeExpr, "ASC"); 

This fixed my issue with Manadev Layered Navigation (Mage 1.9.1)

0
source

All Articles