shopping cart
I have a table called shoppinggift registry which stores the items users adds as gifts
and includes these fields:
productID,Quantity,UnitPrice
I have another table called shoppingCart and as the name says it stores the products of stores which are added to shopping cart
fields are:orderID,productID,price
Now i have output the table to show for ex all the gifts of user A on the page
for ex he has 3 gifts
how can I add these records on the next page(when user clicks checkout) to the shopping cart
if it was 1 records i could use a hidden ID field but now these are more than 1 field
here is the page:
set RsReg=server.createobject("adodb.recordset")
RsReg.open "select P.productID,P.productName,R.productID,R.regID,R.un itPrice,R.amountRemain,R.Quantity from Shop_registryItems R left outer join Shop_Products P on R.productID=P.productID where regID=" & intID ,Conn,0,1
if rsReg.eof then
%>
<table class=err align=center>
<tr>
<td>
<p align="center">item does not exist</td>
</tr>
</table>
<%
response.end
end if
session("userGiftRegistryID")=rsReg("regID")
%>
<br>
<form action="checkoutRegistry.asp" method="post" id="form1" name="form1" >
<table class=subnav2 align=center>
<tr bgcolor="#ff9900">
<td width="44%" align="center" valign="center" ><strong>Product Name<strong></strong></strong></td>
<td width="22%" align="center" valign="center"><strong>Quantity<strong></strong></strong></td>
<td width="23%" align="center" valign="center"><strong>Unit Price<strong></strong></strong></td>
<td width="25%" align="center" valign="center" ><strong>Balance Remaining<strong></strong></strong></td>
<td width="15%" align="center" valign="center" ><strong>Quantity<strong></strong></strong></td>
<td width="25%" align="center" valign="center" ><strong>Partial Purchase<strong></strong></strong></td>
</tr>
<%
while not RsReg.EOF
intProdID = RsReg("productID")
%>
<input type=hidden name=pid value="<%= rsReg("productID") %>">
<tr>
<td width="15%" valign="center" align="left" nowrap> <%= rsReg("productName") %></td>
<td width="22%" align="center"> <%= rsReg("quantity") %> </td>
<td width="23%" align="center"> <%= rsReg("unitPrice") %>$ </td>
<td width="44%" align="left"> <%= rsReg("amountRemain") %>$ </td>
<td width="16%" align="center">
<input name="quant<%= intProdID %>" size="3" value="1" class=field>$
</td>
<td width="25%" align="right">
OR $<input name="quant<%= intProdID %>" size="3" value="" class=field>
</td>
</tr>
<%
RsReg.MoveNext
wend
RsReg.Close
set RsReg = Nothing
%>
|