close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Error in eCart code

Thread began 11/08/2009 10:55 am by markdoyle87077 | Last modified 11/10/2009 11:48 am by markdoyle87077 | 3595 views | 9 replies

markdoyle87077

Error in eCart

Jason,

Think you have misunderstood me here so I will take it page by page. On the confirmdetails.asp page the form field 'billingcountry' is populated from a recordset rsShipState. The recordeset gets the following values from the database:

ID english german salestax
1 Germany Deutschland 0.19
2 United Kingdom Großbritannien 0.19
3 France Frankreich 0.19
4 Holland Niederlande 0.19
5 Italy Italien 0.19
6 Greece Griechenland 0.19
7 Denmark Dänemark 0.19
8 Lichtenstein Lichtenstein 0.19
9 Austria Österreich 0.19
10 Belgium Belgien 0.19
11 Ireland Irland 0.19
12 Switzerland Schweiz 0
13 Romania Ungarn 0.19
14 Hungary Rumanien 0.19
15 Finland Finnland 0.19
16 Luxembourg Luxemburg 0.19
17 Macedonia Mazedonien 0.19
18 Spain Spanien 0.19
19 Poland Polen 0.19
NULL NULL NULL NULL

When this information is posted to the ordersummary.asp page the form field 'billingcountry' holds a value from the 'salestax' column in the database, it does not hold an english or german value as this value is obtained using javascript and is set to the hidden form field 'billingcountryhidden'

When the information arrives at the ordersummary page the following code is executed:

<%
if (cStr(cStr(Request.Form("billingcountry"))) <> "") then
Session("TaxRate") = "" & cStr(cStr(Request.Form("billingcountry"))) & ""
end if
%>

The cart displays fine at this point and all the calculations are correct so i know that the 'salestax' column from the database is being set correctly so the SalesTax rule is being executed as it should, I have even debugged a little and got it to show me the value of the Session("TaxRate") on the ordersummary.asp page and it is holding the correct value.

When I then click 'Next' on the ordersummary.asp page to be taken to the paymentdetails.page thats when the error occurs:

Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "Germany"]'
/dmbc/WA_eCart/dmbp_VB.asp, line 260

I know its hard to believe but this is happening even though the code we are looking at suggests otherwise. I mean, why is it that the /dmbc/WA_eCart/dmbp_VB.asp file functions correctly on the ordersummary.asp page where the calculations are performed perfectly but cannot perform correctly on the paymentdetails.asp page.

There has got to be something we are missing and thats why i presumed it may be the code in eCart.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...