ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Customized Store Search Code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Customized Store Search Code

 Post Reply Post Reply Page  12>
Author
Message
roknrod12 View Drop Down
Newbie
Newbie


Joined: 31-July-2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote roknrod12 Quote  Post ReplyReply Direct Link To This Post Topic: Customized Store Search Code
    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
Back to Top
whizzinpc View Drop Down
Newbie
Newbie
Avatar

Joined: 17-January-2006
Location: California
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote whizzinpc Quote  Post ReplyReply Direct Link To This Post Posted: 08-May-2009 at 11:36am
This is something we would like to do also.
Back to Top
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Posted: 08-May-2009 at 5:05pm
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
Back to Top
roknrod12 View Drop Down
Newbie
Newbie


Joined: 31-July-2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote roknrod12 Quote  Post ReplyReply Direct Link To This Post Posted: 08-May-2009 at 5:11pm
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?
Back to Top
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Posted: 08-May-2009 at 7:11pm
Well, I just used the small search box snippet that is in the Header.asp file.  Just like in the post.
Curt
Back to Top
roknrod12 View Drop Down
Newbie
Newbie


Joined: 31-July-2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote roknrod12 Quote  Post ReplyReply Direct Link To This Post Posted: 18-August-2009 at 10:13am
avalight -

Did you mean to put a link to a post? You mentioned a post a couple of times, but no reference.
Back to Top
avalight View Drop Down
Newbie
Newbie


Joined: 21-September-2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote avalight Quote  Post ReplyReply Direct Link To This Post Posted: 18-August-2009 at 11:16am
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. 

<!-- Start Search Box -->
   <form action="http://www.avalanche-ranch.com/rusticlighting/pc/showsearchresults.asp" name="search" method="get" class="pcForms">
   <input type="hidden" name="pageStyle" value="<%=bType%>">
   <SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 11pt; COLOR: rgb(0,161,0);">PRODUCT SEARCH:</span>
   <input type="hidden" name="resultCnt" value="10">
   <input type="Text" name="SKU" size="14" value="Enter Product No." onclick="this.value=''">
    <b><input type="image" name="submit" src="/rusticlighting/PC/images/btn_go_gray.gif" id="submit"></b>
    </form>
<!-- End Search Box -->

Hope this helps.
Best

Curt
Back to Top
roknrod12 View Drop Down
Newbie
Newbie


Joined: 31-July-2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote roknrod12 Quote  Post ReplyReply Direct Link To This Post Posted: 18-August-2009 at 11:20am
Thanks, avalight! I'll check this out.
Back to Top
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 19-August-2009 at 10:44am
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
Back to Top
roknrod12 View Drop Down
Newbie
Newbie


Joined: 31-July-2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote roknrod12 Quote  Post ReplyReply Direct Link To This Post Posted: 19-August-2009 at 12:48pm
worldofrugs - you win! That worked perfectly! Now I've got more refined searches on our site. Thanks a bunch!
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.078 seconds.