Jump to content

Store search not working


Recommended Posts

Do you get any error?
Were you using overrides for the search class? If not, I would try getting a clean .14 and replacing classes/Search.php and the SearchController.php file as well, in controllers/front/

Link to comment
Share on other sites

Please explain what do you mean by "search is not working". Does the search result page return 0 results, or the results page gives an error, or the quick search list is not working, or is there something else?

Link to comment
Share on other sites

When I enter search term in search field I get 0 results on page. BUT when on search results page and I enter SAME search term I get proper results. Any suggestions? You can try go to www.uniq4pet.eu and enter search term pegus. 

Link to comment
Share on other sites

Looks like you are using instant search? Preferences -> Search ->Search -> Instant search set to Yes?

 

On the homepage of your website, there is a javascript error:

Error: ReferenceError: comparedProductsIds is not defined
Source File: https://www.uniq4pet.eu/themes/theme1184/cache/v_15_751f1d5c3624b0ee6ccd4dfa1bb14f62.js
Line: 418

 

And as there is javascript error, other script is not executed thus instant search is not working. On other pages, e.g. category page, instant search is working.

Link to comment
Share on other sites

Please open the file cache/class_index.php, find the code like the one below, and paste it here.

  'Search' => 
  array (
    'path' => '',
    'type' => 'class',
    'override' => false,
  ),
  'SearchController' => 
  array (
    'path' => 'override/controllers/front/SearchController.php',
    'type' => 'class',
    'override' => false,
  ),
  'SearchControllerCore' => 
  array (
    'path' => 'controllers/front/SearchController.php',
    'type' => 'class',
    'override' => false,
  ),
  'SearchCore' => 
  array (
    'path' => 'classes/Search.php',
    'type' => 'class',
    'override' => false,
  ),
  'SearchEngine' => 
  array (
    'path' => '',
    'type' => 'class',
    'override' => false,
  ),
  'SearchEngineCore' => 
  array (
    'path' => 'classes/SearchEngine.php',
    'type' => 'class',
    'override' => false,
  ),
Link to comment
Share on other sites

Sorry, maybe I was not clear before, but I am not asking to put my code into your file. I wanted you to show me a fragment of your code from your file.

Please undo all the changes you made to the file. You can simple delete that file, because it's a cache file and will be generated automatically.

Link to comment
Share on other sites

Here it is.

  'Search' =>
  array (
    'path' => '',
    'type' => 'class',
    'override' => false,
  ),
  'SearchController' =>
  array (
    'path' => '',
    'type' => 'class',
    'override' => false,
  ),
  'SearchControllerCore' =>
  array (
    'path' => 'controllers/front/SearchController.php',
    'type' => 'class',
    'override' => false,
  ),
  'SearchCore' =>
  array (
    'path' => 'classes/Search.php',
    'type' => 'class',
    'override' => false,
  ),
  'SearchEngine' =>
  array (
    'path' => '',
    'type' => 'class',
    'override' => false,
  ),
  'SearchEngineCore' =>
  array (
    'path' => 'classes/SearchEngine.php',
    'type' => 'class',
    'override' => false,
  ),
Link to comment
Share on other sites

  • 1 month later...

Hi,

 

The ajax search in my home page is not working. It works perfectly in all other pages. 

On entering the search keyword, request url is http://localhost/prestashop/en/search.html?q=mixtu&limit=10&timestamp=1437633759429&ajaxSearch=1&id_lang=1 

which is wrong, It must be 

http://localhost/prestashop/en/search?q=mixtu&limit=10&timestamp=1437633759429&ajaxSearch=1&id_lang=1 .

 

There should not be any .html .Why does it happens? Please help me.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...