Product List - <%=Brand%> <%=myStyle%> <%=Category%>
Click to view categoriesShop by brand:
-
<%
rs.open "SELECT distinct Brand FROM Products",DBConn,1,3
do while not rs.eof
if rs("Brand")<>"" then
qstr = "?brand=" & Server.URLEncode(rs("Brand"))
end if
%>
<% if Brand = rs("Brand") then %>
- <%=rs("Brand")%> <% else %>
- <%=rs("Brand")%> <% end if %> <% rs.movenext loop rs.close %>
Shop by style:
-
<%
For j = 1 to 5
select case j
case 1: aStyle = "Fairy"
case 2: aStyle = "Punk"
case 3: aStyle = "Gothic"
case 4: aStyle = "Lolita"
case 5: aStyle = "Mori"
end select
qstr = "?myStyle=" & aStyle
%>
<% if myStyle = aStyle then %>
- <%=aStyle%> <% else %>
- <%=aStyle%> <% end if %> <% next %>
Shop by item type:
-
<%
rs.open "SELECT distinct Category FROM Products",DBConn,1,3
do while not rs.eof
if rs("Category")<>"" then
qstr = "?Category=" & Server.URLEncode(rs("Category"))
end if
%>
<% if Category = rs("Category") then %>
- <%=rs("Category")%> <% else %>
- <%=rs("Category")%> <% end if %> <% rs.movenext loop rs.close %>
-
<%
if Brand<>"" then
qrystr = "and Brand='" & Brand & "'"
elseif myStyle<>"" then
qrystr = "and " & myStyle & "=1"
elseif Category<>"" then
qrystr = "and Category='" & Category & "'"
end if
j=0
rs.open "SELECT * FROM Products where quantity>=0 and showinlist=1 " & qrystr,DBConn,1,3
do while not rs.eof
j=j+1
OutofStock = false
if rs("quantity")=0 then
if rs("ProductCode")=rs("ParentCode") or rs("ParentCode")="" then
OutofStock = true
else
rs2.open "SELECT Max(Quantity) as MaxQuantity FROM Products where ParentCode='" & rs("ParentCode") & "'",DBConn,1,3
if not rs2.eof then
MaxQuantity = rs2("MaxQuantity")
else
MaxQuantity = 0
end if
rs2.close
if MaxQuantity>0 then
OutofStock = false
else
OutofStock = true
end if
end if
end if
%>
- &parent=<%=rs("ParentCode")%>" id="product<%=j%>"><%if OutofStock = true then%>Sold Out!<% end if %><%if rs("SpecialPrice")>0 then%>Special!<% end if %>
_1.jpg" alt="<%=rs("ProductName")%>" />
<%=rs("ProductName")%>
<%if rs("SpecialPrice")>0 then%><%=FormatCurrency(rs("Price"))%> <%=FormatCurrency(rs("SpecialPrice"))%><%else%><%=FormatCurrency(rs("Price"))%><%end if%>
<%
rs.movenext
loop
rs.close
%>