Home | Advertising Info13 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Monday, May 20, 2024  

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Advanced
 PowerASP Code Help Area : Classic ASP - Advanced
Subject Topic: edit shopping cart Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
chanling10
Newbie
Newbie


Joined: January/22/2005
Online Status: Offline
Posts: 2
Posted: February/05/2005 at 4:39am | IP Logged Quote chanling10

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...............

Back to Top View chanling10's Profile Search for other posts by chanling10
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages asp search engine active server page asp application components tutorial CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com