Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Tax calculation below a threshold, ot_tax.php

Tax calculation below a threshold, ot_tax.php

Locked

Views: 9,109

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
4 Sep 2007, 4:23 AM
#1
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Tax calculation below a threshold, ot_tax.php

Hi,

I'm trying to apply a tax rate to an order only when the subtotal for the items in that tax class is above a certain amount.

Is www/shop/includes/modules/order_total/ot_tax.php the right place to try to modify the tax calculation logic or am I barking up the wrong tree? It seems to me that function process() in that file communcates that?

Any guidance appreciated.

thanks,
Don

4 Sep 2007, 4:30 AM
#2
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Just being curious, is there some kind of tax that applies "only when the subtotal for the items in that tax class is above a certain amount."?

4 Sep 2007, 1:38 PM
#3
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Yes, in the lovely State of New York if you buy clothing or shoes for under $110 there is no state tax charged.

http://www.tax.state.ny.us/pdf/memos/sales/m06_6s.pdf

I'm not just doing this for fun :)

4 Sep 2007, 11:33 PM
#4
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Sorry, thread title should read "Tax calculation above a threshold".

I'm a bit of a newbie to the bowels of zencart and I don't have much PHP or OO programming experience, just some perl and DB programming. Thought I could figure this out on my own but definitely feel a bit over my head and a bit pressed to sort this out.

If anyone can give me some guidance on how to implement a tax threshold above only a certain dollar amount I would greatly appreciate it. I thought perhaps I could modify the ot_tax.php file, but I believe that is incorrect.

Thanks in advance for any help you can give me.

-Don

5 Sep 2007, 3:18 AM
#5
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Is that per item or the total?

5 Sep 2007, 5:04 AM
#6
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Initially I thought the exemption applied to the total of that tax class of items. In actuality there is no tax applied if the **cost per item or pair **does not exceed $110. Ooops...

Ultimately I was able to sort it out by modifying shop/includes/classes/order.php. Took a while (and some help from a buddy) to figure out that's where the guts are but I think I'm ok.

-Don

7 Sep 2007, 11:07 PM
#7
rorschach avatar

rorschach

New Zenner

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

Re: Tax calculation below a threshold, ot_tax.php

donplay,
I posted a similar post in another, related thread. It sounds like i'm in exactly the same position you're in - i need to correct the tax rates for a store w/ an online component in NYC. so, please correct me if i'm wrong, the new tax rate is applied only to specific items over 110 in the order, not the whole order itself. so, a pair of shoes in a 2 item order that cost 75 dollars will not be taxed but a shirt that's 120 dollars will be taxed at a rate 4.375%.. this is what i gathered reading the nystax.gov info.. i guess i'm going to look into the php code now and see how to make the change .. any additional info you have on how to facilitate this change will be appreciated !

8 Sep 2007, 1:01 AM
#8
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

rorschach,

Actually on September 1st NYC rules have changed. For clothing and shoes, there is no tax period, whether the per item/pair cost is 110 or not.

But to complicate matters, that threshold still applies to NY State. That's further outlined in the link I posted previously. To accomodate this I modified order.php. Within the for loop that goes through each line item, I created a running sum of tax for items in that "clothing and shoes" category (for which I created a tax class). After the for loop ended I subtracted that total from the total tax.

I have to run out and don't have time to post the code right now; but I can try to give you a snippet later if you're interested.

By the way; I further had to modify the code to accomodate the NYC no threshold for that tax class...I can give you more detail on that as well if you want.

-Don

8 Sep 2007, 3:16 PM
#9
rorschach avatar

rorschach

New Zenner

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

Re: Tax calculation below a threshold, ot_tax.php

Don,

Hmm.. there's a lot of confusion about the NYS/NYC tax topic - at least in my mind. I think you may be wrong about there being no tax period regardless of cost.. Since i'm a pretty good programmer (but a rather poor accountant) I did some research and found this:

http://www.tax.state.ny.us/pdf/publications/sales/pub718c_807.pdf

Take a look at part 2, in particular this footnote to the NYC jurisdiction:

Effective September 1, 2007, sales in New York City of clothing and footwear, and items used to make or repair clothing, costing $110 or more per item or pair, are also exempt from the 4% New York City local tax. These sales remain subject to the New York State 4% sales and use tax and the ⅜% sales and use tax imposed by the state in the Metropolitan Commuter Transportation District.

The way I am reading this is that clothing and footwear that costs more than 110 dollars still has the 4.375% (combined) NYS and MCTD sales and use taxes. Conversely items under 110 are no subject to the state taxes. I might just call the 800 number they list and talk to someone there and get final confirmation that I am interpreting this correctly..

Anyway, thanks so much for your reply - i started poking around order.php and am getting familiarized with the system. I appreciate the offer of code snippets - i may take you up on your offer if I feel like i'm not getting anywhere but right now i'm kinda eager for the challenge. :P i'll happily share my code, too, once i write it after I get the final confirmation on what the business logic should be!

8 Sep 2007, 3:46 PM
#10
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Hi rorschach,

Definitely confusing.

I think we're pretty close to being on the same page here with the tax rules. These are the rules as I understand it.

In NYC, I agree you are still charged NYS tax if it is in the clothing/apparel/shoes tax class, and the per-item (or pair) cost is $110. That's pretty clearly outlined in the links both of us posted from the NYS tax folks.

However as of 9/1/07 in NYC taxes are never charged on this class (clothing/apparel/shoes) anymore, regardless of the total. Check out the city website in the Tax Rates section:

http://home2.nyc.gov/html/dof/html/business/business_tax_nys_sales.shtml

There is no City sales tax imposed on the purchase of clothing and footwear regardless of the amount. The New York State tax rate of 4.375% (including the Metropolitan Commuter Transportation District rate) was repealed effective April 1, 2006, and the New York City tax rate of 4% was eliminated effective September 1, 2005 for items under $110. For items over $110 the tax was eliminated effective September 1, 2007. More information on the clothing and footwear sales tax exemption is available from the *State Web site*.

We handled this by installing the Local Sales Tax mod authored by LadyHLG that goes by zip, along with custom coding in that mod and the order.php class.

Good luck.

-Don

8 Sep 2007, 3:48 PM
#11
donplay avatar

donplay

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

donplay:

Hi rorschach,

In NYC, I agree you are still charged NYS tax if it is in the clothing/apparel/shoes tax class, and the per-item (or pair) cost is $110. That's pretty clearly outlined in the links both of us posted from the NYS tax folks.

Meant to say "cost is under $110" there...if it's under 110 there's no State tax...if it's 110 or above there is State tax. No NYC tax regardless as I said previously.

-Don

13 Sep 2007, 5:03 AM
#12
apemusic avatar

apemusic

Zen Follower

Join Date:
May 2006
Posts:
134
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Hi Guys,

I would also like to know how to make tax apply only to orders over a certain amount? e.g. taxes only apply to orders over $1000?

This is easy enough for items that cost $2000 each, I just make them taxable products

But what about items that cost $500 each? If they buy 1 unit there is no tax, but if they buy 10 units then when they checkout it should add the tax at checkout so the total is $5000 + $500 = $5500

Even if someone is interested in doing this for a small fee it would really help us so please PM or get in touch

cheers,

19 Feb 2008, 4:26 AM
#13
rvagrrl avatar

rvagrrl

New Zenner

Join Date:
Oct 2005
Posts:
90
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

I would also love to know how to code this. My client is requesting tax be added only on orders above a certain amount.

Thanks!

4 Mar 2008, 3:54 AM
#14
rvagrrl avatar

rvagrrl

New Zenner

Join Date:
Oct 2005
Posts:
90
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Just wanted to bump my plea for help and add that I'm more than happy to compensate for someone's time. =)

22 Apr 2008, 7:12 AM
#15
pjd avatar

pjd

New Zenner

Join Date:
Feb 2007
Posts:
20
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Don -- regarding the sales tax in NYS/NYC on clothing/shoes being taxed if over $110, you wrote:

donplay:

We handled this by installing the Local Sales Tax mod authored by LadyHLG that goes by zip, along with custom coding in that mod and the order.php class.

Good luck.

-Don

Is the customization of this code something that you could share with those of us in NYS with the same situation. Would you post that code here? Your help would be appreciated and you would get much kudos for helping us all to solve this problem (similar in MA, TX etc. if not more locations).

Thank You. :smile:
PJD

18 Feb 2010, 3:49 PM
#16
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

I'd also like to add taxes to orders only above a certain sum. How is this possible?

No, there isn't a certain tax that I know of that applies this way. The problem I'm faced with is how to cope with shipping costs without knowing product weights. We have an inventory of over 50,000 items that we receive from a buying group that simply doesn't provide us with that data. So, the idea is, to apply a particular percentage to order totals above a certain sum. I know this isn't the best way to handle this issue by a long shot...but I'm at a loss...any ideas?

Thanks!

19 Feb 2010, 1:51 PM
#17
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Tax calculation below a threshold, ot_tax.php

Alright...just an update. The issue I was trying to solve was a shipping issue. I had thought that modifying the was Zen Cart calculates taxes would be a good solution. What I didn't know was, and it was my fault, was that the "Table Rate" option in Zen Cart was able to do what I needed it to. So, I don't need to figure out a way to make the ot_tax module do it for me.

There is a user running around on this forum with "Spend time in the Admin, you'll be so glad you did." Perhaps I should have done that. And, I should've been sure to know more about shipping in general. So, once again, problem solved by the possibilities of cart customization from the Admin. Long Live the Zen! :clap: