<%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Advanced product search form ' Product : CandyPress Store Frontend ' Version : 4.1 ' Modified : May 2007 ' Copyright: Copyright (C) 2004 Webs Unlimited, Inc. ' 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 http://www.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(LangText("ErrConfig",""),"") 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() %>
<%=LangText("GenAdvancedSearch","")%>

<%=LangText("GenSearchKeywords","")%>

<%=LangText("GenAnyKeyWords","")%> <%=LangText("GenAllKeyWords","")%> <%=LangText("GenPhrase","")%>

<%=LangText("GenSearchMinPrice","")%>      <%=LangText("GenSearchMaxPrice","")%>
    

<% 'Get categories and put them in an array mySQL = "SELECT a.idCategory, a.categoryDesc, a.breadCrumb " _ & "FROM categories a, " _ & "(SELECT b.idCategory " _ & "FROM categories_products b " _ & "GROUP BY b.idCategory) c " _ & "WHERE a.idCategory = c.idCategory " _ & "ORDER BY a.categoryDesc " set rsTemp = openRSexecute(mySQL) do while not rsTemp.EOF catArray = catArray & rsTemp("breadCrumb") & " > " & rsTemp("categoryDesc") & "*||*" & 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 %> <%=LangText("GenSearchCat","")%>


<% end if if pBrandDisplay = "-1" then mySQL = "Select distinct name, idBrand " _ & "FROM brand " _ & "WHERE active = 'Y' " _ & "ORDER BY name;" set rsTemp = openRSexecute(mySQL) %> <%=LangText("GenSelectBrand","Display Brand")%>


<% closeRS(rsTemp) end if if pManufacturerDisplay = "-1" then mySQL = "Select distinct name, idManufacturer " _ & "FROM manufacturer " _ & "WHERE active = 'Y' " _ & "ORDER BY name;" set rsTemp = openRSexecute(mySQL) %> <%=LangText("GenSelectManufacturer","Display Manufacturer")%>


<% closeRS(rsTemp) end if %>

<% end sub %>