10

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??

23
  • whether its an simple or configurable? did you reindexed? Commented May 12, 2015 at 8:31
  • i have 2 simple products and the rest are configurable. I have reindex many times so far.
    – vasilisdmr
    Commented May 12, 2015 at 8:34
  • Are the products visible in the catalog? Commented May 12, 2015 at 8:47
  • what do you mean by that? You mean if i can see them under catalog->manage products? If that is your question, then yes i can see them.
    – vasilisdmr
    Commented May 12, 2015 at 8:48
  • I mean are they visible when browsing the catalog on the front end? Commented May 12, 2015 at 8:53

12 Answers 12

9
+50

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).

1
  • i will give a try in the morning and tell you the results.
    – vasilisdmr
    Commented May 14, 2015 at 22:14
6

I've experienced this. My fix was to go to Manage Products and select all products and perform an "Update Attributes" from the dropdown above the grid. In the Update Attributes screen, move to the Websites tab and re-associate with the proper website by checking the checkbox under Add Products To Website.

After this, another Search Index rebuild may be required.

5
  • I had this issue also and Update Attributes worked for me. Commented May 15, 2015 at 15:42
  • Read pt. #4 and #5 He already did it and his products are assigned on necessary website
    – zhartaunik
    Commented May 15, 2015 at 19:51
  • @zhartaunik In #4, OP didn't specify what attributes were modified and in #5 OP uses term "Store View" which is different from "Website."
    – John Orman
    Commented May 15, 2015 at 20:46
  • i am going to try that in a while.
    – vasilisdmr
    Commented May 19, 2015 at 9:44
  • i tried that and nothing, i remembered that i did that once again and got the same, nothing in return.
    – vasilisdmr
    Commented May 19, 2015 at 10:05
3

go to

admin->attributs->manage attribute-> search sku - open it -> Frontend Properties-> Use in Quick Search (YES )

, Use in Advanced Search (YES). thats it.

1
  • i have done that but nothing happend.
    – vasilisdmr
    Commented May 21, 2015 at 6:58
2

Did you create external modules that required using search? Look at the layout files for something like this

<mdg_giftregistry_search_index>
    <reference name="content">
        <block name="giftregistry.search" type="core/template" template="mdg/search.phtml" as="giftregistry_search"/>
    </reference>
</mdg_giftregistry_search_index>
1
  • I did not use any external module that required search.
    – vasilisdmr
    Commented May 14, 2015 at 22:14
2

Another possibility that worked for me is make data reindex!

To do this, go to the Admin Panel > System > Index Management, click "Select All", in field "Action" select "Reindex Data" and click "Submit".

=)

Peace!

1

Many question Possibleproducts attributes set error. you need enter image description here

Check each .

1

You can debug collection object on class Mage_CatalogSearch_Model_Layer below funtion.

public function getProductCollection()
    {
        if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
            $collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
        } else {
            $collection = Mage::getResourceModel('catalogsearch/fulltext_collection');
            $this->prepareProductCollection($collection);
            $this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
        }

echo $collection->getSelect();die('test');

        return $collection;
    }
3
  • this code snippet where do i have to put it ?
    – vasilisdmr
    Commented May 19, 2015 at 7:45
  • app/code/core/Mage/CatalogSearch/Model/Layer.php After line no 44 echo $collection->getSelect();die('test');
    – sanji
    Commented May 19, 2015 at 9:36
  • and the result will be? i mean i will see if the products are added to the $collection?
    – vasilisdmr
    Commented May 19, 2015 at 10:06
1

I also faced same issue few days back, My issue was i've override the default magento functionality for one extension. So it was having conflictions with my search results. Check all your extensions once may be there any confliction.

3
0

I had the same problem & I tried all the suggestions above & none of them worked so I did some google searching of each of my issues & got nothing, then I Googled how to make my products searchable in my Magento store & I came across "Search Terms" which is located in Catalog but not the Catalog in System Configuration but the Catalog when you add a New or edit a product. In the search query you add the title you want to give that search & in the Redirect you put the whole URL address of the product or products you want to come up with that name. I sell sex toys so for example I typed in my search section of Magento Vibrator & none would come up even though I have heaps of different models, so I created a search query named Vibrator & copied the URL from the vibrator category & now when I search for vibrator all my vibrators come up

0

I have this problem too.

Going to Manage Products and select all products and perform an "Update Attributes" from the dropdown above the grid. In the Update Attributes screen, move to the Websites tab and re-associate with the proper website by checking the checkbox under Add Products To Website.

  • this solution works for me but I have literally thousands of products and this would take days to do. Is there another way to do this or a database command I could use to do this? Thank you
1
  • Welcome to MSE. You can add new question and this part is for posting answers only. Hope it helps
    – Jarnail S
    Commented Feb 21, 2019 at 17:33
0

If this data is important for you get a backup of this table.

I've experienced this problem several times and solved with this way; Try to truncate catalogsearch_query table.

TRUNCATE TABLE catalogsearch_query;

-5

I assume you followed all comments above apart from that please follow the following too:

  1. First Make sure you have max execution time either write in index.php ini_set('max_execution_time', 1800) or set it in php.ini max_execution_time= 1600
  2. Increase memory limit ini_set('memory_limit','512M') or set it in php.ini memory_limit=16M
2
  • how would 16M refer to an increase ... Magento is 256/512M ... spammy response? Commented May 14, 2015 at 19:26
  • sorry edited it. Commented May 15, 2015 at 0:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.