Magento - Autocomplete Suggest Search Not Working -


i have incorporated new theme in magento v1.4.2.0, , have completed necessary changes, following true magento way of overriding magento modules & methods.

my problem auto complete suggest search functionality in front-end not working @ all. ajax running can view calls in "firebug" (with status showing "200 ok"), search result dropdown isn’t coming.

some more info:-

  • checked method of form , set "get".
  • name of text field in "form.mini.phtml" "q".
  • checked both log files (exception.log & system.log), nothing printed here regarding auto complete search.
  • checked settings of minimal query length (from "system > configuration > catalog > catalog search > minimal query length") , set "1".
  • incorporated html in "form.mini.phtml" page precisely possible, along including required js files without errors in them. result, firebug reporting blank / null ajax responses, without errors.

edit:-
getting problem. have 4 products, each starting name "test". let's assume name of these 4 products "test 1", "test 2", "test 3", "test 4".
if simple search query "test", in router "catalogsearch/index", result showing there 4 products available, correct. if search query "test 1", no results showing, weird.

also using "jquery", no conflict condition. however, there 6 plugins of "jquery", of not following no conflict condition perfectly. because code in of plugins huge, & impossible me change each & every "$" sign "jquery", making no conflict compatible. can suggest sort of problem too? , whether affecting auto suggest search in way?

please me out. of in advance.

it sounds though there issue way server responding ajax calls rather problem form or javascript. suggest need debug couple of key areas.

ideally, debug xdebug on apache hooked ide (netbeans, eclipse, other). personal preference/setup netbeans, others work fine. if can't use live debugging, can insert print_r/echo statements through code blocks , trace call way.

  1. mage_catalogsearch_ajaxcontroller

the javascript on form.mini.phtml should sending request mage_catalogsearch_ajaxcontroller , suggestaction. set breakpoints/trace messages either side of first if statement in method.

if breakpoint/trace doesn't hit, try manually hitting action putting http://hostname/catalogsearch/ajax/suggest?q=query in browser address bar.

if doesn't work, there's broken config of catalogsearch module, <frontname><routers> section. use alan storm's configviewer or commercebug modules debug that.

  1. mage_catalogsearch_block_autocomplete

the ajaxcontroller creates instance of mage_catalogsearch_block_autocomplete actual query. set breakpoint/trace before $suggestdata = $this->getsuggestdata(); check block getting instantiated.

after line, block calls it's own getsuggestdata() method. continue trace through code see error occurs.

  1. mage_catalogsearch_model_query::getsuggestcollection()

the block calls method retrieve values match q param, in particular setqueryfilter() method inserts param sql query criteria. again, trace through here find error.

i can't emphasize enough how easier find (and magento issues) when you're using live debugging in ide. have read of my answer here if want tips on process.

make sure have server in developer mode output many errors possible.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -