VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Welcome to the new version 7.0 forum
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

support
Administrator

4288 Posts

Posted - March 09 2010 :  23:25:42  Show Profile  Visit support's Homepage  Reply with Quote
Hi everyone,

As requested here is the new version 7.0 dedicated category!

Please post away!

When posting please try and include as much info about your problem, your version and any relevant info that will help other forum visitors assist with your answer.

Don't forget though, don't post any sensitive ftp or admin login info.

Thanks
Cam

VPASP Support

Derivative
Starting Member

12 Posts

Posted - October 18 2017 :  15:18:57  Show Profile  Reply with Quote
Hello Support

Our store calculates Canadian taxes for all countries when State is one of the states in Canada. It seems the country name is not considered when calculating taxes. Here is the code in shoptax.asp

if ucase(GetSess("country")) = "CA" then
TaxbyCanada taxprice, tax, taxdone, dbc, pst
if taxdone = True then
exit sub
end if
end if

But it doesn''t check the country to be "CA"! So I printed this right before the if statement
response.write ucase(GetSess("country")

And it did display "CA"!

Why the if statement is bypassing and country name is ignored when state is one of the canadian states?
Go to Top of Page

diegomilito
VP-ASP Expert

Argentina
741 Posts

Posted - October 19 2017 :  01:58:20  Show Profile  Reply with Quote
you can try this in shoptax.asp , find out the this :
sub TaxbyState

inside coding it will like this :
taxsql = "* from shopstates where stateabbrev="& sqlserverprefixn &"''" & state & "''"
taxsql = taxsql & " and (statetaxrate <> 0 and statetaxrate is not null)"

just simply change to something like this :
taxsql = "select * from shopstates where stateabbrev="& sqlserverprefixn &"''" & state & "''"
taxsql = taxsql & " and (statetaxrate <> 0 and statetaxrate is not null)"
if trim(GetSess("country")) <> "" then
taxsql = taxsql & " and statecountry = ''"& GetSess("country") & "''"
end if

make it a try and tell me how with result ?
diego
Go to Top of Page

Derivative
Starting Member

12 Posts

Posted - October 19 2017 :  16:32:21  Show Profile  Reply with Quote
Hi Diego,

I had to remove sqlserverprefixn and changed '' to '' in ''"& GetSess("country") & "''". It seems it is working now. I hope it doesn''t throw another error for another case! I am sure stateabbrev = ''ON'' should be single quote but I don''t know what sqlserverprefixn is about.

Here is what works in our store:

taxsql = "* from shopstates where stateabbrev=" & "''" & state & "''"
taxsql = taxsql & " and (statetaxrate <> 0 and statetaxrate is not null)"
if trim(GetSess("country")) <> "" then
taxsql = taxsql & " and statecountry = ''"& GetSess("country") & "''"
end if
Go to Top of Page

Derivative
Starting Member

12 Posts

Posted - October 19 2017 :  16:34:19  Show Profile  Reply with Quote
Okay. I got it. This form cannot show single quote. It makes it double quote. I copied and pasted and it didn''t work! Still what is sqlserverprefixn
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000