<%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Advanced product search form ' Product : CandyPress Store Frontend ' Version : 2.5 ' Modified : February 2004 ' Copyright: Copyright (C) 2004 CandyPress.Com ' See "license.txt" for this product for details regarding ' licensing, usage, disclaimers, distribution and general ' copyright requirements. If you don't have a copy of this ' file, you may request one at webmaster@candypress.com '************************************************************************* Option explicit Response.Buffer = true %> <% 'Product dim idProduct dim description dim price 'Database dim mySQL dim conntemp dim rstemp dim rstemp2 'Session dim idOrder dim idCust 'Work Fields dim i dim catArray, catArray2 '************************************************************************* 'Open Database Connection call openDb() 'Store Configuration if loadConfig() = false then call errorDB(langErrConfig,"") end if 'Get/Set Cart/Order Session idOrder = sessionCart() 'Get/Set Customer Session idCust = sessionCust() %> <% 'Close Database Connection call closedb() '********************************************************************** 'Main Shopping Cart Display Area '********************************************************************** sub cartMain() %>
<%=langGenAdvancedSearch%>

<%=langGenSearchKeywords%>

<%=langGenAnyKeyWords%> <%=langGenAllKeyWords%> <%=langGenPhrase%>

<%=langGenSearchMinPrice%>      <%=langGenSearchMaxPrice%>
    

<% 'Get categories and put them in an array mySQL = "SELECT a.idCategory, a.categoryDesc " _ & "FROM categories a, categories_products b " _ & "WHERE a.idCategory = b.idCategory " _ & "GROUP BY a.idCategory, a.categoryDesc " _ & "ORDER BY a.categoryDesc " set rsTemp = openRSexecute(mySQL) do while not rsTemp.EOF catArray = catArray & getCategoryPos(rsTemp("idCategory"),"","N") & "*||*" & rsTemp("idCategory") rsTemp.MoveNext if not rsTemp.EOF then catArray = catArray & "*|*" 'Separates categories end if loop call closeRS(rsTemp) 'Create and sort the array if len(trim(catArray&"")) > 0 then catArray = split(catArray,"*|*") catArray = sortArray(catArray) end if 'Build category list from sorted array if isArray(catArray) then %> <%=langGenSearchCat%>


<% end if %>

<% end sub %>