%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Set objCart=new Cart
%>
J'AMORI - CART
<%
' *** 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") Or (Recordset1("how") = "Toutie.com")) Then
'objCart.Discount = (objCart.SubTotal) * 0.25
' else objCart.Discount = (objCart.SubTotal) * 0.3
'End If
'End If
%>
<%
'
'Add customised shipping criteria to cart
if objCart.TotalWeight > 0 then
objCart.Shipping= objCart.TotalWeight
end if
%>
<%
'
'Update cart contents
'
CC_UpdateAction=Request.ServerVariables("SCRIPT_NAME")
objCart.UpdateCart
'
'Kill cart by setting cookie to nothing
'
objCart.RedirectUrl="http://www.jamori.com/cartempty.asp"
objCart.KillCart
%>
<%
'
'Redirect if cart is empty
'
if objCart.isCartEmpty then response.redirect "http://www.jamori.com/cartempty.asp"
%>