Magento – Don’t charge tax to certain countries but still charge full price

checkouttax

My client has a bit of a situation with his tax…

Problem

He charges tax at 20% to all EU countries and this tax is included in his catalogue prices.

He doesn't charge tax to all other countries, but he would still like to charge the full price of his catalogue. However due to how the rules are set up, if a country is not tax applicable then it will deduct the tax amount from the price.

My Idea

My current idea is to force a store view change if certain countries are selected as the billing address during checkout. This store view will then have no tax class selected on the products.

I could potentially do this by intercepting the 'Place Order' script and programmatically setting the store view.

Does anybody know if there are any extensions or existing code snippets that will help me enable this?

Best Answer

How I've done this in the past was to extend the Mage_Tax_Model_Calculation class. Then creating a copy of the function calcTaxAmount we return a value of 0 if the conditions are met. In your case you could look up the quote from the customer session and get the customer's billing address information.

I think I also made the function compareRequests always return true as well, it's been a while.

Related Topic