Search without submit button?
Hi Low!
I have a question about ability of Low Search. I want return search results without have to click submit button.
As this case, I set keyword in embed:
We have {embed="stuff/search-item" my_keywords="sony xperia z"} Xperia in store!
So, in embed template "stuff/search-item" I will place Low Search Result tag in it to perform search.
Above code return:
We have 5 Xperia in store!
is my willing!
Thank Low!
Replies
Low 23 Apr 2014 19:48
You can hard-code any of the Low Search parameters in the Results tag, so in your case, something like this:
ngoncom 24 Apr 2014 03:06
Hi Low!
I create template "test" and place this code:
It return 2 products, when I search with this form:
With keywords as above 'sony xperia z' it return 3 products. I try rebuild index, but nothing improvement!
Second, I try add channel:
Nothing return!
Have I missing somethings? Thank Low!
Low 24 Apr 2014 11:25
What's the results tag in the /search template? Also, does the "sony" channel actually exist? You can turn on template debugging and look up all the lines that mention Low Search to get an idea of what's going on. Copy/paste those lines here for the cases you describe above.
ngoncom 24 Apr 2014 17:04
Hi Low!
I thank you so much for your reply. I tried install fresh EE and Everything works perfectly! So, Low Search working as expected!
I actually dont know why it not works well on my project, here is my debug:
The line (0.059570 / 5.33MB) Low Search: Parameters set: keywords="sony xperia z" search_mode="all" orderby="" sort="" fixed_order="46|58|52" seem Low Search return 3 results, but it only display 2 results!
I am using EE 2.7.3, Low Search 3.1.4 and installed some module:
- ce_cache
- ifelse
- mo_variables
- seo_lite
- snaptcha
- stash
- switchee
- wygwam
- zoo_visitor...
Thank so much!
Low 24 Apr 2014 20:40
It could be that the entry that isn't returned has a different status than 'Open', or its entry/expiration dates fall outside the threshold of what is allowed back. Regular standard EE channel:entries filtering still applies, so that could be it.
ngoncom 25 Apr 2014 02:46
Hi Low, that appreciate help!
I am very sorry for spending your time, the problem is status (I have an entry with status not = open) causing wrong results.
Above code works well!