Ask a Question related to Dreamweaver AppDev, Design and Development.
-
mbwete #1
Shopping Cart Error...
Hi everyone,
The following code is for adding items selected into a cart, but im getting an
erro on line 28; which says
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'ubound'
/project/AddToCart.asp, line 28
Please ,please help. Here is the code
Thank you very much,
Grace
<%@LANGUAGE="VBSCRIPT"%>
<%
Dim Products__value
Products__value = "0"
if (Request("ProductID") <> "") then Products__value = Request("ProductID")
%>
<%
Dim strSQL3
Set conn= Server.CreateObject("ADODB.Connection")
conn.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
Source=D:\web\projects\99117741\project\pelahet.md b;"
strSQL3= "SELECT * FROM Products WHERE ProductID=" + Replace(Products__value,
"'", "''") + ""
set Products = Server.CreateObject("ADODB.Recordset")
Products.CursorType = 0
Products.CursorLocation = 2
Products.LockType = 3
Products.Open strSQL3, conn
Products_numRows = 0
%>
<%
'**Add to cart from Link on previous page**
'**Charon Cart**
'
Randomize Timer
isFound=true
for i=0 to ubound(CCcart,2) [Line 28]
if CCcart(CC_ProductID,i) = cstr(Products("ProductID")) then
CCcart(CC_Quantity,i) = CCcart(CC_Quantity,i) + 1
isFound=false
exit for
end if
if not isFound then
for i=0 to ubound(CCcart,2)
if CCcart(CC_ProductID,i) = "" then
CCcart(CC_ProductID,i)=Products("ProductID")
CCcart(CC_Quantity,i)=("1")
CCcart(CC_Name,i)=Products("Product")
CCcart(CC_Price,i)=Products("Price")
CCcart(CC_Size,i)=Request("Size")
CCcart(CC_Colour,i)=Request("Colour")
CCcart(CC_UniqueKey,i)=int(rnd*9999999)+10000000
exit for
end if
next
end if
CartToCookie CCcart,"PelahetCart"
CC_RedirectURL="ShoppingCart.asp"
Response.Redirect "ShoppingCart.asp"
next
%>
<html>
<head>
<title>Add from Link</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
<%
Products.close
conn.close
set Products = nothing
%>
mbwete Guest
-
Like a Shopping Cart but -NOT- a Shopping Cart
Have you ever seen www.apple.com/store? And if you noticed when you choose G5 for example... you select the kind of MAC and then you can customize... -
Shopping cart Parameter error
Hi, I am trying to create an 'add to cart' link. I am trying to pass the unique MerchID value of the product (from an access database) to the cart.... -
Shopping Cart Error
Hi everyone, The following code is for adding items selected into a cart, but im getting an erro on line 28; which says Error Type: Microsoft... -
shopping cart shopping
Im looking to buy some ecommerce software to hook up to an HTML site. The company will have around 350 products or so to start out, and will be... -
JS shopping cart
peterct07@yahoo.com (Peter Cartwright) wrote in message news:<b6141bd7.0307171525.1c322082@posting.google.com>... Oops wrong forum



Reply With Quote

