<% PageSecure = False %> <% iPID = GetVariable("ID1", -1, "int") iQty = GetVariable("Qty", 1, "int") sUser = GetVariable("Username", "", "string") sPassword = GetVariable("Password", "", "string") if Session("FinalPage") <> 1 then Session("FinalPage") = 0 dim arr(100,2) if Action = "emptycart" then session.abandon() response.redirect("cart.asp") elseif Action = "updatecart" then 'Remove any checked items if len(request.form("Remove")) > 0 then if instr(request.form("Remove"),", ") > 0 then arrTmp = split(request.form("Remove"),", ") for i=0 to ubound(arrTmp) arrTmp1 = split(arrTmp(i),"*~*") call deleteItem(arrTmp1(0),arrTmp1(1),arrTmp1(2)) next elseif instr(request.form("Remove"),"*~*") then arrTmp1 = split(request.form("Remove"),"*~*") call deleteItem(arrTmp1(0),arrTmp1(1),arrTmp1(2)) end if else ' Build array to display items in cart into a table iWeight = 0 iPrice = 0 sItems = session("Items") if len(sItems) > 0 then if instr(sItems,"*|*") then c = split(sItems,"*|*") for i=0 to ubound(c) tmpVal = 0 d = split(c(i),"*~*") tmpVal2 = d(0) 'quantity tmpVal1 = d(1) 'product id tmpVal3 = d(2) 'item details 'Get new quantity execute "tmpVal = request.form(""Qty_" & i & """)" 'Get item detail strings if avail execute "sTmp1 = request.form(""ItemDetails1_" & i & """)" execute "sTmp2 = request.form(""ItemDetails2_" & i & """)" execute "sTmp3 = request.form(""ItemDetails3_" & i & """)" execute "sTmp4 = request.form(""ItemDetails4_" & i & """)" if len(tmpVal) > 0 then arr(i,0) = tmpVal else arr(i,0) = tmpVal2 end if sTmp = "" if len(sTmp1) > 0 then sTmp = "Item Detail 1: " & sTmp1 & ";" end if if len(sTmp2) > 0 then sTmp = sTmp & " Item Detail 2: " & sTmp2 & ";" end if if len(sTmp3) > 0 then sTmp = sTmp & " Item Detail 3: " & sTmp3 & ";" end if if len(sTmp4) > 0 then sTmp = sTmp & " Item Detail 4: " & sTmp4 & ";" end if sItems = replace(sItems, tmpVal2 & "*~*" & tmpVal1 & "*~*" & tmpVal3, arr(i,0) & "*~*" & tmpVal1 & "*~*" & sTmp) arr(i,1) = tmpVal1 session("Items") = replace(session("Items"), tmpVal2 & "*~*" & tmpVal1 & "*~*" & tmpVal3, arr(i,0) & "*~*" & tmpVal1 & "*~*" & sTmp) next elseif instr(sItems,"*~*") then tmpVal = 0 d = split(sItems,"*~*") tmpVal2 = d(0) 'quantity tmpVal1 = d(1) 'product id tmpVal3 = d(2) 'item details 'Get new quantity execute "tmpVal = request.form(""Qty_0"")" 'Get item detail strings if avail execute "sTmp1 = request.form(""ItemDetails1_0"")" execute "sTmp2 = request.form(""ItemDetails2_0"")" execute "sTmp3 = request.form(""ItemDetails3_0"")" execute "sTmp4 = request.form(""ItemDetails4_0"")" if len(tmpVal) > 0 then arr(0,0) = tmpVal else arr(0,0) = tmpVal2 end if sTmp = "" if len(sTmp1) > 0 then sTmp = "Item Detail 1: " & sTmp1 & ";" end if if len(sTmp2) > 0 then sTmp = sTmp & " Item Detail 2: " & sTmp2 & ";" end if if len(sTmp3) > 0 then sTmp = sTmp & " Item Detail 3: " & sTmp3 & ";" end if if len(sTmp4) > 0 then sTmp = sTmp & " Item Detail 4: " & sTmp4 & ";" end if sItems = replace(sItems, tmpVal2 & "*~*" & tmpVal1 & "*~*" & tmpVal3, arr(0,0) & "*~*" & tmpVal1 & "*~*" & sTmp) arr(0,1) = tmpVal1 session("Items") = replace(session("Items"), tmpVal2 & "*~*" & tmpVal1 & "*~*" & tmpVal3, arr(0,0) & "*~*" & tmpVal1 & "*~*" & sTmp) end if end if end if Action = "" elseif Action = "login" then s = "SELECT Email,UserID,Password,UID,UserType FROM Cart_Users WHERE UserID = '" & sUser & "';" SET r = CreateRS(s) if isnull(r) or r.eof then sMessage = "Username not found." else if sPassword = decrypt(r("Password"),key) then Session("LoggedIn") = 1 Session("UserLevel") = r("UserType") Session("UID") = r("UID") Response.Redirect("billing_shipping.asp") else sMessage = "Login failed, try again." end if end if end if if Action = "viewcart" or Action = "" then Action = "viewcart" end if if len(Session("OID")) > 0 and Session("OID") <> -1 then sNow = now() iOID = Session("OID") ' Build item list sItems = session("Items") if len(sItems) > 0 then if instr(sItems,"*|*") then c = split(sItems,"*|*") for i=0 to ubound(c) d = split(c(i),"*~*") arr(i,0) = d(0) arr(i,1) = d(1) arr(i,2) = d(2) next elseif instr(sItems,"*~*") then d = split(sItems,"*~*") arr(i,0) = d(0) arr(i,1) = d(1) arr(i,2) = d(2) end if end if ' Put item list into string if iOID <> -1 then s = "DELETE FROM Cart_Orders_Items WHERE OID = " & Session("OID") ExecuteSQL(s) end if for i=0 to ubound(arr) if len(arr(i,0)) > 0 then iMultiType = getValue("MultiType","Cart_Products","PID",arr(i,1)) iCIDTmp = getValue("CID","Cart_Catagories_Index","PID",arr(i,1)) dBasePriceTmp = getValue("BasePrice","Cart_Products","PID",arr(i,1)) dBasePrice = dBasePriceTmp dMultiPriceTmp = getValue("MultiPrice","Cart_Products","PID",arr(i,1)) dWeight = dWeight + (getValue("ProductWeight","Cart_Products","PID",arr(i,1)) * arr(i,0)) if cint(iMultiType) = 0 then 'multiple in catagory,limit 2 if dMultiPriceTmp > 0 and dMultiPriceTmp <> "" then for z=0 to ubound(arr) if len(arr(z,1)) > 0 then iTmp = getValue("CID","Cart_Catagories_Index","PID",arr(z,1)) if ((arr(z,1) <> arr(i,1)) and (iTmp = iCIDTmp) and (instr(sDiscApplied,"|" & arr(z,1) & "|") = 0) and (iDiscApplied < 2)) then sDiscApplied = sDiscApplied & "|" & trim(arr(z,1)) & "|" iDiscApplied = iDiscApplied + 1 dBasePrice = dMultiPriceTmp if iDiscApplied = 2 then iDiscApplied = 0 exit for elseif (arr(z,1) = arr(i,1)) and (arr(z,0) > 1) then sDiscApplied = sDiscApplied & "|" & trim(arr(z,1)) & "|" iDiscApplied = iDiscApplied + 1 dBasePrice = dMultiPriceTmp if iDiscApplied = 2 then iDiscApplied = 0 exit for end if end if next end if elseif cint(iMultiType) = 1 then 'multiple of same product in cart if dMultiPriceTmp > 0 and dMultiPriceTmp <> "" then if arr(i,0) >= 2 then dBasePriceTmp = dMultiPriceTmp end if end if end if dSubTotalTmp = 0 if arr(i,0) > 1 then if cint(iMultiType) = 0 then dSubTotalTmp = dSubTotalTmp + (dBasePrice * (arr(i,0))) elseif cint(iMultiType) = 1 then dSubTotalTmp = dSubTotalTmp + (dBasePrice) dSubTotalTmp = dSubTotalTmp + (dBasePriceTmp * (arr(i,0)-1)) end if else dSubTotalTmp = dSubTotalTmp + (dBasePrice) end if if iOID <> -1 then s = "INSERT INTO Cart_Orders_Items (OID,PID,Qty,Price,ItemDetail,Status,Created,Modified)" & _ " VALUES (" & iOID & "," & arr(i,1) & "," & arr(i,0) & "," & dSubTotalTmp & "," & _ "'" & arr(i,2) & "',2,#" & sNow & "#,#" & sNow & "#);" ExecuteSQL(s) end if end if next end if sub deleteItem(a,b,c) if b <> -1 then session("Items") = replace(session("Items"), a & "*~*" & b & "*~*" & c, "") if len(session("Items")) > 0 and instr(session("Items"),"*|*") > 0 then if left(Session("Items"),3) = "*|*" then Session("Items") = right(Session("Items"),len(Session("Items")) -3) if right(Session("Items"),3) = "*|*" then Session("Items") = left(Session("Items"),len(Session("Items")) -3) Session("Items") = replace(Session("Items"),"*|**|*","*|*") end if end if end sub Function checkItem(iTmp3) iDetails1 = getValue("ItemDetails1","Cart_Products","PID",iTmp3) iDetails2 = getValue("ItemDetails2","Cart_Products","PID",iTmp3) iDetails3 = getValue("ItemDetails3","Cart_Products","PID",iTmp3) iDetails4 = getValue("ItemDetails4","Cart_Products","PID",iTmp3) if iDetails1 = "" or isnull(iDetails1) then iDetails1 = 0 if iDetails2 = "" or isnull(iDetails2) then iDetails2 = 0 if iDetails3 = "" or isnull(iDetails3) then iDetails3 = 0 if iDetails4 = "" or isnull(iDetails4) then iDetails4 = 0 checkItem = cint(iDetails1) + cint(iDetails2) + cint(iDetails3) + cint(iDetails4) End Function function getValue(f,t,q,id) if len(id) > 0 and len(f) > 0 and len(t) > 0 and len(q) > 0 then sSQL = "SELECT " & f & " FROM " & t & " WHERE " & q & " = " & id & ";" set rs = CreateRS(sSQL) if isnull(rs) or rs.eof then getValue = "" else getValue = rs(0) end if rs.close set rs = nothing end if end function %> :: Designer CD-R ::
 
 
 
 
 
<% ' Build array to display items in cart into a table iWeight = 0 iPrice = 0 sItems = session("Items") if len(sItems) > 0 then if instr(sItems,"*|*") then c = split(sItems,"*|*") for i=0 to ubound(c) d = split(c(i),"*~*") arr(i,0) = d(0) arr(i,1) = d(1) arr(i,2) = d(2) next elseif instr(sItems,"*~*") then d = split(sItems,"*~*") arr(0,0) = d(0) arr(0,1) = d(1) arr(0,2) = d(2) end if end if dTotal = 0 dShipping = 0 dSubTotal = 0 tmpArr = split(session("Items"),"*~*") iNum = ubound(tmpArr) bCart = False sDiscApplied = "" iDiscApplied = 0 for i=0 to ubound(arr) if len(arr(i,0)) > 0 then bCart = True iMultiType = getValue("MultiType","Cart_Products","PID",arr(i,1)) iCIDTmp = getValue("CID","Cart_Catagories_Index","PID",arr(i,1)) dBasePriceTmp = getValue("BasePrice","Cart_Products","PID",arr(i,1)) dBasePrice = dBasePriceTmp dMultiPriceTmp = getValue("MultiPrice","Cart_Products","PID",arr(i,1)) if cint(iMultiType) = 0 then 'multiple in catagory,limit 2 if dMultiPriceTmp > 0 and dMultiPriceTmp <> "" then for z=0 to ubound(arr) if len(arr(z,1)) > 0 then iTmp = getValue("CID","Cart_Catagories_Index","PID",arr(z,1)) if ((arr(z,1) <> arr(i,1)) and (iTmp = iCIDTmp) and (instr(sDiscApplied,"|" & arr(z,1) & "|") = 0) and (iDiscApplied < 2)) then sDiscApplied = sDiscApplied & "|" & trim(arr(z,1)) & "|" iDiscApplied = iDiscApplied + 1 dBasePrice = dMultiPriceTmp if iDiscApplied = 2 then iDiscApplied = 0 exit for elseif (arr(z,1) = arr(i,1)) and (arr(z,0) > 1) then sDiscApplied = sDiscApplied & "|" & trim(arr(z,1)) & "|" iDiscApplied = iDiscApplied + 1 dBasePrice = dMultiPriceTmp if iDiscApplied = 2 then iDiscApplied = 0 exit for end if end if next end if elseif cint(iMultiType) = 1 then 'multiple of same product in cart if dMultiPriceTmp > 0 and dMultiPriceTmp <> "" then if arr(i,0) >= 2 then dBasePriceTmp = dMultiPriceTmp end if end if end if sImg = getValue("ProductThumb","Cart_Products","PID",arr(i,1)) 'Resize thumbnail if gfxSpex(Server.Mappath("images/") & "\" & sImg, iWidth, iHeight, c, strType) = true then if iWidth > 200 or iHeight > 200 then iWidth = iWidth * .3 iHeight = iHeight * .3 else iWidth = iWidth * .50 iHeight = iHeight * .50 end if bResize = True else bResize = False end if %> <% 'Get item details strings s1 = arr(i,2) s1End = instr(s1,";") - 16 s2 = replace(s1, mid(s1,1,instr(s1,";") + 1), "") s2End = instr(s2,";") - 16 s3 = replace(s2, mid(s2,1,instr(s2,";") + 1), "") s3End = instr(s3,";") - 16 s4 = replace(s3, mid(s3,1,instr(s3,";") + 1), "") s4End = instr(s4,";") - 16 s1 = mid(s1, 16, s1End) s2 = mid(s2, 16, s2End) s3 = mid(s3, 16, s3End) s4 = mid(s4, 16, s4End) iItemDetailsTmp = checkItem(arr(i,1)) iPIDField1Length = getValue("ItemDetails1Length","Cart_Products","PID",arr(i,1)) iPIDField2Length = getValue("ItemDetails2Length","Cart_Products","PID",arr(i,1)) iPIDField3Length = getValue("ItemDetails3Length","Cart_Products","PID",arr(i,1)) iPIDField4Length = getValue("ItemDetails4Length","Cart_Products","PID",arr(i,1)) %> <% if len(arr(i,2)) > 1 then %> <% end if %> <% if arr(i,0) > 1 then if cint(iMultiType) = 0 then dSubTotal = dSubTotal + (dBasePrice * (arr(i,0))) elseif cint(iMultiType) = 1 then dSubTotal = dSubTotal + (dBasePrice) dSubTotal = dSubTotal + (dBasePriceTmp * (arr(i,0)-1)) end if else dSubTotal = dSubTotal + (dBasePrice) end if dWeight = dWeight + (getValue("ProductWeight","Cart_Products","PID",arr(i,1)) * arr(i,0)) end if next if len(Session("OID")) > 0 then s = "UPDATE Cart_Orders SET SubTotal = " & dSubTotal & " WHERE OID = " & Session("OID") ExecuteSQL(s) end if if NOT bCart then %> <% end if %>
  Item   Price   Quantity   Total   Remove
  <% if len(sImg) > 0 then %> height="<%= iHeight %>" width="<%= iWidth %>"<% end if %>>
<% end if %> <%= getValue("Title","Cart_Products","PID",arr(i,1)) %>
  <% if cint(iMultiType) = 0 or arr(i,0) <= 1 then response.write formatcurrency(dBasePrice,2) elseif cint(iMultiType) = 1 then response.write formatcurrency(dBasePrice,2) & " x 1
" if arr(i,0) > 1 then response.write formatcurrency(dBasePriceTmp,2) & " x " & arr(i,0) -1 end if end if %>
  size=2 OnFocus="this.select();" OnBlur="validateNum(this, '', 0);" value="<%= arr(i,0) %>" class="box">   <% dSubTotalTmp = 0 if arr(i,0) > 1 then if cint(iMultiType) = 0 then dSubTotalTmp = dSubTotalTmp + (dBasePrice * (arr(i,0))) elseif cint(iMultiType) = 1 then dSubTotalTmp = dSubTotalTmp + (dBasePrice) dSubTotalTmp = dSubTotalTmp + (dBasePriceTmp * (arr(i,0)-1)) end if else dSubTotalTmp = dSubTotalTmp + (dBasePrice) end if %> <%= formatcurrency(dSubTotalTmp,2) %>  
Line #1:  <% if iItemDetailsTmp >= 2 then %>  #2:  <% end if %> <% if iItemDetailsTmp >= 3 then %>  #3:   <% end if %> <% if iItemDetailsTmp >= 4 then %>  #4:   <% end if %>
There are no items in your cart, click Continue Shopping to Add Items.
                   
<% Session("SubTotal") = dSubTotal %>
0 then %><%= Session("ContinuePage") %><% else %><%=VbURL%>index.htm<% end if %>';"> Subtotal <%= formatcurrency(dSubTotal,2) %>
If you have changed
quantities, or removed
items, click update

   
 

<% if len(Session("UID")) > 0 then s = "SELECT Firstname FROM Cart_Users WHERE UID = " & Session("UID") SET r = CreateRS(s) if isnull(r) or r.eof then sName = "" else sName = r(0) end if end if if len(sName) > 0 then %> <% elseif Session("FinalPage") = 1 then %> <% else %> <% end if %>
Checkout Options
Welcome Back <%= sName %>! You're already signed in so click the button below to verify your information and checkout.

<% if Session("FinalPage") = 1 then sPage = "payment.asp" else sPage = "billing_shipping.asp" end if %>
Click the button below to verify your information and checkout.

<% if Session("FinalPage") = 1 then sPage = "payment.asp" else sPage = "billing_shipping.asp" end if %>

New Customers & Guests
Checkout without Signing in

You don't need to sign in to purchase from designercdr.com

You will have the option to register and save your information later during the checkout process

Registered Customers
Sign in for Faster Checkout

Sign in information is case sensitive

<% if len(sMessage) > 0 then %>

<%= sMessage %>

<% end if %>

Username:

Password: