Magento – How to remove free shipping after discount code has been applied

couponfree-shippingmagento-1.9

Having an issue at the moment with free delivery on my site.

It is set that any order over £70 gets Free UK Delivery.

However at the moment we are running a discount code with another client set up. They get 33% discount. Orders that are originally around £85 are being discounted to £56.95 and they are still allowed free delivery at that price. It seems that free delivery uses the subtotal after discount rather than before. Is there a quick fix for this, as it is happening quite a lot.

Actions and conditions images:

enter image description here

enter image description here

I have even got the free shipping set to no and its still allowing free shipping.

Im on version 1.9.2, also any advise on weather this rule is setup correctly would be appreciated.

Ive checked out https://www.demacmedia.com/magento-commerce/mini-tutorial-how-to-solve-the-free-shipping-minimum-subtotal-with-discount-issue/ but thats for an older version and dont think that applies anymore.

Best Answer

You need to modify the collectRates method of freeshipping for this issue.

For this copy Mage_Shipping_Model_Carrier_Freeshipping.php in local folder with same directory combination.

and replace this condition ::

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

With

if (($request->getFreeShipping())
    || ($request->getPackageValueWithDiscount() >=
        $this->getConfigData('free_shipping_subtotal'))
)
Related Topic