Print Page | Close Window

Sku Quick Search instead of search all fields

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=6039
Printed Date: 19-May-2024 at 5:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Sku Quick Search instead of search all fields
Posted By: dwatch
Subject: Sku Quick Search instead of search all fields
Date 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>






Replies:
Posted By: dwatch
Date 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.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net