<%@ LANGUAGE="VBScript" %> <% Response.AddHeader "cache-control", "private" %> <% Response.AddHeader "pragma", "no-cache" %> <% Response.Expires = 0 %> <% Dim DSN_Name DSN_Name = Session("DSN_Name") set Connection = Server.CreateObject("ADODB.Connection") Connection.Open DSN_Name ORDER_ID = Trim(Session("ORDER_ID")) Cust_ID = Trim(Request.Cookies("CustID")) session.LCID = Session("LCID") SQL = "SELECT GRAND_TOTAL from customer WHERE " _ & " CUSTOMER_ID = " & ORDER_ID & "" Set RSOrderCheck = Connection.Execute(SQL) If FormatCurrency(RSOrderCheck("GRAND_TOTAL")) > FormatCurrency("0") Then Set RSOrderCheck = nothing Connection.Close Set Connection = nothing Response.Redirect "order_complete.asp?DSN_NAME="&DSN_NAME End If '***** MODIFY ITEMS IN CURRENT ORDER ***************************** If Request("MODIFY") = "1" Then SQL = " SELECT PRICE, DESCRIPTION, SHIP, WEIGHT FROM PRODUCT WHERE " _ & " PRODUCT_ID = '" & Request("PRODUCT_ID") & "' " set RSUpdt = Connection.Execute(SQL) SQL = "UPDATE ORDERS SET QUANTITY = " & Request("QUANTITY") & ", " _ & " SHIP = '" & XValAmt((RSUpdt("SHIP")*Request("Quantity"))) & "', " _ & " TOTAL = '" & XValAmt(((RSUpdt("Price")*Request("Quantity")))) & "', " _ & " WEIGHT = '" & XValAmt(RSUpdt("WEIGHT")*Request("Quantity")) & "' " _ & " WHERE ORDERS.ID = " & Request("ID") & " " set RSMod = Connection.Execute(SQL) Set RSMod = nothing Set RSUpdt = nothing '***** DELETE ITEMS FROM CURRENT ORDER ******************* ElseIf Request("DELETE") = "1" Then SQL = "DELETE * FROM ORDERS WHERE ID = " & Request("ID") & "" set RSDel = Connection.Execute(SQL) Set RSDel = nothing End If '***** INCLUDE DESIGN ELEMENTS ********************************** %> <% '****** GET RSAdmin DATA ************************* SQL = "SELECT * FROM Admin" set RSAdmin = Connection.Execute(SQL) SQL = "SELECT COUNTRY from locales WHERE Country_ABB = " _ & " '" & Trim(RSAdmin("ORIGIN_COUNTRY")) & "' " Set RSDefCountry = Connection.Execute(SQL) '***** SET RSAdmin VARIABLES ********************** SSLPath = Trim(RSAdmin("SSL_PATH")) OCountry = Trim(RSAdmin("ORIGIN_COUNTRY")) OZip = Trim(RSAdmin("ORIGIN_ZIP")) ShipType = Trim(RSAdmin("SHIP_TYPE")) Handling = Trim(RSAdmin("HANDLING")) DefCountry = Trim(RSDefCountry("COUNTRY")) DefCountryAbb = Trim(RSAdmin("ORIGIN_COUNTRY")) CODAmt = Trim(RSAdmin("COD_AMOUNT")) ShipMin = Trim(RSAdmin("SHIP_MIN")) HandlingSwitch = Trim(RSAdmin("HANDLINGSWITCH")) COD = Trim(RSAdmin("COD")) CREDIT = Trim(RSAdmin("CREDIT")) PO = Trim(RSAdmin("PO")) ECHECK = Trim(RSAdmin("ECHECK")) PHONEFAX = Trim(RSAdmin("PHONEFAX")) UseCookies = Trim(RSAdmin("COOKIES")) set RSAdmin = nothing %> <% '****** GET ORDER DETAIL ************************** SQL = "SELECT ORDERS.PRODUCT_ID, " _ & "ORDERS.PRICE, ORDERS.ATTRIBUTEA, ORDERS.ATTRIBUTEB, ORDERS.ATTRIBUTEC, " _ & "ORDERS.TOTAL, PRODUCT.WEIGHT, " _ & "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) '****** GET COUNTRIES FOR SHIP TO LIST ********************** SQL = "SELECT country, country_abb FROM locales WHERE (active = '1' " _ & "AND country <> NULL) ORDER BY country ASC" set RSCountry = Connection.Execute(SQL) '****** GET STATES FOR SHIP TO LIST ************************* SQL = "SELECT state, state_abb FROM locales WHERE (active = '1' " _ & "AND state <> NULL) ORDER BY state ASC" set RSState = Connection.Execute(SQL) '***** CHECK FOR HANDLING CHARGE EXEMPT ORDER ************************** SQL = "SELECT Count(product.PRODUCT_ID) AS CntShipExempt FROM product, orders WHERE (orders.PRODUCT_ID = "_ & "product.PRODUCT_ID AND ORDERS.ORDER_ID = " & ORDER_ID & " AND product.SHIPSWITCH = '1')" Set RSCheckShip = Connection.Execute(SQL) '***** CHECK FOR SHIP EXEMPT ORDER ************************** If RSCheckShip("CntShipExempt") > 0 Then 'There are items to be shipped ApplyShipping = 1 'Show Shipping SQL = "SELECT METHODS, CODE from shipping WHERE ACTIVE = '1'" set RSShipMeth = Connection.Execute(SQL) Else 'There are NO items that are being shipped ApplyShipping = 0 'Don't Show Shipping End If Set RSCheckShip = nothing If RSOrder.EOF Then %>

   

> bordercolor=<%=BorderColor%> cellpadding=<%=CellPadding%> cellspacing=<%=CellSpacing%> width=<%=TableWidth%> bgcolor=<%=TableBG%>>
<%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>>There are no items in your cart.

Back to Previous

Demo Mall Entrance

<% Else SQL = "SELECT TOTAL AS SubTotal FROM ORDERS WHERE ORDER_ID = " & ORDER_ID & " " set RSSumOrd = Connection.Execute(SQL) RSSumOrd.MoveFirst CurrentRecord = 0 Do While NOT RSSumOrd.EOF CurrTotal = CCur(RSSumOrd("SubTotal"))+CurrTotal RSSumOrd.MoveNext CurrentRecord = CurrentRecord = 1 Loop SubTotal = CurrTotal set RSSumOrd = nothing %> CasperBusiness.com - On-Line Shopping Mall

CasperBusiness.com - Shop Casper On-Line

View Cart or Check Out

> bordercolor=<%=BorderColor%> cellpadding=<%=CellPadding%> cellspacing=<%=CellSpacing%> width=<%=TableWidth%> bgcolor=<%=TableBG%>> <% RSOrder.MoveFirst 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 Set RSOrder = nothing %> "> <%Response.Write "Handling: " & Handling & "HS: " & HandlingSwitch & "AS: " & ApplyShipping If Handling > 0 AND (HandlingSwitch = "0" OR ApplyShipping = "1") Then %> <% End If %> <% If ApplyShipping = "1" Then %> <% If ShipType = "1" Then %> <% If PrmShipping > 0 Then %> <% End If %> <% ElseIf ShipType = "2" Then %> <% ElseIf ShipType = "3" Then %> <% If PrmShipping > 0 Then %> <% End If %> <% End If %> <% 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 <%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>>Modify <%=CellFontStyle%> color=<%=CellFontColor%> size=<%=FontSize%>>Delete
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= RSOrder("DESCRIPTION")&" - "&ATTResponse %> <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(RSOrder("PRICE")) %> "> <%=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%>>Handling Charges:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(Handling) %> 
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Standard Shipping:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(Shipping()) %> 
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Check here for Premium Shipping:   <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(PrmShipping()) %> 
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Please indicate the zip code to which the order will be shipped: 
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Please select the desired shipping method:  
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Standard Shipping:  <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(Shipping()) %> 
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Check here for Premium Shipping:   <%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>><%= FormatCurrency(PrmShipping()) %> 
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Please indicate the State to which the order will be shipped:  
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Please indicate the country to which the order will be shipped:  
<%=FontStyle%> color=<%=FontColor%> size=<%=FontSize%>>Payment Method:  

   
Open a New Global Location on the Internet
Commerce Developers can build your company a powerful,
flexible, and full-featured e-commerce storefront for your website.

Free Initial Consultation

This is for Demonstration Purposes Only.
Any resemblance to actual merchants is strictly coincidental.

©Copyright 1999-2005 Commerce Developers. All rights reserved. Privacy Policy

BACK

Commerce Developers - E-Commerce Solutions for Small Business
   

<% End If %> <% Connection.Close Set Connection = Nothing %>