Customized Store Search Code |
Post Reply | Page 12> |
Author | |
roknrod12
Newbie Joined: 31-July-2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 07-May-2009 at 3:05pm |
I'm wondering if anyone has tweaked the store search code to eliminate the searching of product descriptions? Basically, I'm wanting to allow the customer the option of searching product titles (name) only, much like the ebay search (in titles & descriptions). Has anyone attempted this? Any help would be greatly appreciated.
Thanks in advance, Rodney |
|
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
|
This is something we would like to do also.
|
|
avalight
Newbie Joined: 21-September-2007 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
You can limit your search in the small search box by SKU, so I don't know why you couldn't do it for the Product Name too. I think the field name is for the product is called "description", but under this post is the way to do it for the SKU. I followed this plus a little tweaking and got it to work on my site http://www.avalanche-ranch.com. Upper right corner.
|
|
Curt
|
|
roknrod12
Newbie Joined: 31-July-2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
avalight - thanks for the reply. I thought the same thing, but according to EI support, 'it will require altering the complex query used by the the advanced search feature.' What exactly did you alter to limit yours?
|
|
avalight
Newbie Joined: 21-September-2007 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Well, I just used the small search box snippet that is in the Header.asp file. Just like in the post.
|
|
Curt
|
|
roknrod12
Newbie Joined: 31-July-2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
avalight -
Did you mean to put a link to a post? You mentioned a post a couple of times, but no reference. |
|
avalight
Newbie Joined: 21-September-2007 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Ah, right, sorry. I see the reason for the question. I think if I read this forum in the morning when I am fresh, vs. the late, late evening, things would be clearer...anyway, the post that I am referring to is this one: http://www.earlyimpact.com/forum/forum_posts.asp?TID=1979, which talks about how to make the search box only look for the SKU. I followed those instructions, including the change in the showsearchqueary.asp, and made some further modifications shown below, mostly to help users know what they can type in the box.
Hope this helps. Best |
|
Curt
|
|
roknrod12
Newbie Joined: 31-July-2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Thanks, avalight! I'll check this out.
|
|
worldofrugs
Senior Member Joined: 24-April-2008 Location: United States Status: Offline Points: 0 |
Post Options
Thanks(0)
|
What I did is I took the showsearchresults.asp, made a copy (showsearchresultsB.asp) and refered to this new page when I needed it (for example your own form).
When looking at the code, you will see in this file line like: tmpSQL=tmpSQL & TestWord & " A.details LIKE " tmpSQL2=tmpSQL2 & TestWord & " A.description LIKE " tmpSQL3=tmpSQL3 & TestWord & " A.sDesc LIKE " How I started on this file, was to change all thos lines to search only the ones I wanted... Example, searching only in the Name (title) of the product: tmpSQL=tmpSQL & TestWord & " A.description LIKE " tmpSQL2=tmpSQL2 & TestWord & " A.description LIKE " tmpSQL3=tmpSQL3 & TestWord & " A.description LIKE " I tested it and got the result I needed. Then I cleaned it up, removing the duplicate queries / string (or whatever you call them haha)... As I am not a guru ASP coder, this is probably not the best way to go, but it works great! (note: I'm using v3.12a, so look into the code with other versions) Hope this is what you were looking for or maybe helps you on your way... Edited by worldofrugs - 19-August-2009 at 10:45am |
|
roknrod12
Newbie Joined: 31-July-2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
worldofrugs - you win! That worked perfectly! Now I've got more refined searches on our site. Thanks a bunch!
|
|
Post Reply | Page 12> |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |