Empty
Cart
· Hey ! Your
Shopping Cart is Empty!
<%
else
%>
Contents
of Shopping Cart
· Change your order by clicking on the item name below.
· Delete an item by clicking the "delete item" button to the
left of it.
· Continue shopping by selecting a department above.
| Delete |
Item |
Quantity |
Price Each |
Total |
<%
'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
Dim rscart
Set rscart = Server.CreateObject("ADODB.Recordset")
Dim strSQLE
strSQLE="SELECT * FROM com_products where pro_id LIKE '" & acart(i,0) &"%'"
rscart.Open strSQLE, conTOdb
'set rscart=db.execute("select Product_Name, Product_Code, Price, Sale_Price from prod_data where productid=" & acart(i,0))
currentprice=rscart("pro_price")
%>
| delete |
<%= rscart("pro_name") %>
|
<% qty = acart(i,1)
response.write qty %> |
<% pro_price =cursymbol & formatnumber(currentprice)
Response.write pro_price %> |
<% total_price = formatnumber(qty*pro_price)
Response.write total_price%> |
<%
subtotal=subtotal+(pro_price* qty)
end if
next
tax=subtotal*taxrate/100
%>
|
|
Grand Total: |
<%= cursymbol & formatnumber(subtotal+tax) %> |