Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Tax Exempt by Customer Group

Tax Exempt by Customer Group

Locked

Views: 2,314

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
9 Dec 2008, 8:32 PM
#1
tecbrat avatar

tecbrat

Zen Follower

Join Date:
Feb 2005
Posts:
239
Plugin Contributions:
0

Tax Exempt by Customer Group

I have seen a few requests and a couple of mods that handle something like this, but here's my simple version:

Our client offers wholesale discounts at 3 levels. Each level has the word "Wholesale" in the name.

In includes/modules/order_total/ot_group_pricing.php around line 70 add this, right below the relevant db queries:```php
// added to make wholesale groups tax exempt. See also includes/functions/functions_taxes.php
$groupname=$group_discount->fields['group_name'];
if(eregi("Wholesale",$groupname)){$_SESSION['tax_exempt']=TRUE;}


then in includes/functions/functions_taxes.php around line 15, at the beginning of function zen_get_tax_rate, add this:```php
    if(isset($_SESSION['tax_exempt'])){
      return 0;
    }

You could use a different string where I have "Wholesale", like "Tax Exempt". Any group with that string in the name is charged 0 tax. I have not tried this with a group that does not already receive a discount.

20 Sep 2009, 2:14 AM
#2
desertlord avatar

desertlord

New Zenner

Join Date:
Sep 2009
Posts:
6
Plugin Contributions:
0

Re: Tax Exempt by Customer Group

This seems promising but I can't seem to get it to work. Could someone tell me exactly where to add the code to includes/modules/order_total/ot_group_pricing.php

Thanks.