4
votes

In my productlist, when I filter on price, I get this error. Does anybody 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->_execute(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), Array) 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.nl/httpdocs/app/code/core/Mage/Core/Model/App.php(1311): Mage_Core_Model_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_Model_App->dispatchEvent('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/httpdocs/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/vhosts...') 22 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/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/httpdocs/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/vhosts...') 31 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/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/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->dispatch('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->dispatch() 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')

2

2 Answers

1
votes

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

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

0
votes

On line 114 in:

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

Change:

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

To:

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

This fixed my problem using Manadev Layered Navigation (Mage 1.9.1)