Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Local Sales Tax Mod - Support Thread

Local Sales Tax Mod - Support Thread

Views: 273,287

Results 321 to 340 of 659
13 Apr 2010, 1:00 AM
#321
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Local Sales Tax Mod - Support Thread

Tesla,
I haven't had time to test this, but you can give it a try.
Open the following file:
includes\modules\order_total\ot_local_sales_taxes.php

at about line 170 look for the following:
$debug2 .= $myfield."<br>";

right above that line place the following code:

if($taxmatch == "postcode"){
$myfield = substr($myfield, 0, 5); 
}			

See if it does the trick.

LadyHLG

13 Apr 2010, 6:02 AM
#322
distinctivedog avatar

distinctivedog

New Zenner

Join Date:
Apr 2010
Posts:
35
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

I recently installed Zen Cart and dealing with Washington State city sales taxes is the last step. It seems the Local Sales Tax mod will do the trick. My Zen Cart folder within my website is titled "store" so I uploaded the "FullVersion" folder within this folder.

I then went to "Install SQL Patches" and pasted the following in the box:
CREATE TABLE tax_rates_local (
local_tax_id int(11) NOT NULL auto_increment COMMENT 'tax id',
zone_id int(11) default NULL COMMENT 'zen cart zone to apply tax',
local_fieldmatch varchar(100) default NULL COMMENT 'name of field from delivery table to match',
local_datamatch text COMMENT 'Data to match delievery field',
local_tax_rate decimal(7,4) default '0.0000' COMMENT 'local tax rate',
local_tax_label varchar(100) default NULL COMMENT 'Label for checkout',
local_tax_shipping varchar(5) default 'false' COMMENT 'Apply this tax to shipping',
local_tax_class_id int(1) default NULL COMMENT 'Apply to products in what tax class',
PRIMARY KEY (local_tax_id)
);

The system returns the following message:
CREATE TABLE zen_tax_rates_local ( local_tax_id int(11) NOT NULL auto_increment COMMENT 'tax id', zone_id int(11) default NULL COMMENT 'zen cart zone to apply tax', local_fieldmatch varchar(100) default NULL COMMENT 'name of field from delivery table to match', local_datamatch text COMMENT 'Data to match delievery field', local_tax_rate decimal(7,4) default '0.0000' COMMENT 'local tax rate', local_tax_label varchar(100) default NULL COMMENT 'Label for checkout', local_tax_shipping varchar(5) default 'false' COMMENT 'Apply this tax to shipping', local_tax_class_id int(1) default NULL COMMENT 'Apply to products in what tax class', PRIMARY KEY (local_tax_id) );

Am I putting the folder in the right place? I can't seem to get this installed. Thanks for your help in advance.

14 Apr 2010, 1:11 AM
#323
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

Inside the FullVersion folder are 2 folders catalog and sqlfiles.
You need to copy all the files and folders inside the catalog folder, but not the folder itself, into your shop folder.

LadyHLG

14 Apr 2010, 7:52 PM
#324
distinctivedog avatar

distinctivedog

New Zenner

Join Date:
Apr 2010
Posts:
35
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

That sounds simple...but I encountered an issue. You were right about the catalog and sqlfiles folders. If I understand correctly, I am to take the contents of the catalog folder and move them to the top level (in may case a folder titled, "store"). The problem is that the two files in the catalog folder are titled, admin and includes. The "store" directory already contains folders with these names.

14 Apr 2010, 10:01 PM
#325
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

Its ok if you already have folders with the same name (in fact thats exactly what you need). There is nothing in the mod folders that will overwrite anything it will just copy the new content into the folders where they need to go.

Good Luck!

LadyHLG

15 Apr 2010, 1:49 AM
#326
tesla avatar

tesla

New Zenner

Join Date:
Dec 2009
Location:
Near Rochester, NY
Posts:
5
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

This WORKS! I need to test it more but wanted to thank you again for saving our collective behinds! If you ever need any electrical engineering, please let me pay you back. For others, make sure you edit this in version 2.4 of ...\ot_local_sales_taxes.php ....Tesla


LadyHLG:

Tesla,
I haven't had time to test this, but you can give it a try.
Open the following file:
includes\modules\order_total\ot_local_sales_taxes.php

at about line 170 look for the following:
$debug2 .= $myfield."<br>";

right above that line place the following code:

if($taxmatch == "postcode"){
$myfield = substr($myfield, 0, 5);
}

> 
> LadyHLG
15 Apr 2010, 7:17 PM
#327
distinctivedog avatar

distinctivedog

New Zenner

Join Date:
Apr 2010
Posts:
35
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Thanks LadyHLG.
When I try moving the files from the "catalog" folder (admin and includes) to the shop folder I get the message: "The directory "admin" already exists. Would you like to replace it? Overwriting a directory will replace all files contained in it with the new directory contents."

The folders already located in the shop folder have a lot of files and folders in them (admin has 80 and includes has 28). The ones I am moving have (admin 2 and includes 3).

I'm kind of an ameteur here, so please reconfirm that I should replace the current directories.

16 Apr 2010, 12:55 AM
#328
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

distinctivedog,
I would say you have two options.

  1. Backup all the files and folders somewhere and then go ahead and upload the mod, if for some reason it removes all the existing files (normally FTP does not do this) then you can restore from the backup.
    or
  2. Upload the files and folders (new ones) individually.

Good Luck

LadyHLG

16 Apr 2010, 6:54 AM
#329
distinctivedog avatar

distinctivedog

New Zenner

Join Date:
Apr 2010
Posts:
35
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Thanks. Glad I backed up. It did indeed overwrite. I replaced the original files and added the files from the mod. Seems to be installed. Thanks for the help.

28 May 2010, 11:59 AM
#330
slomojojo avatar

slomojojo

Zen Follower

Join Date:
Feb 2009
Posts:
142
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

The attached zip contains a plain text file with a current list of 2010 Florida county surtax rates broken down by zipcode. It's already formatted for use with the Local Sales Tax Mod.

-The list is current until the end of 2010.

-Changes from 2009? Only one: Marion county changed from 6.5% to 6.0%, so the Marion county zipcodes have been removed from the list.

Please Note:

-Florida counties and zipcodes aren't contiguous; i.e., hundreds of zipcodes span 2 or even 3 counties. In these instances, the list assigns the zipcode to the county containing the greater population (for that zipcode). If a buyer says they've been charged an incorrect surtax, don't assume they're wrong; do a little investigating with google maps.

28 May 2010, 6:49 PM
#331
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

slomojojo,
Thank-you for the contribution!!

LadyHLG

29 May 2010, 1:01 AM
#332
slomojojo avatar

slomojojo

Zen Follower

Join Date:
Feb 2009
Posts:
142
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Thank you LadyHLG, for creating and supporting such a useful add-on! It's remarkably flexible and easy to configure.

5 Jun 2010, 6:14 PM
#333
rfree190 avatar

rfree190

Zen Follower

Join Date:
Sep 2007
Posts:
176
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

I have the Local Sales Tax mod installed and works great! But, I also have the Tax Exempt mod installed for my Distributor customers. The Tax Exempt mod will remove the state tax, but it won't remove the local tax.

I had seen a post on this forum from LadyHLG back in 2008 with a download file, looking like exactly what I need. However, it was from 2008 and MANY changes have been made to both mods since then.

Does there happen to be a new and improved download to make Local and Tax Exempt work together???

Thanks for everyone's help in this forum.

Rick

7 Jun 2010, 12:48 AM
#334
ladyhlg avatar

ladyhlg

Zen Follower

Join Date:
May 2005
Posts:
361
Plugin Contributions:
1

Re: Local Sales Tax Mod - Support Thread

RFree190,
Exactly which tax exempt mod are you using?

LadyHLG

7 Jun 2010, 2:10 AM
#335
rfree190 avatar

rfree190

Zen Follower

Join Date:
Sep 2007
Posts:
176
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

LadyHLG:

RFree190,
Exactly which tax exempt mod are you using?

LadyHLG

I am using Customer Tax Exempt 1.12a. And Local Sales Tax Mod 2.4. My Zencart is 1.3.8a.

Thanks for your help! I really appreciate it.

Rick

10 Jun 2010, 7:14 PM
#336
andi98640 avatar

andi98640

New Zenner

Join Date:
Jan 2010
Posts:
62
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

My shop is just about ready. BUT for WA state tax codes.
I have the local sales tax all set up, but can't figure out how to have it implement by the last four digits of the zip code.
Do you make your customers input it them selves or is there a way to auto populate it?
Or do you ask them their county?
Can I see an example?

11 Jun 2010, 5:45 AM
#337
laughsing avatar

laughsing

New Zenner

Join Date:
Feb 2010
Location:
Washington, USA
Posts:
2
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Andi98640:

My shop is just about ready. BUT for WA state tax codes.
I have the local sales tax all set up

How did you get all that ***bleeping ***data imported???

24 Jun 2010, 3:17 AM
#338
bonkycat avatar

bonkycat

New Zenner

Join Date:
Aug 2009
Location:
Washington State
Posts:
54
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

patternman:

Indeed, I am also in the State of WA.
At first I just wanted to use the first 5 numbers - and the solution worked. But I trashed that idea eventually because it wasn't really accurate.

I have no idea about a mod to link to the state's database, but that would sure be helpful.

So I used the excel sheet from the dor for the ZIP+4 rates (short version).
I then had to do heaps of work to get the zip codes into a list of ranges - to cut down on the size of the whole thing. This saved a lot of space, but the list is still quite huge.
Then had to get it into the format to use with this mod (which has been very nice). Then uploaded it using Access. Here are the column headings that I used:

local_tax_id should be numerically sequenced 1 thru ...
zone_id should all be the same for the WA zone -- 62
local_fieldmatch should all be the same -- postcode
local_datamatch should be the list of zip code ranges
local_tax_rate should be the list of local rates formatted as 2.1 instead of 0.021.
local_tax_label is the list of city names
local_tax_shipping should all be the same -- false
local_tax_class_id should all be the same – 1

One of the tricks to using the ZIP+4 is that the customers need to give you a ZIP+4. So I am using the Post Office CASS Address Verification module:
http://www.zen-cart.com/forum/showthread.php?p=659987#post659987

My setup works quite well. You can check out my store at https://www.fashionpatterns.com. There is a small delay at checkout when the correct tax code has to be found.

I went ahead and dumped my local tax table and am posting it here in case anyone would like to have it.
http://www.fashionpatterns.com/download/WA_taxrates_090410.zip

I have been reluctant to post this because I offer no real help or guarantees of it working correctly. Nor am I ready to offer updates every three months when the state changes their rates. But if helps, go ahead and use it.

-Jason A.

Hi Jason,

Besides this amazing mod (thanks LadyHLG :hug: ) your solution is the best I have found for acceptable slave compliance to the WA state tax master :bigups:. Yes, dramatic I know, but if you are in WA state you are feeling the pain! Streamlined sales tax my :censored: :censored: :censored:

I have downloaded and installed the local tax mod and the dor zip + 4 (your download isn't working) I will install the address verification mod in a few moments. I am hoping to copy your solution, but need to better understand what you did with the dor information and your instructions above. If your download is still available, I would greatly appreciate using it.

Your checkout is slick and accurate, and the delay is minimal! I think I may have an easy way to perform the updates every 3 months and would be willing to post them for sharing to anyone who uses your fix.

Thanks in advance for your time,

Lisa

24 Jun 2010, 7:29 PM
#339
patternman avatar

patternman

New Zenner

Join Date:
Jul 2008
Posts:
63
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Hi Lisa,

:smile:
Thanks for posting in more than one thread, I had unsubscribed from this thread a while ago. I didn't really know if my little contribution was useful to anyone or not. I'm glad someone has benefitted. And sorry about the link. I don't know when I deleted it from the server. I figured it was so old that it probably wasn't useful to anyone at this point.

Before I begin the meat of this post, please let me just give thanks to LadyHLG and the many others who know a lot more about mods, php, and programming than I. None of this would be possible without the heavy lifting from the real programmers.

But I'd also like to be blunt: please understand that I am not an expert with this stuff.
I am trying to help out and am posting what I can. But I offer no guarantees.
Always make sure to do proper backups before playing around with your database.
And as I stated earlier, I am not really interested in posting updates every three months. If someone else would like to adopt my methods (and hopefully clean them up a bit) and offer regular updates, please feel free to do so. The updates aren't especially difficult; I am just not in a position to take on that responsibility.

For the sake of clarity, I would also like to say that I don't consider this to be an ideal solution to the WA state sales tax. It would be much better to have a real-time lookup tool much like a shipping rate lookup. So for anyone who might know of a working mod for this, please post your information on this thread: Washington State Destination Sales Tax API
http://www.zen-cart.com/forum/showthread.php?t=102788

Ok, sorry for the verbosity.
It was good timing to post right now. The end of the quarter is upon us, and that means some new tax rates. I don't have the new ones done yet. (I'm always a few days behind on it.)

First, I have restored the link to my previous tax rate upload.
http://www.fashionpatterns.com/download/WA_taxrates_090410.zip
But like I said, probably not that useful because it's out of date. It's just an sql file that can (hopefully) be easily imported into the your database.

Second, here's a link to my most current tax_rates_local sql file:
http://www.fashionpatterns.com/download/WA_taxrates_100403.zip
Same sort of thing as before. It's just an export of my current table. I have not attempted to re-import it from this sql file. So please be careful and do your backups if you're going to play around with this.

Third, I have attached my personal instructions for doctoring the csv data from the WA DOR.
These instructions are attached directly to this post. (It's small enough to be attached, so I don't have to provide my own link to it.)
Attachment #7723
Please keep in mind that these are just my own personal notes to help me update the data each quarter. There may certainly be easier ways to do things. I can also not guarantee these instructions to be error free. But they work pretty well for me.

Fourth, here are the links to my previous post and attachment for uploading the data using MS Access:
http://www.zen-cart.com/forum/showthread.php?p=727078#post727078
http://www.zen-cart.com/forum/attachment.php?attachmentid=5722&d=1242085524
Just so everyone knows, importing the data using this method requires a very long time (at least it does for me). Importing an sql file is much quicker and easier. I just don't have a good procedure / tools for converting the data to sql before importing. So there is plenty of room for improvement.

Fifth, I have uploaded my excel sheet from this last quarter – prior to import:
http://www.fashionpatterns.com/download/localtax_import_100403.zip
As you will notice, it is much larger than the sql file. I have provided it so that you can have a good example of what the data from the WA DOR looks like after I've finished doctoring it.

Since the timing is so close, I will go ahead and post my quarter 3 files after I've finished them.

Hope this helps!
Please let me know how it works out for you. :D

-Jason

13 Jul 2010, 2:15 AM
#340
bonkycat avatar

bonkycat

New Zenner

Join Date:
Aug 2009
Location:
Washington State
Posts:
54
Plugin Contributions:
0

Re: Local Sales Tax Mod - Support Thread

Thanks again LadyHLG for a Mod that WA state residents can't live without! :hug:

Jason- Thanks for sharing! What you have started may be a great jumping off point for all of us caught in this issue. Let me know if you already made the July 1, 2010 changes.

DISCLAIMER: I am NOT a programmer. Not even close. Without Zen Cart and the great contributions, help, and easy to follow instructions, I would not be building a website.

I took patternmans tax_rates_local sql file (export of his current table) and had a php savvy friend break it into parts and turn it into something that can be uploaded to the tax_rates_local sql file through my php admin by starfield technologies. This is something that godaddy uses, so if you have godaddy and zen, this will work for you. (should work for everyone with starfield tech and possibly other sql control panels)

Download the sql file here: http://www.gemni-gems.com/sql.zip

Go to my php admin, click on your database name on the left hand side, scroll down and look for the table called tax_rates_local (click to highlight). Click the import tab, use the browse button to select file 1 (upload these in order and don't lose track) select SQL under the 'format of imported file' and click GO.
Continue until all are loaded. When complete, you should have 60,980 records entered.

I see it also allows selection of csv, so someone smarter than I should be able to download the WA state CSV file each quarter and load that in without the extra steps. Please share if you figure it out.

Still working on an easy way to update patternmans file each quarter.

*note: (62) is the number that is given in these files for WA state in your database. If you upload the files and don't show any local records when checking via your zen cart admin, you will need to go back to your php admin and correct that in the table.

Good Luck!