I have an eshop developed using Magento 1.8.1.

I managed to remove other shipping methods if free shipping is active on my order page adding this code

<?php if ( array_key_exists('freeshipping', $_shippingRateGroups )) { $_shippingRateGroups = array('freeshipping' => $_shippingRateGroups['freeshipping']);}?>

on app/design/frontend/default/YOURTEMPLATE/template checkout/onepage/shipping_method/available.phtml

My problem though is that all shipping methods still appear on "Estimate Shipping Block"

So what i need is when free shipping is activated, other shipping options to be hidden on Estimate Shipping Block

3 Answers 3


The file you need to adjust is:


Place the following code before the <dl> tag that displays the different options.

if ( array_key_exists('freeshipping', $_shippingRateGroups )) {

I notified that above procedure not worked for you take a look at another procedure here


Well you can go with other way to achieve what you need. Instead of creating one more shipping method in configuration which is called Free shipping you could set Shopping cart price rule. Then in Estimate shipping cost you will have automatic 0,00 in your shipping method staying same. It's not exact what you wanted in first place but in my opinion it's solving user experience problem with free shipping as he clearly can choose the shipping method of his choice with still seeing that he has achieved free shipping.



Override the file at below location by copying it into your stores theme folder :


folder location to copy the above file :


and add the code below exact before

<dl class="sp-methods">


code to be added :

    if ( array_key_exists('freeshipping', $_shippingRateGroups )) {
        $_shippingRateGroups = array('freeshipping' => $_shippingRateGroups['freeshipping']);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.