Error in eCart
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 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"))) & ""
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.