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-ASP Shopping Cart Customer Forum

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

 All Forums
 VPCart Forum
 Customization
 Taxes by City instead of State?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

denimz
Starting Member

USA
6 Posts

Posted - November 10 2003 :  18:25:00  Show Profile  Reply with Quote
Could anyone point me in the right direction for some code that would allow me to charge taxes by City in only one State?

Thanks.


jonmadrid
VP-ASP New User

USA
192 Posts

Posted - November 12 2003 :  13:17:10  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
denimz,

Will all orders from that state have tax, or just the orders from that city? Also, will you be taxing any other orders in any way (by states, country, etc)?

All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com



Go to Top of Page

jonmadrid
VP-ASP New User

USA
192 Posts

Posted - November 12 2003 :  16:29:00  Show Profile  Visit jonmadrid's Homepage  Reply with Quote
denimz,

Here is the simple solution if you're taxing only by city and NOT by state. In the shoptax.asp file (version 5.0), around line 46, change

*********
state=ucase(Getsess("state"))
*********

to this

*********
state=ucase(Getsess("city"))
*********

What that does is calculates based on the city value, rather than the state. Then just make sure you have the city name in the 'xtaxstatename' config field and the appropriate tax rate in the 'xtaxstaterates' config field.

I think that should work. You might want to make some notes in that file just so you know that the 'State/Province' tax handler has been tweaked to be 'City' tax, especially since everything else in there will still say 'state'.

Let me know if that solves your problem.

All the best,

Jon Madrid
--------------------
Madrid Communications
Web Design, Development, and Hosting
www.madridcom.com




Go to Top of Page

denimz
Starting Member

USA
6 Posts

Posted - November 12 2003 :  17:32:29  Show Profile  Reply with Quote
Thanks Jon. I only need taxes to be set for cities in California. All other states will not be taxed. I'll add those mods and see what happens. But I don't think the field that will hold the cities will be large enough. But we'll see what happens.

Go to Top of Page

support
Administrator

4266 Posts

Posted - November 12 2003 :  20:06:26  Show Profile  Visit support's Homepage  Reply with Quote
We have a free, on request, addon that uses zip codes to determine tax rates. It was developed for California but can be used in any state.

If you wish to try it, please contact http://www.vpasp.com/sales/shopcustcontact.asp

Using city names is extremely prone to typing, case sensitrive, abbreviation and other errors

VP-ASP Support

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000