Added: February/05/2005 at 4:39am | IP Logged
|
|
|
i am facing a problem to edit the member's shopping cart details. more specifically, edit the number of quantity for an item.
the coding will look like as following:
------------------------------------------------------------ ------------------------------
ShoppingCart.asp
------------------------------------------------------------ ------------------------------
<table border = "1" > <form name="frmCart" action="EditCart.asp" method="post"> <tr bgcolor="#333366"> <th> <font color="#FFFFFF" > <b> Product </b> </font> </th> <th> <font color="#FFFFFF" > <b> Color </b> </font> </th> <th> <font color="#FFFFFF" > <b> Price (RM) </b> </font> </th> <th width="3"> <font color="#FFFFFF" > <b> Quantity </b> </font> </th> <th> <font color="#FFFFFF" > <b> Total (RM) </b> </font> </th> <th> <font color="#FFFFFF" > <b> Remove Product </b> </font> </th> <th> <font color="#FFFFFF" > <b> Update Product </b> </font> </th> </tr> <% dim total_order total_order = 0 while not rs.eof %> <tr bgcolor="#FFFF66"> <td align="center"><%= rs("itemid") %></td> <td align="center"> <%= rs("color") %></td> <td align="center"> <%= rs("price") %></td> <td width="5" align="center"><input type="textbox" name="txtQ" value=<%= rs("quantity") %> ></td> <td align="center"> <!-- display the total value of the item (price * quantity) --> <%= (rs("quantity") * rs("price")) %> <!-- increase the total amount of the order by adding the total value of each item --> <% total_order = total_order + (rs("quantity") * rs("price")) %> </td> <td align="center"> <!-- edit item image--> <a href= "EditCart.asp?cartid= <%= rs("cartid") %>&quantity=txtQ.value" > EDIT </a> </td> <td align="center"> <!-- delete item image--> <a href="DeleteCart.asp">DELETE </td> </tr> <% rs.movenext wend %> <tr><td></td> <td></td> <td></td> <td align="right"><b> Total Amount: </b></td> <!-- displaying the total amount of the order --> <td align="center"><b><%= total_order %><b> </td> <td></td> </tr> </form> </table>
------------------------------------------------------------ --------------------------------
the main problem is that i enable to pass the cartid to EditCart.asp, but unable to pass the new Quantity value in txtQ textbox.
can you guys help me to solve it? please...............
|