4
votes

I have enabled free-shipping from System->Configration->Shipping Methods, and I set the Minimum Order Amount to 50 but it doesn't work

Also I wonder why this condition if($request->getFreeShipping()) always return false

3

3 Answers

11
votes

I actually had this problem myself and stumbled on this question. For me it was because the cart subtotal was not being loaded properly in the Freeshipping.php file which is located in the below path.

Path to File:

/app/code/core/Mage/Shipping/Model/Carrier/Freeshipping.php

Now, Copy this file:

/app/code/core/Mage/Shipping/Model/Carrier/Freeshipping.php

to this file location

/app/code/local/Mage/Shipping/Model/Carrier/Freeshipping.php

Find the line that has this

    if (($request->getFreeShipping())
        || ($request->getBaseSubtotalInclTax() >= $this->getConfigData('free_shipping_subtotal'))

And replace it with this

    $totals = Mage::getSingleton('checkout/cart')->getQuote()->getTotals();
    $subtotal = $totals["subtotal"]->getValue();

    if (($request->getFreeShipping())
        || ($subtotal >= $this->getConfigData('free_shipping_subtotal'))
4
votes
  1. Make sure the applicable countries are correct
  2. Make sure the price of the product without tax is 50 or more
  3. Refresh cache (configuration cache should be enough)

The Free shipping should work after all this is done.

2
votes

I have implemented Calvin K's answer above on magento 1.7.0.2 and it solved our problem instantly.

However instead of updating the file, first make sure to copy the file and upload it to:

/app/code/local/Mage/Shipping/Model/Carriers/Freeshipping.php

This way you dont modify the core Magento code.