Magento 1.9 – Search Does Not Return Results

catalogsearchmagento-1.9search

As i described in the title i don't get any results when i search for a product.
I have tried so far:

  1. Checking the visibility of the products
  2. My products are in stock
  3. I have also set the qty to 100 to be sure
  4. I have updated the products attributes under catalog->manage products-> select all products.
  5. I assigned all the products in the main website for my certain store view.
  6. The name attribute can be used for search.

I have also tried to search with the sku but nothing happens again.
The odd is that the advanced search with both name and skuworks.

And my problem remains.. Any ideas on how to make my products to appear when searched??

Best Answer

Open your file Mage_CatalogSearch_Model_Layer and in method

public function prepareProductCollection($collection)

before return $this;

Add following rows:

Mage::log($collection->getSelectSQL(1), false, 'search.log', true);
Mage::log((array)Mage::getConfig()->getNode()->global->models->catalogsearch, false, 'search.log', true)

(it's for debug purpose to understand your problem).

Then open your var/log/search.log and put result to your first post (there should be long sql query and array where we can see rewrites).

Related Topic