Reputation: 4733
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
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
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
Reputation: 654
The Free shipping should work after all this is done.
Upvotes: 4