<%@ LANGUAGE="VBScript" %> <% Response.AddHeader "cache-control", "private" %> <% Response.AddHeader "pragma", "no-cache" %> <% Response.Expires = 0 %> <% ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' System : StoreFront 2000 Version 4.00.2 ' Author : LaGarde, Incorporated ' Description : SF2k Database Upgrade ' ' Notes : There are no configurable elements in this file. ' ' COPYRIGHT NOTICE ' ' The contents of this file is protected under the United States ' copyright laws as an unpublished work, and is confidential and ' proprietary to LaGarde, Incorporated. Its use or disclosure in ' whole or in part without the expressed written permission of ' LaGarde, Incorporated is expressely prohibited. ' ' (c) Copyright 1998 by LaGarde, Incorporated. All rights reserved. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %> <% Dim DSN_Name DSN_Name = Session("DSN_Name") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open DSN_Name ORDER_ID = Request("ORDER_ID") PREV_ID = Request("PREV_ID") '***** ACQUIRE DESIGN ELEMENTS **************************************** %> <% SQLStmt = "SELECT GRAND_TOTAL from customer WHERE " _ & " CUSTOMER_ID = " & ORDER_ID & "" Set RSOrderCheck = Connection.Execute(SQLStmt) If RSOrderCheck("GRAND_TOTAL") > FormatCurrency("0") Then Response.Redirect "order_complete.asp?DSN_NAME="&DSN_NAME Connection.Close End If SQL = "SELECT * FROM Admin" Set RSAdmin = Connection.Execute(SQL) SSLPath = RSAdmin("SSL_PATH") oCountry = RSAdmin("ORIGIN_COUNTRY") oZip = RSAdmin("ORIGIN_ZIP") ShipType = RSAdmin("SHIP_TYPE") Handling = RSAdmin("HANDLING") HandlingSwitch = RSAdmin("HANDLINGSWITCH") ShipMin = RSAdmin("SHIP_MIN") TransMethod = RSAdmin("TRANSACTION_METHOD") UseCookies = RSAdmin("COOKIES") COD = RSAdmin("COD") CREDIT = RSAdmin("CREDIT") PO = RSAdmin("PO") ECHECK = RSAdmin("ECHECK") PHONEFAX = RSAdmin("PHONEFAX") CODAmt = RSAdmin("COD_AMOUNT") TaxShip= RSAdmin("TAX_SHIP") SecShipType = RSAdmin("SHIP_TYPE_2") session.LCID = Trim(RSAdmin("LCID")) set RSAdmin = nothing Country = Request("Country") State = Request("STATE") Zip = Request("DEST_ZIP") PrmShip = Trim(Request("PrmShip")) PaymentMethod = Trim(Request("PAYMENT_METHOD")) ShipMeth = Trim(Request("ShipMeth")) ShipMethName = ShipMeth If UseCookies = "1" Then If PREV_ID <> "" Then SQLStmt = "SELECT * FROM Customer WHERE CUSTOMER_ID = " & PREV_ID & "" Set RSPrevOrd = Connection.Execute(SQLStmt) %> <% End If End If SQL = "SELECT ORDERS.PRODUCT_ID, " _ & "ORDERS.PRICE, ORDERS.ATTRIBUTEA, ORDERS.ATTRIBUTEB, ORDERS.ATTRIBUTEC, " _ & "ORDERS.TOTAL, PRODUCT.WEIGHT, PRODUCT.CTAX, PRODUCT.STAX, " _ & "ORDERS.QUANTITY, ORDERS.ID, ORDERS.DESCRIPTION " _ & "FROM ORDERS, PRODUCT " _ & "WHERE ORDERS.ORDER_ID = " & ORDER_ID & " " _ & "AND ORDERS.PRODUCT_ID = PRODUCT.PRODUCT_ID" set RSOrder = Connection.Execute(SQL) CTaxSwitch = RSOrder("CTAX") STaxSwitch = RSOrder("STAX") If NOT RSOrder.EOF Then SQL = "SELECT Sum(TOTAL) AS SubTotal FROM ORDERS WHERE " _ & " ORDER_ID = " & ORDER_ID & " " set RSSumOrd = Connection.Execute(SQL) SubTotal = RSSumOrd("SubTotal") End If '****** GET COUNTRIES FOR SHIP TO LIST ********************** SQL = "SELECT country, country_abb FROM locales WHERE (active = '1' " _ & "AND country <> NULL)" set RSCountry = Connection.Execute (SQL) '****** GET STATES FOR SHIP TO LIST ************************* SQL = "SELECT state, state_abb FROM locales WHERE (active = '1' " _ & "AND state <> NULL)" set RSState = Connection.Execute (SQL) '****** GET SELECTED COUNTRY FOR SHIP TO LIST ********************** SQL = "SELECT country, country_abb FROM locales WHERE COUNTRY_ABB = '" & COUNTRY & "' " set RSSelCountry = Connection.Execute (SQL) '****** GET SELECTED STATE FOR SHIP TO LIST ************************* SQL = "SELECT state, state_abb FROM locales WHERE STATE_ABB = '" & STATE & "'" set RSSelState = Connection.Execute (SQL) If Shiptotal > 0 Then If PrmShip = "1" Then SpShipping = PrmShipping() Else StdShipping = Shipping() End If End If If StdShipping = "" Then StdShipping = 0 End If If SpShipping = "" Then SpShipping = 0 End If If CTaxSwitch = "1" Then CTax = CountryTax() End If If STaxSwitch = "1" Then STax = StateTax() End If Tax = FormatCurrency(CTax+STax) '***** CHECK FOR HANDLING CHARGE EXEMPT ORDER ************************** If HandlingSwitch = "1" Then SQL = "SELECT Count(product.PRODUCT_ID) AS CntShipExempt FROM product, orders WHERE (orders.PRODUCT_ID = product.PRODUCT_ID "_ & "AND product.SHIPSWITCH = '0'AND ORDER_ID = " & ORDER_ID & ")" Set RSCheckShip = Connection.Execute(SQL) If RSCheckShip("CntShipExempt") > 0 Then UseHandling = 0 Else UseHandling = 1 Handling = 0 End If Set RSCheckShip = nothing Else UseHandling = 0 End If '*********************************************************** '*************** CHECK FOR COD CHARGES ******************** If PaymentMethod = "COD" Then CODAmt = CODAmt Else CODAmt = 0 End If '********************** END COD ROUTINE ********************** GrandTotal = (SubTotal+StdShipping+SpShipping+Tax+Handling+CODAmt) %>
bordercolor=<%=BorderColor%> cellpadding=<%=CellPadding%> cellspacing=<%=CellSpacing%> width=<%=TableWidth%> align=<%=TableAlign%> bgcolor=<%=TableBG%>> <% CurrentRecord = 0 Do While NOT RSOrder.EOF AttA = RSOrder("AttributeA") AttB = RSOrder("AttributeB") AttC = RSOrder("AttributeC") If AttA <> "" Then ATTResponse = AttA End If If AttB <> "" Then ATTResponse = AttResponse&", "&AttB End If If AttC <> "" Then ATTResponse = AttResponse&", "&AttC End If ATTResponse = ATTResponse&" " %> <% AttResponse = "" RSOrder.MoveNext CurrentRecord = CurrentRecord = 1 Loop %> <% If CTax > 0 Then %> <% End If %> <% If STax > 0 Then %> <% End If %> <% If StdShipping <> "" or PrmShip <> "" Then %> <% End If %> <% If Handling > 0 Then %> <% End If %> <% If CODAmt > 0 Then %> <% End If %>

<%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>><%If lblProductIDActive = "1" Then%><%=lblProductID%><%Else%>Product ID<%End If%>

<%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>><%If lblDescriptionActive = "1" Then%><%=lblDescription%><%Else%>Description<%End If%>

<%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>><%If lblPriceActive = "1" Then%><%=lblPrice%><%Else%>Price<%End If%>

<%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>>Quantity

<%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>>Total

<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= RSOrder("PRODUCT_ID") %>  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= ATTResponse&RSOrder("DESCRIPTION") %>  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(RSOrder("PRICE")) %>   <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= RSOrder("QUANTITY") %>    <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(RSOrder("TOTAL")) %>  

<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Subtotal:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(SubTotal) %>
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>National Tax:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(CTax) %>
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>State or Local Tax:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(STax) %>
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><% If ShipType = "2" Then %><%=ShipMethName%><% ElseIf Request("PrmShip") = "1" Then %>Premium Shipping<% Else %>Shipping<% End If %>:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><% If Request("PrmShip") = "1" Then %><%= FormatCurrency(SpShipping) %><% ElseIf StdShipping > 0 Then%><%= FormatCurrency(StdShipping) %><% ElseIf StdShipping = "0" Then %>No Charge<% End If %>
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Handling:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(Handling) %>
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>COD Charge:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(CODAmt) %>
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Total Order:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(GrandTotal) %>
<% If PaymentMethod = "COD" Then %> <% ElseIf PaymentMethod = "CREDIT" Then %> <% ElseIf PaymentMethod = "PO" Then %> <% ElseIf PaymentMethod = "ECHECK" Then %> <% ElseIf PaymentMethod = "PHONEFAX" Then %> <% End If %> <% Connection.Close %> <% 'Session.Abandon %>