Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error al buscar por marca y precio a la vez
 
makiaji
Jr. Member
 
Total Posts:  4
Joined:  2010-03-10
 

Buenas!

Estoy comprobando que mi tienda no me permite hacer una búsqueda avanzada filtrando por marca y precio a la vez. Sí funciona si busco por categoría y precio, por ejemplo, pero no por marca y precio.

El report que me saca es el siguiente:

a:5:{i:0;s:282:"SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>= '3') AND (price_index.min_price -(price_index.min_price/(1+(CASE price_index.' at line 4";i:1;s:5117:"#0 /var/www/vhosts/miwebsite/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/miwebsite/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /var/www/vhosts/miwebsite/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT DISTINCT...', Array)
#3 /var/www/vhosts/miwebsite/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('SELECT DISTINCT...', Array)
#4 /var/www/vhosts/miwebsite/lib/Zend/Db/Adapter/Abstract.php(825): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /var/www/vhosts/miwebsite/lib/Varien/Data/Collection/Db.php(217): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array)
#6 /var/www/vhosts/miwebsite/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php(90): Varien_Data_Collection_Db->getSize()
#7 /var/www/vhosts/miwebsite/app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml(31): Mage_CatalogSearch_Block_Advanced_Result->getResultCount()
#8 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Template.php(235): include('/var/www/vhosts...')
#9 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Template.php(266): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#10 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Template.php(280): Mage_Core_Block_Template->renderView()
#11 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Abstract.php(758): Mage_Core_Block_Template->_toHtml()
#12 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#13 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Abstract.php(758): Mage_Core_Block_Text_List->_toHtml()
#14 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Abstract.php(525): Mage_Core_Block_Abstract->toHtml()
#15 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Abstract.php(476): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#16 /var/www/vhosts/miwebsite/app/design/frontend/em0018/default/template/page/2columns-left.phtml(50): Mage_Core_Block_Abstract->getChildHtml('content')
#17 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Template.php(235): include('/var/www/vhosts...')
#18 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Template.php(266): Mage_Core_Block_Template->fetchView('frontend/em0018...')
#19 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Template.php(280): Mage_Core_Block_Template->renderView()
#20 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Block/Abstract.php(758): Mage_Core_Block_Template->_toHtml()
#21 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#22 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#23 /var/www/vhosts/miwebsite/app/code/core/Mage/CatalogSearch/controllers/AdvancedController.php(54): Mage_Core_Controller_Varien_Action->renderLayout()
#24 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_CatalogSearch_AdvancedController->resultAction()
#25 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch('result')
#26 /var/www/vhosts/miwebsite/app/code/community/ArtsOnIT/OfflineMaintenance/Controller/Router/Standard.php(46): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#27 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Controller/Varien/Front.php(176): ArtsOnIT_OfflineMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#28 /var/www/vhosts/miwebsite/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Controller_Varien_Front->dispatch()
#29 /var/www/vhosts/miwebsite/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#30 /var/www/vhosts/miwebsite/index.php(80): Mage::run('', 'store')
#31 {main}"
;s:3:"url";s:67:"/catalogsearch/advanced/result/?manufacturer[0]=14&price;=3,10";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

Entiendo que es algo de sintaxis pero no se exactamente qué y dónde tengo tengo que modificar para corregir el error.

Agradecería si me pudierais arrojar un poco de luz al tema.

Saludos

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top