I am created a shopping cart successfully in servletusing the following SQL "select order_id, name, price, quantity, member_id, quantity*price as sub_total from items, orders where orders.item_id=items.item_id order by order id".
What I would like to be able to do is be able to get the user to click on complete order and the following fields are captured using session and put into the purchase order table after the shopping cart is complete and the order has been paid, an example of information is provided by executing the following SQL:
getRecordToHash( rs, rsHash, aFields );
String flditem_id = (String) rsHash.get("name");
String fldorder_id = (String) rsHash.get("order_id");
String fldprice = (String) rsHash.get("price");
String fldquantity = (String) rsHash.get("quantity");
String fldsub_total = (String) rsHash.get ("sub_total");
cn.execute("insert into purchases (invoice_id, order_id, member_id, item_id, quantity")
select order_id, member_id, item_id, quanity from orders where member-id=" & Session("UserID").
response.write "Thank you for shopping with us"
end.
Sorry some of my knowledge is prelimary ASP but your help would be very much appreciated.
What I would like to be able to do is be able to get the user to click on complete order and the following fields are captured using session and put into the purchase order table after the shopping cart is complete and the order has been paid, an example of information is provided by executing the following SQL:
getRecordToHash( rs, rsHash, aFields );
String flditem_id = (String) rsHash.get("name");
String fldorder_id = (String) rsHash.get("order_id");
String fldprice = (String) rsHash.get("price");
String fldquantity = (String) rsHash.get("quantity");
String fldsub_total = (String) rsHash.get ("sub_total");
cn.execute("insert into purchases (invoice_id, order_id, member_id, item_id, quantity")
select order_id, member_id, item_id, quanity from orders where member-id=" & Session("UserID").
response.write "Thank you for shopping with us"
end.
Sorry some of my knowledge is prelimary ASP but your help would be very much appreciated.