Magento Tax Calculation error – Out by a factor of 100

April 25, 2010

I was just setting up a store with GST tax on Magento and got caught up on a bug where the tax on a product would be calculated correctly, but the total on the cart page would show it 100x (yes 100 times!) lower than it actually was, leading to an incorrect total being calculated for when tax is included.

With a bit of Google’ing and I found this forum post which had the answer. A clean way of making this little patch while we await a core fix is:

mkdir -p app/code/local/Mage/Tax/Model/Sales/Total/Quote/
cp app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php app/code/local/Mage/Tax/Model/Sales/Total/Quote/
vi app/code/local/Mage/Tax/Model/Sales/Total/Quote/Tax.php

and make the change on line 314:

        $rate = $rate/100;


        // Removed bug with tax calculation
        //$rate = $rate/100;

That should fix it, let me know how you get on.



Hi! I'm Ashley Schroder, a Software Engineer from New Zealand - this is a collection of notes on my experiences with Ecommerce Web Development, particularly Magento Development.

Are Your Customers Getting The Magento Emails You Send?

MageSend Magento Email sending with Amazon SES

I have made a premium Magento Extension called MageSend. MageSend makes it simple and easy to send using Amazon's highly reliable SES email service.

The extension is $99, and comes with a complete money back guarantee, please check it out, I am confident it will resolve any email sending problems with your Magento store.

One response to Magento Tax Calculation error – Out by a factor of 100

  1. wow, thanks alot! this helped

    i just had a tax of 0,01€ .. now its working well, good job

    i dont know what happened with the path there, but i found this tax.php here: