0

I'm having an issue with Magento Table Rates. Magento always adds a tax to the "Order Subtotal". I spend hours to get rid of it and to find the line where Magento is doing this. Unfortunately without success.

My CSV contains for example:

Country,Region/State,"Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
*,*,*,0.0000,14.5000
*,*,*,35.0000,0.0000

That means that all orders >= $35 are eligible for free shipping. But only orders >= $42 gets the free shipping options. Its definitely the tax - if I'm going to the checkout page I see $7 tax.

It only works if I set "Order Subtotal" to "29.0000" instead of "35.0000". But that's a bad and only static solution. Does anyone know how I can solve this?

Thank you so much in advance.

2 Answers 2

6

I finally found a solution. Copy file Mage/Shipping/Model/Carrier/Tablerate.php to your local directory and add following code before //Free shipping by qty (around line 78)

        if (Mage::helper('tax')->priceIncludesTax()) {
        $taxableAmount = 0;
        foreach ($request->getAllItems() as $item) {
            $taxableAmount += $item->getTaxableAmount();
        }
        $request->setPackageValue($taxableAmount);
    }

Please let me know if you have any concerns but it seems to work :)

2
  • Welcome to Magento.SE! For future googlers I strongly advise against this "workaround" and urge you to never copy a file to app/code/local to patch an issue. If you believe the problem needs to be addressed please contact the Magento core team by filing an issue against the Magento 2 repository at github.com/magento/magento2/issues - better yet, issue this patch as a pull request against the M2 db.
    – philwinkle
    Commented Jul 9, 2014 at 22:31
  • Thanks for this, I wrote an extension that extends the Mage_Shipping_Model_Carrier_Tablerate class to make this change without copying the core file into local.
    – gregdev
    Commented Mar 2, 2016 at 3:31
0

I had to multiply the Taxable amount with Item Count to get the right result as below:

    if (Mage::helper('tax')->priceIncludesTax()) {
        $taxableAmount = 0;
        foreach ($request->getAllItems() as $item) {
            $taxableAmount += $item->getQty() * $item->getTaxableAmount();
        }
        $request->setPackageValue($taxableAmount);
    }

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.