<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Set objCart=new Cart %> J'AMORI - Checkout <% ' *** Restrict Access To Page: Grant or deny access to this page MM_authorizedUsers="1" MM_authFailedURL="http://www.jamori.com/login.asp?log=false" MM_grantAccess=false If Session("MM_Username") <> "" Then If (false Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then MM_qsChar = "?" If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %> <% Dim Recordset1__MMColParam Recordset1__MMColParam = "1" If (Session("mm_Username") <> "") Then Recordset1__MMColParam = Session("mm_Username") End If %> <% Dim Recordset1 Dim Recordset1_numRows Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_msjamori_STRING Recordset1.Source = "SELECT * FROM customers WHERE Username = '" + Replace(Recordset1__MMColParam, "'", "''") + "'" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 1 Recordset1.Open() Recordset1_numRows = 0 %> <% 'calculate discount based on who logged in 'If Not Recordset1.eof Then ' if it is not empty then do this 'If Recordset1("how") = "Grande Dame" Then 'objCart.Discount = (objCart.SubTotal) * 0.25 ' else objCart.Discount = (objCart.SubTotal) * 0.3 'End If 'End If %> <% Dim Orders Dim Orders_numRows Set Orders = Server.CreateObject("ADODB.Recordset") Orders.ActiveConnection = MM_msjamori_STRING Orders.Source = "SELECT * FROM Orders" Orders.CursorType = 0 Orders.CursorLocation = 2 Orders.LockType = 1 Orders.Open() Orders_numRows = 0 %> <% Dim Orderdetails Dim Orderdetails_numRows Set Orderdetails = Server.CreateObject("ADODB.Recordset") Orderdetails.ActiveConnection = MM_msjamori_STRING Orderdetails.Source = "SELECT * FROM OrderDetails" Orderdetails.CursorType = 0 Orderdetails.CursorLocation = 2 Orderdetails.LockType = 1 Orderdetails.Open() Orderdetails_numRows = 0 %> <% ' 'Add customised shipping criteria to cart if objCart.TotalWeight > 0 then objCart.Shipping=objCart.TotalWeight else objCart.Shipping = 0 end if %> <% ' 'Insert record into Orders recordset when form is submitted 'and store the unique OrderID ' CC_OrderAction=Request.ServerVariables("SCRIPT_NAME") if Request("CC_OrderInsert") <> "" then objCart.OrdersTable="dbo.Orders" objCart.OrdersConnectionString=MM_msjamori_STRING objCart.OrderKey="OrderID" objCart.InsertOrder Session("OrderID")=objCart.OrderID end if %> <% ' '**Save cart to OrderDetails table in Database** ' if Request("CC_OrderInsert") <> "" then objCart.OrderDetailsTable="dbo.OrderDetails" objCart.OrderDetailsConnectionString=MM_msjamori_STRING objCart.Bindingvalues=("InventoryID,Quantity,Designer,Price,,,Colour,,Size,ProductID,Member,,Sale,Cost") objCart.Bindingcolumns=("ProductID,Quantity,Name,Price,Weight,Key,Colour,Thumbnail,Size,Style,Member,Soldfor,Sale,Cost") objCart.OrderIdColumn="OrderID" objCart.InsertOrderDetails end if %> <% ' 'Redirect if cart is empty ' if objCart.isCartEmpty then response.redirect "http://www.jamori.com/cartempty.asp" %> <% ' 'Redirect after submitting Cart info to Database ' if Request("CC_OrderInsert") <> "" then Response.Redirect "http://www.jamori.com/myordermail.asp" end if ' 'Add sales tax from value in recordset ' if not Recordset1.eof then if Recordset1("Shippingstate") = "MO" then objCart.SalesTax=((objCart.SubTotal)-(objCart.Discount)) * 0.0785 else if Recordset1("Shippingstate") = "" then if Recordset1("Billingstate")="mo" then objCart.SalesTax=((objCart.SubTotal)-(objCart.Discount)) * 0.0785 else objCart.SalesTax=0 end if end if %>
<% ' 'Begin cart repeat region ' For i=0 to objCart.NumberItems - 1 %> <% next 'end cart repeat region %>
 
 
Designer
Size
Quantity
Retail Price
Member Price
Total  
 
 
<%=objCart.GetCartValue("Name",i)%>
<%=objCart.GetCartValue("Size",i)%>
<%=objCart.GetCartValue("Quantity",i)%>
<%=objCart.GetCartValue("Price",i)%>
<%=objCart.GetCartValue("Member",i)%>
<%=objCart.LineTotal(i)%>  
 
   

 

      SubTotal: $ 
<%= FormatNumber(objCart.SubTotal, 2, -2, -2, -2) %>  
 
 
Member Discount: $ 
<%= FormatNumber(objCart.Discount, 2, -2, -2, -2) %>  
 
 

**Visit the "shipping charges" link on the menu for additional information    Shipping: $ 

**<%= FormatNumber(objCart.Shipping, 2, -2, -2, -2) %>  

 
 

Sales Tax: $ 

<%= FormatNumber(objCart.SalesTax, 2, -2, -2, -2) %>  

 
 
Total: $
<%= FormatNumber(objCart.GrandTotal, 2, -2, -2, -2) %>  
 
 
Order Number : <% Dim fs, i, x Dim strTemp Set fs = CreateObject("Scripting.FileSystemObject") 'Get just the filename part of the temp name path strTemp = fs.GetBaseName(fs.GetTempName) strTemp = Right(strTemp, Len(strTemp) - 3) rndNum=("MRO05J-"&(Recordset1.Fields.Item("CustomerID").value)&"-"&strTemp) 'Response.Write strTemp Response.write(rndNum) Set fs = Nothing ' set objTools = Server.CreateObject("MSWC.Tools") 'rndNum1=Abs(objTools.Random) Mod 9 + 1 ' rndNum2=Abs(objTools.Random) Mod 10 ' rndNum3=Abs(objTools.Random) Mod 10 ' rndNum4=Abs(objTools.Random) Mod 10 ' rndNum5=Abs(objTools.Random) Mod 10 ' rndNum6=Abs(objTools.Random) Mod 10 ' rndNum7=Abs(objTools.Random) Mod 10 ' rndNum8=Abs(objTools.Random) Mod 10 ' rndNum9=Abs(objTools.Random) Mod 10 ' rndNum10=Abs(objTools.Random) Mod 10 ' rndNum11=Abs(objTools.Random) Mod 10 'rndNum=("JM" & rndNum1 & rndNum2 & "RO"& rndNum3 & rndNum4 & rndNum5 & rndNum6 & rndNum7&rndNum8 &rndNum9 &rndNum10 &rndNum11) 'Response.write(rndNum) %> "> <%Dim TimeKey TimeKey = now() %>
 
 
<%=(Recordset1.Fields.Item("Firstname").Value)%> <%=(Recordset1.Fields.Item("Middleinitial").Value)%> <%=(Recordset1.Fields.Item("Lastname").Value)%>   TO EDIT YOUR PERSONAL INFORMATION, CLICK (MY ACCOUNT) ON THE MENU
Daytime telephone #:  <%=(Recordset1.Fields.Item("Daytimephone").Value)%>
  Billing address:
<%=(Recordset1.Fields.Item("Billingaddress1").Value)%>
<%=(Recordset1.Fields.Item("Billingaddress2").Value)%>
<%=(Recordset1.Fields.Item("Billingcity").Value)%> <%=(Recordset1.Fields.Item("Billingstate").Value)%>  <%=(Recordset1.Fields.Item("Billingzip").Value)%>
<%=(Recordset1.Fields.Item("Billingcountry").Value)%>
  Shipping address:*
<%=(Recordset1.Fields.Item("Shippingaddress1").Value)%>
<%=(Recordset1.Fields.Item("Shippingaddress2").Value)%>
<%=(Recordset1.Fields.Item("Shippingcity").Value)%> <%=(Recordset1.Fields.Item("Shippingstate").Value)%>  <%=(Recordset1.Fields.Item("Shippingzip").Value)%>
<%=(Recordset1.Fields.Item("Shippingcountry").Value)%>
   
 
* Shipping address is listed only if different from billing, in which case it has to be listed with your credit card provider as an alternate address....NO EXCEPTIONS... For your protection, the order will not be processed unless both addresses are verified.
                                 
  Credit card type                
  Card number
  CVV    
       
  Expiration date
(example: 12/04)
         
  Special request:
                 
     
STOP
MAKE SURE YOUR BILLING/SHIPPING ADDRESSES ARE CORRECT
To edit your personal information, visit the "my account"-- To edit your items go to "view cart"-- both links are on the menu
 
 
<% Set objCart=Nothing %> <% Set objCart=Nothing %> <% Set objCart=Nothing %> <% Recordset1.Close() Set Recordset1 = Nothing %> <% Orders.Close() Set Orders = Nothing %> <% Orderdetails.Close() Set Orderdetails = Nothing %>