The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

No tax coupons

How would I go about creating a coupon that cancelled local tax - we want local companies to buy at a discount with no tax. Like a wholesale thing. I see the tax ID excemption but I am wanting to avoid having an extra field on checkout and rather not update each customer manually before the fact. Would this be a checkout snippet?
  • fc_adamfc_adam FoxyCart Team

    We dont have a native way for coupons to affect taxes, but you could conceivably take a similar approach to what you can do with a coupon that affects shipping. Instead of altering the shipping amount if the coupon is present though, you would fill a hidden input on the checkout for the tax exemption status with a value. So you'd make use of the tax exemption field, but as it's hidden it wouldn't be something else that users need to interact with.
  • The only field I know of is the tax id. What is this tax exemption field you speak of?
  • fc_adamfc_adam FoxyCart Team

    I believe we're referring to the same thing, but by different names. I was referring to this:
  • So basically you are suggesting entering a random value just so it's not empty?
  • fc_adamfc_adam FoxyCart Team

    That's right - we don't perform any validations on that field - so how you use it is completely up to you.
  • So I've got most of the code working but while the shipping_tax_id field gets updated correctly on the right coupon entry I can't figure out how to get it to recalc taxes. Can you take a looksy?

  • fc_adamfc_adam FoxyCart Team

    One thing our documentation isn't clear on is that you also need to ensure you set the "exempt customers with a tax id" checkboxes on the respective taxes for your store. Have you done that?
  • happycloudhappycloud Member
    edited August 2015
    Yes I have done that. Store is 'gonegreen' btw. If I enable the field to be visible and enter things manually it works. I think it would work once I submit the checkout. But the process by which someone would do things doesn't work. I would expect the tax to be removed as soon as they enter the coupon. So I think I need to force a tax recalculate but my attempts have not succeeded. I found these 3 relevant lines in other code:

    FC.json.taxes_calculated = true; // tried false

    But none seem to cause taxes to be recalculated (or at least with the coupon in mind)
  • fc_adamfc_adam FoxyCart Team

    Try something like this:
    FC.cart.getTaxes({address: FC.json.shipping_address});
  • That did it. Thanks!
Sign In or Register to comment.