Register    Login    Forum    Search    FAQ

Board index » Main Support Area » ASP Support Fourm




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Type Mismatch
 Post Posted: Sun Oct 19, 2008 10:25 pm 
Offline

Joined: Sun Oct 19, 2008 10:16 pm
Posts: 1
I'm trying to set up an ASP shopping cart. My code is as follows:

Code:
<%
CONST CC_ProductID = 0
CONST CC_Quantity = 1
CONST CC_Name = 2
CONST CC_Price = 3
CONST CC_UniqueKey = 4
CONST CC_Weight = 5
CONST CC_Color = 6
CONST CC_Size = 7
CONST CC_Skew = 8
if Request.Cookies("CharonCart") = "" then
dim CCcart(9,50)
else
CCcart=CookieToCart("CharonCart")
end if

CCcart_SubTotal=0
CCcart_numItems=0
CCcart_Shipping=0
CCcart_Discount=0
CCcart_SalesTax=0
isFound=false
for i=0 to ubound(CCcart,2)
if CCcart(CC_ProductID,i) <> "" then
isFound=true
CCcart_SubTotal=CCcart_SubTotal + (CCcart(CC_Quantity,i)*CCcart(CC_Price,i))
CCcart_numItems=CCcart_numItems + 1
end if
next
function CCcart_LineTotal
CCcart_LineTotal=CCcart(CC_Quantity,i)*CCcart(CC_Price,i)
end function
function CCcart_GrandTotal
CCcart_GrandTotal=CCcart_SubTotal + CCcart_Shipping + CCcart_SalesTax - CCcart_Discount
end function

function CartToCookie(thearray,cookiename)
on error resume next
mystring=""
for j=0 to ubound(CCcart,2)
if CCcart(CC_ProductID,j) <> "" then
for i=0 to 9
mystring=mystring & CCcart(i,j) & "^"
next
mystring=left(mystring,len(mystring)-1)
mystring=mystring & "|"
end if
next
mystring=left(mystring,len(mystring)-1)
Response.Cookies(cookiename)=mystring
end function

function CookieToCart(cookiename)
on error resume next
dim myarray(9,50)
mystring=Request.Cookies(cookiename)
productarray=split(mystring,"|")
for j=0 to ubound(productarray)
itemarray=split(productarray(j),"^")
for i=0 to 9
if itemarray(i) <then>


Executing the code in the browser gives me the following error:
Code:
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

Please try the following:

    * Click the Refresh button, or try again later.
    * Open the website's home page, and then look for links to the information you want.

HTTP 500.100 - Internal Server Error - ASP error
Apache/1.3.37 (Unix) Sun-ONE-ASP/4.0.2 mod_jk/1.2.14 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b

Technical Information (for support personnel)

    * Error Type:
      Sun ONE ASP VBScript runtime (0x800A000D)
      Type mismatch
      /store/inc_CharonCart.asp, line 68

    * Browser Type:
      Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008091700 SUSE/3.0.3-1.1 Firefox/3.0.3

    * Page:
      GET /store/details.asp

    * Time:
      Sunday, October 19, 2008, 9:22:50 PM

    * More information:
      Sun ONE Active Server Pages Support




Can you shed some light on what's going on? Thanks!


Top 
 Profile E-mail  
 
 Post subject:
 Post Posted: Tue Oct 21, 2008 10:31 pm 
Offline
Site Admin

Joined: Mon Jul 17, 2006 4:00 pm
Posts: 297
This forum and this website is to support petition script not for shopping carts :shock:

I think you posted to the wrong site


Top 
 Profile E-mail  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2 posts ] 

Board index » Main Support Area » ASP Support Fourm


Who is online

Users browsing this forum: MSN [Bot], Yahoo [Bot] and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron