We have a problem with tax/VAT settings on our Magento store.

When we change the billing address in the checkout, the order lines and totals change, but incorrectly.

We have set different tax rates for the countries we ship to, for example 6% for Netherlands and 10% Austria. For every country (14) there is a separate storeview.

We have a product that costs €59,00, and when we add this to the cart in the Austrian store, the total without tax is €53,64 and with tax is €59,00. This is correct.
However, when we change the billing address to Netherlands, there is tax calculated, but based on the previous amount without tax, so €53,63 without tax and €56,85 with tax. The last one should be €59,00, this is the problem.

I can see how the NL totals are calculated on the Austrian storeview:
53.64 / 100 * 110 = 59 (Austria, correct)
53.64 / 100 * 106 = 56.85 (Netherlands, incorrect)
This last one should be 59, so the amount with tax should be leading, now the amount without is used for recalculating.

If I do the same on the NL storeview (change billing country to Austria), the opposite occurs:
55.66 / 100 * 106 = 59 (Netherlands, correct)
55.66 / 100 * 110 = 61.23 (Austria, incorrect)

I hope I'm clear enough..
How can I solve this?

1 Answer 1


I think I found the answer, it's a feature added in v1.9:


In our case, it's not possible to upgrade to 1.9 at this time, but I managed to get the desired results, by copying some from version 1.9:

I extended Mage_Sales_Model_Quote_Address_Total_Abstract::collect and changed the following line (line #68):

$this->_areTaxRequestsSimilar = $this->_calculator->compareRequests($storeRequest, $addressRequest);

To the following:

if ($this->_helper->isCrossBorderTradeEnabled($this->_store)) {
    $this->_areTaxRequestsSimilar = true;
} else {
    $this->_areTaxRequestsSimilar = $this->_calculator->compareRequests($storeRequest, $addressRequest);

Of course, the isCrossBorderTradeEnabled() helper method and configuration option don't exist, so you have to create this yourself in the system.xml of your own module:

                        <cross_border_trade_enabled translate="label comment">
                            <label>Enable Cross Border Trade</label>
                            <comment>When catalog price includes tax, enable this setting will fix the price no matter what the customer's tax rate is.</comment>

And call this option in the if-statement:

if (Mage::getStoreConfig(self::XML_PATH_CROSS_BORDER_TRADE_ENABLED, $this->_store)) {

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.