ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Sku Quick Search instead of search all fields
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sku Quick Search instead of search all fields

 Post Reply Post Reply
Author
Message
dwatch View Drop Down
Newbie
Newbie


Joined: 26-February-2006
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote dwatch Quote  Post ReplyReply Direct Link To This Post Topic: Sku Quick Search instead of search all fields
    Posted: 28-October-2015 at 5:48pm

For performance reasons,

Need to edit the quick search to search sku, instead of all product fields.  So customer enters the sku in the search box and only the sku field is searched.  I tried to change name "keyword" to name = "sku" but that redirects to the search.asp page for some reason.  any help is appreciated, figure it must be something minor, since the search.asp page seems to be able to search only sku, when you type into the sku field from that page, and they are both processed by showsearchresults.asp.


            <form action="showsearchresults.asp" name="search" method="get" id="pcHSearchForm">

   <input type="hidden" name="pageStyle" value="<%=bType%>">

            <input type="hidden" name="resultCnt" value="<%=pcIntPreferredCountSearch%>">

   <input type="text" name="keyword" value="" id="pcHSearch">

                <input type="submit" name="submit" value="Go" id="pcHSearchSubmit">
                <div id="pcHSearchMore">
                    <a href="search.asp">Advanced Search</a>
                </div>
            </form>



Back to Top
dwatch View Drop Down
Newbie
Newbie


Joined: 26-February-2006
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote dwatch Quote  Post ReplyReply Direct Link To This Post Posted: 03-February-2016 at 1:40pm

I revised the code to the following (listed below> 

<form action="showsearchresults.asp" name="search" method="get" id="pcHSearchForm">

<input type="hidden" name="pageStyle" value="<%=bType%>"> 

<input type="hidden" name="resultCnt" value="<%=pcIntPreferredCountSearch%>">

<input type="text" name="keyword" value="" id="pcHSearch">

<input type="submit" name="submit" value="Go" id="pcHSearchSubmit">
 <div id="pcHSearchMore">
  <a href="search.asp">Advanced Search</a>
 </div>
 </form>

and also changed all occurrences of the word A.details with A.pcProd_MetaKeywords in the file pc/showsearchresults.asp and the file pc/inc_srcPrdQuery.  This took care of the quick search to just search sku, and also improved performance on the advanced search.

Back to Top
 Post Reply Post Reply
  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.047 seconds.