-
Re: Instant Search
OK, I got it almost showing like I want. Just 2 more small things.
1 - How can I avoid it from displaying only all lower case?
2 - I chose to add the Products_description field instead of code too (which I now got working fine), but on the standard Advanced Search result page, I have line breaks (or returns- not sure) for this field and it displays a space just fine instead of a line break. But in the Instant Search it's removed and doesn't have that space anymore. The end of the original line 1 and the start of line 2 are butted up against each other. Can the space appear again? OR can a standard line break work like normal for the remaining text similar to the product INFO page?
Here's how Advanced search displays this song:
http://store2.musicalcreations.com/i...148008&x=0&y=0
Then in my search, type in: I Knew You Were Trouble
and you will see the T in Swift and the K in Key are connected with no space.
-
Re: Instant Search
I suspect the line-breaks are broken by the strip_tags() call being done on line 70 ... and the strip_tags are probably there to remove HTML that might otherwise break the DOM/layout in the results list. You could probably do a str_replace() for all '<br />' to "\n" before the strip_tags, and then do another str_replace to change the \n back to br again after the strip_tags. Or maybe use something other than a br tag if all you need is "space".
Just a guess.
It would be bad if the text contained any malformed HTML which ought not to be inside an <a> or <li> tag, especially any improperly closed </li> or </ul> or </a> tags.
And for the lowercase bit, again I'm guessing, but maybe it's the highlightWord function in the instantSearch.js that's causing it.
Line 113 of that file says this:
Code:
resultHtml += '<li><a href="' + generateLink(item.pc,item.l) + '"><span class="alignRight">' + formatNumber(item.c) + '</span>' + highlightWord(replaceWord,item.q) + '</a></li>';
I'm guessing that maybe skipping the highlightWord call might leave the case alone:
Code:
resultHtml += '<li><a href="' + generateLink(item.pc,item.l) + '"><span class="alignRight">' + formatNumber(item.c) + '</span>' + item.q + '</a></li>';
-
Re: Instant Search
1 - I found a way to modify the original text in the products_description field to fix my problem above and have it look proper throughout the search results.
Changed: <br />
to: 'space'<br />•'space'
Previous look: in the style of: BEYONCEKey: B - Time: 1:30
New look: in the style of: BEYONCE • Key: B - Time: 1:30
I didn't need to insert the other code you sent for this. I couldn't get it to work well, so I did a mySQL replace for this new modification of the field instead.
2 - The code you gave me for removing the lowercase only display works PERFECT!!
thanks so much once again.
I'm almost ready to go LIVE with the new site now...
-
Re: Instant Search
Hello, sorry for my bad english..but i'm italian..
I have found a problem in the mod...
I have many products that the name is "pistone.....and other word...". if you write "piston" in search you can see only 2 results...why?
My site is www.avotecnica.com thanks...
-
Re: Instant Search
Hi all,
I have had this add on installed (thanks so much), and it has been working lovely. However, today I noticed it has stopped working, and I have no idea why. I have made a lot of changes to the site, but to try rectifying it, I re-uploaded all the necessary files, and it still doesn't work. I have a lot of items in my shop which could easily be searched for under s slightly different spelling (such as cashews / cashew nuts), so this was a fantastic plug in for me, and I'd really appreciate it if anyone could help at all. My site in question is ainleyorganics.co.uk
-
Re: Instant Search
And also, to make it catastrophic (my usual style of F**k ups), if you search for a 2 word string, it returns a blank page :(
-
Re: Instant Search
I've fixed the blank page issue, but it seems they were not related. It was just a few blank lines at the end of advanced search php file (can't remember which file off the top of my head). But found it from the most recent log.
But, would still appreciate it if any one can help me diagnose the issue causing the Instant Search to stop working.
Thanks in advance
-
Re: Instant Search
I'm still no further on with this issue, and would appreciate assistance if anyone is out there lol.
-
Re: Instant Search
I installed this on my cart and it works great. But I was wondering if there was a way to make it so my down arrow can select the item I want? As it is I have to let go of the keyboard and select the entry I want with the mouse.
Thanks,
Jacob
-
Re: Instant Search
I can't seem to get this working on my 1.5.1 site for some reason. Was working fine when running 1.3.9d-h but after moving to 1.5.1 not working. Im using the same template etc without any furher mods and i have also tried reinstalling this mod to no avail.
No dropdown from search bar at all. checked in chrome, ie and ff non working.
<script type="text/javascript" src="includes/templates/custom/jscript/instantSearch.js"></script>
<link rel="stylesheet" type="text/css" href="includes/templates/custom/css/instantSearch.css" />
is showing in the source head
<input type="text" name="keyword" size="6" maxlength="30" class="topSearch" style="width: 16%" value="Enter search keywords here" onfocus="if (this.value == 'Enter search keywords here') this.value = '';" onblur="if (this.value == '') this.value = 'Enter search keywords here';" autocomplete="off">
is the code for the search box in the source