<% 'This file is part of ProductCart, an ecommerce application developed and sold by Early Impact LLC. ProductCart, its source code, the ProductCart name and logo are property of Early Impact, LLC. Copyright 2001-2003. All rights reserved. You are not allowed to use, alter, distribute and/or resell any parts of ProductCart's source code without the written consent of Early Impact. To contact Early Impact, please visit www.earlyimpact.com. %> <% response.Buffer=true %> <% on error resume next '******************************* ' Page Name '******************************* Dim pcStrPageName pcStrPageName = "search.asp" %> <% Dim query, conntemp, rs, rstemp call openDb() 'APP-S ' Update parent products inventory levels if necessary%> <%' End update parent products inventory levels 'APP-E %> <% '// Initialize the Prototype.js files Dim pcv_strPrototype Response.Write(pcf_InitializePrototype()) %> <%IF scStoreUseToolTip=1 THEN%> <%'**** Check MAC IE Browser ****************** UserBrowser=Request.ServerVariables("HTTP_USER_AGENT") MACIEBrowser=0 OperaBrowser=0 if UserBrowser<>"" then if instr(ucase(UserBrowser),"MAC")>0 AND instr(ucase(UserBrowser),"MSIE")>0 then MACIEBrowser=1 end if if instr(ucase(UserBrowser),"OPERA")>0 then OperaBrowser=1 end if end if '**** End of Check MAC IE Browser ******************%> <%IF MACIEBrowser=1 OR OperaBrowser=1 OR UserBrowser="" THEN%> <%session("store_useAjax")="1" ELSE%> <%session("store_useAjax")=""%> <%END IF%> <%END IF 'End of AJAX turns on%>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_1")%>

<% ' Show search page description, if any pcStrSearchDesc = dictLanguage.Item(Session("language")&"_search_1") if trim(pcStrSearchDesc) <> "" then %>
<%=pcStrSearchDesc%>
<% end if %>
<% '// Set Submit Action Dim pcv_strSubmitAction If SRCH_WAITBOX="1" Then pcv_strSubmitAction = "OpenHS(); return FormValidator(this);" Else pcv_strSubmitAction = "return FormValidator(this);" End If %>
<% '// CATEGORY DROP DOWN - START select case schideCategory case "0" ' // FIRST scenario: Category drop-down fully shown %> <% case "1" '// Only top-level categories are shown query="SELECT DISTINCT categories.idCategory,categories.categoryDesc,categories.idParentCategory " query=query&"FROM categories " query=query&"WHERE categories.iBTOhide=0 AND categories.pccats_RetailHide=0 AND idParentCategory=1 AND idCategory<>1 " query=query&"ORDER BY categories.categoryDesc ASC;" set rs=Server.CreateObject("ADODB.Recordset") set rs=connTemp.execute(query) if not rs.eof then Dim categoryArray, categoryCount, categoryTotal categoryArray = rs.getRows() categoryCount = 0 categoryTotal = ubound(categoryArray,2) %> <% end if set rs = nothing case "-1" '// The category drop-down is hidden %> <% End Select '// CATEGORY DROP DOWN - END %> <% 'Show brands, if any query="Select IDBrand, BrandName from Brands order by BrandName asc" set rs=Server.CreateObject("ADODB.Recordset") set rs=connTemp.execute(query) if not rs.eof then Dim brandArray, brandCount, brandTotal brandArray = rs.getRows() brandCount = 0 brandTotal = ubound(brandArray,2) %> <% end if set rs = nothing %> <%tmpJSStr="" tmpJSStr=tmpJSStr & "var SFID=new Array();" & vbcrlf tmpJSStr=tmpJSStr & "var SFNAME=new Array();" & vbcrlf tmpJSStr=tmpJSStr & "var SFVID=new Array();" & vbcrlf tmpJSStr=tmpJSStr & "var SFVALUE=new Array();" & vbcrlf tmpJSStr=tmpJSStr & "var SFVORDER=new Array();" & vbcrlf intCount=-1 tmpJSStr=tmpJSStr & "var SFCount=" & intCount & ";" & vbcrlf%> <%query="SELECT idSearchField,pcSearchFieldName,pcSearchFieldShow,pcSearchFieldOrder FROM pcSearchFields WHERE pcSearchFieldSearch=1 ORDER BY pcSearchFieldOrder ASC,pcSearchFieldName ASC;" set rs=Server.CreateObject("ADODB.Recordset") set rs=conntemp.execute(query) if not rs.eof then pcv_tempFunc="" pcv_tempFunc=pcv_tempFunc & "" & vbcrlf %> <%pcv_HaveSearchFields=1 else%> <%end if %> <% '// Locate preferred results count and load as default Dim pcIntPreferredCount pcIntPreferredCount =(scPrdRow*scPrdRowsPerPage) if validNum(pcIntPreferredCount) then %> <% end if %>

 

<%response.write dictLanguage.Item(Session("language")&"_advSrca_2")%>

<% cat_DropDownName="idcategory" cat_Type="1" cat_DropDownSize="1" cat_MultiSelect="0" cat_ExcBTOHide="1" cat_StoreFront="1" cat_ShowParent="1" cat_DefaultItem=dictLanguage.Item(Session("language")&"_advSrca_4") cat_SelectedItems="0," cat_ExcItems="" cat_ExcSubs="0" if scStoreUseToolTip="1" then cat_EventAction="onchange='javascript:runXML();'" else cat_EventAction="" end if %> <%call pcs_CatList()%>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_2")%>

<% if scStoreUseToolTip="1" then cat_EventAction="onchange='javascript:runXML();'" else cat_EventAction="" end if %>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_5")%>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_6")%> onblur="javascript:if (FormValidator(document.getElementById('ajaxSearch'))) {runXML();} else {return(false);}"<%end if%>> <%response.write dictLanguage.Item(Session("language")&"_advSrca_7")%> onblur="javascript:if (FormValidator(document.getElementById('ajaxSearch'))) {runXML();} else {return(false);}"<%end if%>>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_8")%>

onclick="javascript:runXML();"<%end if%> class="clearBorder">

<%response.write dictLanguage.Item(Session("language")&"_advSrca_11")%>

onblur="javascript:runXML();"<%end if%>>

<%=dictLanguage.Item(Session("language")&"_advSrca_13")%>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_9")%>

onblur="javascript:runXML();"<%end if%>> onclick="javascript:runXML();"<%end if%> class="clearBorder"><%response.write dictLanguage.Item(Session("language")&"_advSrca_14")%>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_22")%>

<%response.write dictLanguage.Item(Session("language")&"_advSrca_12")%>

<%=pcv_tempList%>  <%=pcv_tempFunc%>  Add

<%=dictLanguage.Item(Session("language")&"_advSrca_15")%>

<%=dictLanguage.Item(Session("language")&"_advSrca_16")%>

" name="Submit" id="submit" value="<%response.write dictLanguage.Item(Session("language")&"_advSrca_10")%> ">
<% If SRCH_WAITBOX="1" Then '// Loading Window ' >> Call Method with OpenHS(); response.Write(pcf_ModalWindow(dictLanguage.Item(Session("language")&"_advSrca_23"), "pcMainSearch", 200)) End If %>
<%if pcv_HaveSearchFields=1 then%> <%end if%> <% call closeDb() set rstemp= nothing %>