Modify the shopping cart (Section 26.3) to include a feature that allows a user to update their cart. Modify view- cart.asp (Fig. 26.7) to allow users to edit an item’s quantity. Use the value zero to indicate the removal of an item (i.e., set the quantity to zero). Write a document named updatecart.asp that updates the quantities stored in the cookie. After the quantities have been updated, the user is redirected to viewcart.asp. Also modify viewcart.asp to provide an Update Cart button that, when clicked, redirects the user to updatecart.asp.
What will be an ideal response?
The first table contains viewcart.asp and the second table contains updatecart.asp.
```
1 <% @LANGUAGE = VBScript %>
2 <% Option Explicit %>
3
4 <% ' viewcart.asp %>
5
6
7
8
9
10
11
12
13
14
15
16
17
18 <% Dim i, j, splitArray, quantity, total, subtotal, count
19
20 count = Fix( Request.Cookies( "Books" ).count / 2 )
21 If Request.Cookies( "Books" ) = "" Or _
22 CInt( Request.Cookies( "Books" )( "empty" ) ) = count Then %>
23
24
25
26 Your cart is empty.
27
28
29
30
31 <% Else %>
32
33 CELLPADDING = "0" CELLSPACING = "3">
34
35