[ic] County + State tax
Eric Paul
interchange-users@lists.akopia.com
Mon Jul 23 21:19:01 2001
Russ,
First check with the State Department of Revenue in the state you are
setting your shop up in. I built a shop for a merchant located in New York
State, and NY prohibits using ZIP lookups because the various counties
overlap ZIP codes. If you can use zips, then you can use this directive in
catalog.cfg:
SalesTax zip
Then in your salestax.asc put a list of all the zip codes which you're
going to tax with the appropriate tax.
The other option for you is what I ended up doing for NY. First, in
catalog.cfg do a:
SalesTax county
And in the database definitions do a:
Database state state.txt TAB
Database counties counties.txt TAB
Make a state.txt file with a list of all the 50 states and their postal
abbreviations. (I had to do this because some users couldn't type their
2-letter state correctly and it kept screwing up tax/shipping) Assuming
your shop first asks for the shipping address, then goes to another page to
list shipping options and costs, you can do this.
On your shipping page, add code like this:
[if value state =~ /NY/i]
<P>
<TABLE WIDTH=600><TR><TD __HEADERBG__>
<FONT SIZE="+2" COLOR=__HEADERTEXT__>Please select your county.</FONT>
<SELECT NAME=county>
[loop
SEARCH="ra=yes/fi=counties.txt/ml=100"
OPTION="county"]
<OPTION VALUE="[loop-code]"> [loop-data counties
description]
[/loop]
</SELECT>
</TD></TR></TABLE>
[/if]
Change NY to whatever state you are in. This will bring up another
selector with a list of the county names. I put in two columns because
some NY counties have multiple word names (or multiple names for the NYC
boroughs) and that way I make sure to get input I can easily parse.
In your salestax.asc file, associate your "keys" from counties.txt into
salestax.asc with the proper tax.
Finally, make sure you restart your store after you build all these text
files, otherwise you'll end up chasing your tail because the .gdbm's may
not have been built properly.
Of course, if you are using a RDBMS backend, it may be better for you to
make these "text" database files into SQL tables. If so, you may need to
change your search terms.
If you need more help with this, feel free to email me, and I can send you
off the text files I put together and some more code snips.
HTH!
Eric
At 03:21 PM 7/23/01, Russ Mann wrote:
>Hello List,
>
>I have a state tax of 5% to implement, and an additional county tax of .5%
>in the event that a customer comes from the same county. Is there a way to
>do this in IC? Possibly based on zip codes?
>
>Thanks,
>
>Russ
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users
---
Eric Paul
SpellBook Systems
http://www.spellbook.net