Ahmed Hashem
Ahmed Hashem

Reputation: 4733

Magento free shipping not working

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

Upvotes: 4

Views: 6236

Answers (3)

Calvin K
Calvin K

Reputation: 396

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'))

Upvotes: 11

Sysgen Media
Sysgen Media

Reputation: 21

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.

Upvotes: 2

marcinsdance
marcinsdance

Reputation: 654

  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.

Upvotes: 4

Related Questions