%@LANGUAGE="VBSCRIPT"%> <% if request.querystring("remove") = "yes" then Set Conn = Server.CreateObject("ADODB.Connection") conn.open MM_cn_apack_STRING mySQL = "DELETE FROM tbl_cart WHERE ct_id ="&request.querystring("ct_id")&"" Conn.Execute(mySQL) end if if request.form("updateqty") = "yes" then Dim cart Dim cart_numRows Set cart = Server.CreateObject("ADODB.Recordset") cart.ActiveConnection = MM_cn_apack_STRING cart.Source = "SELECT * from tbl_cart where ct_session_id = "&session("idorder")&"" cart.CursorType = 0 cart.CursorLocation = 2 cart.LockType = 1 cart.Open() Set Conn = Server.CreateObject("ADODB.Connection") conn.open MM_cn_apack_STRING SQL3 = "UPDATE tbl_cart SET ct_qty = 1 where ct_session_id = "&session("idorder")&"" Conn.Execute(SQL3) while not cart.eof if request.form("qty"&cart("ct_id")) <> "" then ct_id = cart("ct_id") ct_qty = request.form("qty"&cart("ct_id")) SQL2 = "UPDATE tbl_cart SET ct_qty = "&ct_qty&" where ct_id = "&ct_id&"" Conn.Execute(SQL2) end if cart.movenext() wend conn.close() cart.Close() Set cart = Nothing end if %> <% strconnect = "SELECT tbl_cart.*, tbl_product.* from tbl_cart INNER JOIN tbl_product ON tbl_cart.pd_id = tbl_product.pd_id" if session("idorder") <> "" then strconnect = strconnect & " where tbl_cart.ct_session_id="&session("idorder")&"" end if Dim rs_cart Dim rs_cart_numRows Set rs_cart = Server.CreateObject("ADODB.Recordset") rs_cart.ActiveConnection = MM_cn_apack_STRING rs_cart.Source = strconnect rs_cart.CursorType = 0 rs_cart.CursorLocation = 2 rs_cart.LockType = 1 rs_cart.Open() rs_cart_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rs_cart_numRows = rs_cart_numRows + Repeat1__numRows %>

There are currently no products in your shopping cart.
<%end if%>