<%@LANGUAGE="VBSCRIPT"%> <% set Recordset2 = Server.CreateObject("ADODB.Recordset") Recordset2.ActiveConnection = MM_prophet_STRING Recordset2.Source = "SELECT id_products, pic_thumb FROM products" Recordset2.CursorType = 0 Recordset2.CursorLocation = 2 Recordset2.LockType = 3 Recordset2.Open() Recordset2_numRows = 0 %> <% ' 'Redirect if cart is empty ' if not isFound then response.redirect "baskempty_pt.htm" %> <% Function gen_key(digits) dim char_array(10) char_array(0) = "0" char_array(1) = "1" char_array(2) = "2" char_array(3) = "3" char_array(4) = "4" char_array(5) = "5" char_array(6) = "6" char_array(7) = "7" char_array(8) = "8" char_array(9) = "9" randomize do while len(output) < digits num = char_array(Int((9 - 0 + 1) * Rnd + 0)) output = output + num loop gen_key = output End Function %> <% sub if_exists idkey= gen_key(7) session ("idkey")= idkey end sub %> <% if session ("idkey") > " " then idkey = session ("idkey") else call if_exists end if %> <% if idkey < " " then call if_exists end if %> <% Dim Recordset1__MMColParam Recordset1__MMColParam = "1" if (Session("loc") <> "") then Recordset1__MMColParam = Session("loc") %> <% set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_prophet_STRING Recordset1.Source = "SELECT pprate FROM pp WHERE loc = '" + Replace(Recordset1__MMColParam, "'", "''") + "'" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 3 Recordset1.Open() Recordset1_numRows = 0 %> <% set Recordset3 = Server.CreateObject("ADODB.Recordset") Recordset3.ActiveConnection = MM_prophet_STRING Recordset3.Source = "SELECT vat FROM salestax" Recordset3.CursorType = 0 Recordset3.CursorLocation = 2 Recordset3.LockType = 3 Recordset3.Open() Recordset3_numRows = 0 %> <% CCcart_SalesTax= 0 %> <% dim addvat If (session("status")) < (" ") Then addvat = 0 else addvat = Recordset3("vat") end if %> <%if not Recordset3.eof then%> <% If (session("status")) < (" ") Then 'script_and_script%> <%If (Session("loc")) = ("uk") Then 'script%> <% CCcart_SalesTax=(CCcart_SubTotal + CCcart_Shipping - CCcart_Discount) * addvat %> <% End If ' end If (Session("loc")) = ("uk") script %> <% End If ' end If (session("status")) < (" ") script_and_script%> <%end if %> <%CCcart_Shipping = 3%> <% ' 'Update cart contents ' CC_UpdateAction=Request.ServerVariables("SCRIPT_NAME") if Request("CC_UpdateCart") <> "" then for i=0 to ubound(CCcart,2) intProductID=CCcart(CC_UniqueKey,i) Quantity=trim(Request.Form("Qty" & intProductID)) isDelete=trim(Request.Form("Delete" & intProductID)) if Quantity = "" or Quantity="0" or isDelete <> "" then CCcart(CC_PRODUCTID,i)="" else if IsNumeric(Quantity) then CCcart(CC_QUANTITY,i)=Quantity end if end if next ' 'Code below to prevent Object Moved error in Netscape ' CartToCookie CCcart,"CharonCart" if Session("UpdateNumber") <> "" then Session("UpdateNumber")=Session("UpdateNumber")+1 else Session("UpdateNumber")=1 end if response.redirect Request.ServerVariables("SCRIPT_NAME") & "?UpdateNumber=" & Session("UpdateNumber") end if %> <% ' 'Kill cart by setting cookie to nothing ' if Request("RemoveAll") <> "" then Response.Cookies("CharonCart")="" if "products_wp.asp" <> "" then Response.Redirect "products_wp.asp" end if %> William Prophet & Lisa Hendry 2002
">Empty basket BASKET
 Delete
CODE
SIZE
DESCRIPTION
SIZE
COLOUR
QUANTITY
UNIT PRICE
TOTAL
<% CCcart_Shipping = 3 ' 'Begin cart repeat region ' For i=0 to ubound(CCcart,2) if CCcart(CC_PRODUCTID,i) <> "" then %> <%CCcart_Shipping = 3%>
" value="checkbox" onClick="MM_popupMsg('Now click update cart above to see effect')">  
<%= UCase(CCcart(CC_prodcat,i)) %>
<%=CCcart(CC_size,i)%>
<%= UCase(CCcart(CC_Name,i)) %>
<%= UCase(CCcart(CC_size_geo,i)) %>
" value="<%=CCcart(CC_Quantity,i)%>" size="3" class="mystyle1" onChange="MM_popupMsg('Now click update cart above to see effect')">
<%= FormatCurrency(CCcart(CC_Price,i), 2, -2, -2, -2) %>
<%= FormatCurrency(CCcart_LineTotal, 2, -2, -2, -2) %>
<% end if next 'end cart repeat region %>
SUB-TOTAL
<%= FormatCurrency(CCcart_SubTotal, 2, -2, -2, -2) %>
<% If (session("status")) < (" ") Then 'script_and_script%> <%If (Session("loc")) = ("uk") Then 'script%> <% if CCcart_SubTotal > 500 then CCcart_Shipping= 0 end if %> <% End If ' end If (Session("loc")) = ("uk") script %> <% End If ' end If (session("status")) < (" ") script_and_script%> <% If (session("status")) > (" ") Then 'script_and_script%> <%If (Session("loc")) = ("uk") Then 'script%> <% if CCcart_SubTotal > 500 then CCcart_Shipping= 0 end if %> <% End If ' end If (Session("loc")) = ("uk") script %> <%If (Session("loc")) <> ("uk") Then 'script%> <% if CCcart_SubTotal > 2500 then CCcart_Shipping= 0 end if %> <% End If ' end If (Session("loc")) <> ("uk") script %> <% End If ' end If (session("status")) > (" ") script_and_script%>
SHIPPING, P&P
<%= FormatCurrency(CCcart_Shipping, 2, -2, -2, -2) %>
<% If (Session("status")) > (" ") Then 'script %> <%If (Session("loc")) = ("uk") Then 'script%>
VAT
<% End If ' end If (Session("loc")) = ("uk") script %> <% End If ' end If (Session("status")) > (" ") script %>
<%If (Session("loc")) = ("uk") Then 'script%>
<%= FormatCurrency(CCcart_SalesTax, 2, -2, -2, -2) %>
<% End If ' end If (Session("loc")) = ("uk") script %>
TOTAL
<%= FormatCurrency(CCcart_GrandTotal, 2, -2, -2, -2) %>
<% If (session("status")) > (" ") Then 'script_and_script%> Prices do not include VAT (UK customers @ 17.5%) <% End If ' end If (session("status")) > (" ") script_and_script%> <% If (session("status")) < (" ") Then 'script_and_script%> <%If (Session("loc")) <> ("uk") Then 'script%> Prices include VAT (UK customers @ 17.5%) <% End If ' end If (Session("loc")) <> ("uk") script %> <% End If ' end If (session("status")) < (" ") script_and_script%>  
convert this amount
Click here to print orderform
<%If (Session("status")) > (" ") Then 'script%> <%if CCcart_SubTotal > 300 then%>
<%end if %> <%if CCcart_SubTotal < 300 then%>
You must order over £300 (before VAT & Shipping) to qualify for wholesale prices
<%end if %> <% End If ' end If (Session("status")) > (" ") script %> <% dim purchase purchase = " " %> <% For i=0 to ubound(CCcart,2) if CCcart(CC_PRODUCTID,i) <> "" then purchase = purchase + "prod=" & CCcart(CC_Name,i) & "(" & CCcart(CC_ProductID,i) & "-" & CCcart(CC_colour,i) & ")" & ",item_amount=" & CCcart(CC_Price,i) & "x" & CCcart(CC_Quantity,i) & "; " end if next 'end cart repeat region %> <%purchase = purchase + "prod=SHIPPING,amount=" & CCcart_Shipping & "; prod=TAX @ 0%, amount=0; prod=DISCOUNT,amount=0"%>
<%//%>

WILL TRANSPORT YOU TO A SECURE SERVER
<% Recordset2.Close() %> <% Recordset1.Close() %> <% Recordset3.Close() %>