1

Many of the customers we'll be selling to are tax-exempt entities. We're located in OH, so for OH customers we're applying sales tax through the Tax Zone setup in Commerce. Is there a way to not apply the tax based on some conditional, even though their billing address is in OH?

1 Answer 1

4

OK So I figured this one out eventually. It's a very hacky fix. I added an adjuster that is basically an exact copy of the built-in Tax Adjuster (found at plugins/commerce/Commerce/Adjusters/Commerce_TaxAdjuster.php). The only difference is that I added a condition to check for my Tax Exempt field (and that we're in the OH tax zone), and then removed the tax amount instead of added it.

ie, I changed things like

$allRemovedTax += $amount;
$item->tax += $amount;

to

$allRemovedTax -= $amount;
$item->tax -= $amount;

And then added the whole thing to a new custom plugin.

What this results in is tax being applied normally, and then the same tax being removed.

If anybody comes across this and has a better solution, I'd love to hear it. But this works for now.

1
  • That alone did not work for me, I needed to modify optionsJson array like this: ` $taxRateAttributes = $taxRate->attributes;` ` $taxRateAttributes["name"] .= " Excempt";` ` $taxRateAttributes["rate"] = -$taxRateAttributes["rate"];` ` $adjustment->optionsJson = $taxRateAttributes;` Commented Oct 27, 2016 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.