 |
| |
 |
<%
If Request("action") <> "" then
Select Case LCase(Request("action"))
Case "update"
'Update the Quantity for selected Products
Dim objUpdateShoppingCartRS
sRetrieveShoppingCart objUpdateShoppingCartRS
With objUpdateShoppingCartRS
if .eof = false then
While NOT .eof
If CStr(request("qty" & .fields("pk").value)) <> CStr(.fields("scratch_basket_quantity").value) then
If IsNumeric(request("qty" & .fields("pk").value)) = True Then
'Update Quantity
if request("qty" & .fields("pk").value) = 0 then
fRemoveShoppingCartItem .fields("pk").value
else
fUpdateShoppingCartItemQuantity .fields("pk").value, request("qty" & .fields("pk").value)
end if
End If
end if
If request("chkPID" & .fields("pk").value) = "1" then
'Remove Item
fRemoveShoppingCartItem .fields("pk").value
end if
.movenext
Wend
end if
End With
Set objUpdateShoppingCartRS = Nothing
Case Else
End Select
end if
Dim objShoppingCartRS
sRetrieveShoppingCart objShoppingCartRS
Dim strShoppingCart_Image
Dim intShoppingCart_First
Dim intShoppingCart_Last
Dim intShoppingCart_Total
Dim strShoppingCart_PageLinks
Dim mnyShoppingCartItem
mnyShoppingCartItem = 0
ShoppingCartSubTotal = 0
With objShoppingCartRS
if .eof = false then
sCalculateRecordCounts objShoppingCartRS, intShoppingCart_First, intShoppingCart_Last, intShoppingCart_Total
strShoppingCart_PageLinks = fCalculatePageTotals(fGenerateLink("shopping_cart.asp"), .PageCount)
%>
<%
Else
'No Items in cart Yet
%>
 |
YOUR SHOPPING CART IS CURRENTLY EMPTY... |
|
<%
End If
End With
Set objShoppingCartRS = Nothing
%>
|
 |
|
|