order tracker
· Below you can find details of your current orders.
<%
set rsorder=("select * from orders where custid=" & session("custid"))
if rsorder.eof then
%>
You have no orders at the moment.
<%
else
while not(rsorder.eof)
%>
| >Delete |
Item |
Quantity |
Price Each |
Total |
| Delete |
Item |
Quantity |
Price Each |
Total |
<%
wend
end if
'Display contents of shopping cart
acart=session("cart")
subtotal=0
for i=lbound(acart) to ubound(acart)
if acart(i,0)<>"" and acart(i,1)<>"" then
set rscart=db.execute("select name,productid,price,saleprice from products where productid=" & acart(i,0))
if rscart("saleprice")="" or rscart("saleprice")=0 then
currentprice=rscart("price")
else
currentprice=rscart("saleprice")
end if
%>
 |
"><%= rscart("name") %>
|
<%= acart(i,1) %> |
<%= cursymbol & formatnumber(currentprice)%> |
<%= cursymbol & formatnumber(currentprice * acart(i,1)) %> |
<%
subtotal=subtotal+(currentprice * acart(i,1))
end if
next
%>
|
|
Subtotal: <%= cursymbol & formatnumber(subtotal) %> |
|
<% footer %>
<%
db.close
set db=nothing
%>