[ic] (Ajax) Search Form question
Klaatu IC Hack
icgort33 at gmail.com
Thu Feb 25 14:14:26 UTC 2016
An earlier version of the Strap 3 demo included a perl script that
performed an Ajax autosuggest lookup as per the Readme:
Search in top bar includes autosuggest. IC isolated script: sug
located in cgi-bin/ allows quick suggestions via ajax using direct db
query, avoiding overhead of IC.
I revisited the script this week and after moving it to the cgi-bin
and setting permissions and DB it started working as specified. Great
addition.
For a second catalog I modified the script a little including concat
title and description fields:
my $mainq = "SELECT concat(title,' ',description) FROM products WHERE
inactive <> 1 and (concat(title,' ',description) LIKE '%$string%')
LIMIT $limit";
This displays autosuggestion results with title before description.
The results page also works perfectly but only if I place the form
into a typical CONTENT area within a page.
If I place the form in the top bar layout or TOP_SEARCH variable as
per the early strap demo the autosuggestions work however no items
found on the results page.
To make my question hopefully easier to resolve when I submit the
search form within a page content area the URL generated typically
looks like:
catalogname/search.html
When this style of URL is produced I am getting solid search results.
However when I move the same form into the top bar of the strap
template the AJAX works however the URL produced includes ITL tags
example:
catalogname/search.html?mp=s&s=Vincent+Van+Gogh+Sunflowers
and no results are found.
I would like to understand why the ITL tags are displayed in the URL
when I move the form into the template/layout region? How can I get
the form to generate the same hidden search.html query instead?
K.
More information about the interchange-users
mailing list