The Mini Search (and the default search - http://example.com/catalogsearch/result/?q=searchTerm) is not returning the correct result.
Surprisingly the advanced search is working fine.
After trying out all sort of methods, finding and editing the .phtml, .xml files. I found out that its one of the core files that causes this issue.
Solution
Open up app/code/core/Mage/CatalogSearch/Block/Result.php
Uncomment line 149 and 150
// $this->getListBlock()
// ->setCollection($this->_getProductCollection());
Then change line 172
$this->_productCollection = $this->getListBlock()->getLoadedProductCollection();to
$this->_productCollection = Mage::getSingleton('catalogsearch/layer')->getProductCollection();
That solves the search problem.
:)
Awesome! Searched everywhere for a solution and this worked perfectly. Thanks so much!
ReplyDeleteThank you. You have saved my life (well, more or less ;-) )
ReplyDeleteSearched for a solution so long, finally found this. Works perfectly.
Great Deal! :D
A quick thanks from me too. The change worked perfectly.
ReplyDelete