在我的产品列表中,当我过滤价格时,我收到此错误。 有谁知道,如何解决这个问题?
SQLSTATE [42S22]:未找到列:1054未知列' e.min_price' 在' where子句'
跟踪: 0 /var/www/vhosts/domain.nl/httpdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo-> _execute(阵列) 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->执行(阵列) 3 /var/www/vhosts/domain.nl/httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->查询(' SELECT COUNT(DI ...',Array) 4 /var/www/vhosts/domain.nl/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->查询(' 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->负载() 12 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Model/App.php(1338): Mage_Review_Model_Observer-> catalogBlockProductCollectionBeforeToHtml(对象(Varien_Event_Observer)) 13 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Model/App.php(1311): Mage_Core_Model_App-> _callObserverMethod(对象(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->直到最底层('所属类别') 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): 包括(' /无功/网络/虚拟主机...') 22 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template-> fetchView('前端/约翰大道...') 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->直到最底层('内容') 30 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Block/Template.php(241): 包括(' /无功/网络/虚拟主机...') 31 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template-> fetchView('前端/约翰大道...') 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->调度('视图') 39 /var/www/vhosts/domain.nl/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->匹配(对象(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->调度() 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')
答案 0 :(得分:1)
找到解决方案:这是一个兼容的问题。 我更改了Magento 1.6中的价格过滤器 (app / code / local / Mage / Catalog / Model / Layer / Filter / price.php)
在1.7中,此文件已更改,因此我还必须在app / code / local目录中更改它。
答案 1 :(得分:0)
在第114行:
应用程序/代码/本地/马纳岛/滤波器/资源/过滤/ Price.php
变化:
$select->group($rangeExpr)->order("$rangeExpr ASC");
要:
$select->group($rangeExpr)->order($rangeExpr, "ASC");
这解决了我使用Manadev分层导航(Mage 1.9.1)
的问题