<% ' ***** Begin the functions to be called by the runtime script *****
' To find the actual runtime code scroll WAY DOWN....
' This function is written to enable the adding of multiples of an item
' but this sample always just adds one. If you wish to add different
' quantities simply replace the value of the Querystring parameter count.
' We didn't do this because we wanted to keep the whole thing simple and
' not get into using forms so it stayed relatively readable.
Sub AddItemToCart(iItemID, iItemCount)
If dictCart.Exists(iItemID) Then
dictCart(iItemID) = dictCart(iItemID) + iItemCount
Else
dictCart.Add iItemID, iItemCount
End If
Response.Write "
" & iItemCount & " of item # " & iItemID & " have been added to your cart.
" & vbCrLf" & iItemCount & " of item # " & iItemID & " have been removed from your cart.
" & vbCrLfCouldn't find any of that item your cart.
" & vbCrLfItem # | Description | Quantity | Remove Item From Cart | Price | Totals |
<%= objKey %> | <%= aParameters(1) %> | <%= dictCart(objKey) %> | Remove One
Similar Essays |