<%@ LANGUAGE="VBScript" %><% Response.AddHeader "cache-control", "private" %><% Response.AddHeader "pragma", "no-cache" %><% Response.Expires = 0 %> <% ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' System : StoreFront 99 v.3.0.1 ' ' Author : LaGarde, Incorporated ' ' 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,1999 by LaGarde, Incorporated. All rights reserved. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %><% Dim DSN_Name DSN_Name = Session("DSN_Name") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open "DSN="&DSN_Name&"" If Request("MODIFY") = "1" Then SQLStmt = " SELECT PRICE, DESCRIPTION FROM PRODUCT WHERE " SQLStmt = SQLStmt & " PRODUCT_ID = '" & Request("PRODUCT_ID") & "' " Set RSUpdt = Connection.Execute(SQLStmt) MyCurrSymbol = FormatCurrency(1) MyCurrSymbol = Replace((MyCurrSymbol),"1","") MyCurrSymbol = Replace((MyCurrSymbol),",","") MyCurrSymbol = Replace((MyCurrSymbol),".","") MyCurrSymbol = Replace((MyCurrSymbol),"0","") ProdPrice = Replace(RSUpdt("Price"),MyCurrSymbol,"") rPrice = Replace((ProdPrice),",",".") ExtPrice = (RSUpdt("Price")*Request("Quantity")) ExtPrice = Replace((ExtPrice),MyCurrSymbol,"") RExtPrice = Replace((ExtPrice),",",".") SQLStmt = "UPDATE ORDERS SET QUANTITY = " & Request("QUANTITY") & ", " SQLStmt = SQLStmt & " TOTAL = " & RExtPrice & " " SQLStmt = SQLStmt & " WHERE ORDERS.ID = " & Request("ID") & " " Set RSMod = Connection.Execute(SQLStmt) ElseIf Request("DELETE") = "1" Then SQLStmt = "DELETE * FROM ORDERS WHERE ID = " & Request("ID") & "" Set RSDel = Connection.Execute(SQLStmt) End If SQLStmt = "SELECT * FROM Admin" Set RSAdmin = Connection.Execute(SQLStmt) SSLPath = RSAdmin("SSL_PATH") TaxCountry = RSAdmin("TAX_COUNTRY") CountryTaxAmt = RSAdmin("COUNTRY_TAX_AMOUNT") TaxState = RSAdmin("TAX_STATE") StateTaxAmt = RSAdmin("STATE_TAX_AMOUNT") ShippingA = CCur(RSAdmin("SHIPPING_A")) ShipAAmt = CCur(RSAdmin("SHIPA_AMOUNT")) ShippingB = CCur(RSAdmin("SHIPPING_B")) ShipABAmt = CCur(RSAdmin("SHIPAB_AMOUNT")) ShippingC = CCur(RSAdmin("SHIPPING_C")) ShipBCAmt = CCur(RSAdmin("SHIPBC_AMOUNT")) ShippingD = CCur(RSAdmin("SHIPPING_D")) ShipCDAmt = CCur(RSAdmin("SHIPCD_AMOUNT")) ShippingE = CCur(RSAdmin("SHIPPING_E")) ShipDEAmt = CCur(RSAdmin("SHIPDE_AMOUNT")) ShippingF = CCur(RSAdmin("SHIPPING_F")) ShipEFAmt = CCur(RSAdmin("SHIPEF_AMOUNT")) ShipF_UpAmt = CCur(RSAdmin("SHIPF_UP_AMOUNT")) SpShipAmt = CCur(RSAdmin("SPECIAL_SHIP_AMOUNT")) SpShipAAmt = CCur(ShipAAmt+(RSAdmin("SPECIAL_SHIP_AMOUNT"))) SpShipBAmt = CCur(ShipABAmt+(RSAdmin("SPECIAL_SHIP_AMOUNT"))) SpShipCAmt = CCur(ShipBCAmt+(RSAdmin("SPECIAL_SHIP_AMOUNT"))) SpShipDAmt = CCur(ShipCDAmt+(RSAdmin("SPECIAL_SHIP_AMOUNT"))) SpShipEAmt = CCur(ShipDEAmt+(RSAdmin("SPECIAL_SHIP_AMOUNT"))) SpShipFAmt = CCur(ShipEFAmt+(RSAdmin("SPECIAL_SHIP_AMOUNT"))) SpShipF_UpAmt = CCur(ShipF_upAmt+(RSAdmin("SPECIAL_SHIP_AMOUNT"))) 'Here we get the order detail for the current customer's order SQLStmt = "SELECT ORDERS.PRODUCT_ID, " SQLStmt = SQLStmt & "ORDERS.PRICE, " SQLStmt = SQLStmt & "ORDERS.TOTAL, " SQLStmt = SQLStmt & "ORDERS.QUANTITY, ORDERS.ID, PRODUCT.DESCRIPTION " SQLStmt = SQLStmt & "FROM ORDERS, PRODUCT " SQLStmt = SQLStmt & "WHERE ORDERS.ORDER_ID = " & Session("ORDER_ID") & " " SQLStmt = SQLStmt & "AND ORDERS.PRODUCT_ID = PRODUCT.PRODUCT_ID" 'Response.Write SQLStmt SET RSOrder = Connection.Execute(SQLStmt) If NOT RSOrder.EOF Then Set RSProduct = Connection.Execute(SQLStmt) SQLStmt = "SELECT Sum(TOTAL) AS SubTotal " SQLStmt = SQLStmt & "FROM ORDERS WHERE " SQLStmt = SQLStmt & " ORDER_ID = " & Session("ORDER_ID") & " " Set RSSumOrd = Connection.Execute(SQLStmt) SQLStmt = "SELECT (Sum(TOTAL) * " & CountryTaxAmt & ") AS CountryTax " SQLStmt = SQLStmt & "FROM ORDERS WHERE " SQLStmt = SQLStmt & " ORDER_ID = " & Session("ORDER_ID") & " " Set RSCountryTax = Connection.Execute(SQLStmt) SQLStmt = "SELECT (Sum(TOTAL) * " & StateTaxAmt & ") AS StateTax " SQLStmt = SQLStmt & "FROM ORDERS WHERE " SQLStmt = SQLStmt & " ORDER_ID = " & Session("ORDER_ID") & " " Set RSStateTax = Connection.Execute(SQLStmt) If RSSumOrd("SubTotal") <= CCur(ShippingA) Then Shipping = ShipAAmt ElseIf ((RSSumOrd("SubTotal") > CCur(ShippingA)) AND (RSSumOrd("SubTotal") <= CCur(ShippingB))) Then Shipping = ShipABAmt ElseIf ((RSSumOrd("SubTotal") > CCur(ShippingB)) AND (RSSumOrd("SubTotal") <= CCur(ShippingC))) Then Shipping = ShipBCAmt ElseIf ((RSSumOrd("SubTotal") > CCur(ShippingC)) AND (RSSumOrd("SubTotal") <= CCur(ShippingD))) Then Shipping = ShipCDAmt ElseIf ((RSSumOrd("SubTotal") > CCur(ShippingD)) AND (RSSumOrd("SubTotal") <= CCur(ShippingE))) Then Shipping = ShipDEAmt ElseIf ((RSSumOrd("SubTotal") > CCur(ShippingE)) AND (RSSumOrd("SubTotal") <= CCur(ShippingF))) Then Shipping = ShipEFAmt ElseIf RSSumOrd("SubTotal") > CCur(ShippingF) Then Shipping = ShipF_UpAmt End If If RSSumOrd("SubTotal") <= CCur(ShippingA) Then SpShipping = SpShipAAmt End If If ((RSSumOrd("SubTotal") > CCur(ShippingA)) AND (RSSumOrd("SubTotal") <= CCur(ShippingB))) Then SpShipping = SpShipBAmt End If If ((RSSumOrd("SubTotal") > CCur(ShippingB)) AND (RSSumOrd("SubTotal") <= CCur(ShippingC))) Then SpShipping = SpShipCAmt End If If ((RSSumOrd("SubTotal") > CCur(ShippingC)) AND (RSSumOrd("SubTotal") <= CCur(ShippingD))) Then SpShipping = SpShipDAmt End If If ((RSSumOrd("SubTotal") > CCur(ShippingD)) AND (RSSumOrd("SubTotal") <= CCur(ShippingE))) Then SpShipping = SpShipEAmt End If If ((RSSumOrd("SubTotal") > CCur(ShippingE)) AND (RSSumOrd("SubTotal") <= CCur(ShippingF))) Then SpShipping = SpShipEAmt End If If RSSumOrd("SubTotal") > CCur(ShippingF) Then SpShipping = SpShipF_UpAmt End If End If %> <% If Not RSOrder.EOF Then %>
<% CurrentRecord = 0 Do While NOT RSOrder.EOF %> <% RSOrder.MoveNext CurrentRecord = CurrentRecord = 1 Loop %> &DSN_Name=<%= Session("DSN_Name") %>" onsubmit="return FrontPage_Form3_Validator(this)" name="FrontPage_Form3">
Description Price Quantity Total Modify Qty Delete
<%= RSOrder("DESCRIPTION") %> <%= FormatCurrency(RSOrder("PRICE"),2) %> "> <%= FormatCurrency(RSOrder("TOTAL"),2) %> "> "> ">
">">

SubTotal:  <%= FormatCurrency(RSSumOrd("SubTotal"),2) %> 
<% If TaxState = "Not Applicable" Then %><%= TaxCountry %><% Else %><%= TaxState %><% End If%> Tax (if applicable): <%= FormatCurrency(RSStateTax("StateTax"),2) %> 
Standard Shipping:  <%= FormatCurrency(Shipping,2) %> 
Please indicate the country to which the order will be shipped:  
Please indicate the state or Province to which the order will be shipped:  
<% Else %>
There are no items in your cart.
<% End If %> <% Connection.Close %>