%
UserID=request("UserID")
ProdID=request("ProdID")
SelecteAll=request("SelecteAll")
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open Application("ConStr")
set objRS = Server.CreateObject("ADODB.Recordset")
mybasket = "
| A/A | ΚΩΔΙΚΟΣ | ΠΡΟΪΟΝ | ΠΟΣΟΤ. | ΑΞΙΑ ΜΟΝ. |
"
i = 1
if SelecteAll <> 1 then 'ekteleite otan pataei to add tou basket
SQL_INS = "Insert INTO [Order] (UserID, ItemID, ItemQuantity) values (" & UserID & "," & ProdID & ",1)"
objConn.execute(SQL_INS)
' * * * * * Getting all basket Items * * * * * *
SQL_GET_ALL_BASKET_ITEMS = "Select ItemID from [Order] where UserID = " & UserID
objRS.open SQL_GET_ALL_BASKET_ITEMS, objConn, 3,1,1
if not objRS.EOF then
session("BasketItemsCounter") = objRS.RecordCount
session("BasketItems") = objRS.getRows()
end if
objRS.close
' * * * * * Getting all basket Items 4 layer * * * * * *
SQL_GET_ALL_BASKET_ITEMS_4_LAYER = "Select * from ShowBasket where UserID = " & UserID
objRS.open SQL_GET_ALL_BASKET_ITEMS_4_LAYER, objConn, 3,1,1
if not objRS.EOF then
while not objRS.EOF
mybasket = mybasket & "| " & i & " | " & objRS("ItemID") & " | " & objRS("ProdDescr") & " | " & objRS("ItemQuantity") & " | " & objRS("ProdPriceBulk") & " € |
"
i = i + 1
objRS.movenext
wend
Starting = ""
response.write ""
end if
objRS.close
else
SQL_GET_ALL_BASKET_ITEMS = "Select ItemID from [Order] where UserID = " & UserID
objRS.open SQL_GET_ALL_BASKET_ITEMS, objConn, 3,1,1
if not objRS.EOF then
session("BasketItemsCounter") = objRS.RecordCount
session("BasketItems") = objRS.getRows()
end if
objRS.close
end if
if objRS.state>0 then objRS.close
set objRS = nothing
objConn.close
set objConn = nothing
%>