customize shipping method magento

customize shipping method magento

September 18, 2026 · Illustrated author avatarBy Stefan Bogdanescu
customize shipping method magento

Customizing Shipping Method Display in Magento Checkout

As a developer specializing in e-commerce platforms like Magento, I often receive queries from clients looking to customize their checkout process for a better user experience. One common request is to modify the shipping method display to show free shipping differently or remove radio buttons entirely.

In your case, you’ve located some relevant files such as /app/design/frontend/base/default/template/checkout/onepage/shipping.phtml and shipping_method.phtml. These are indeed part of the checkout process but don’t directly control the shipping method content you’re seeing.

Understanding the Magento Checkout Process

Magento’s checkout process is driven by several key components:

  1. Sales > Shipping Methods in the admin panel: This is where your flat rate and free shipping methods are configured.
  2. Checkout Index Controller: The main controller handling the checkout flow, including displaying shipping methods.
  3. Block Classes: Magento uses block classes like Mage_Checkout_Block_Cart_Shipping to generate the HTML for shipping methods.

Customizing Shipping Method Display

To achieve your desired layout, you’ll need to create a custom template file and override the existing one. Here’s a step-by-step guide:

1. Create a New Template File

In your theme directory (usually app/design/frontend/<your_package>/<your_theme>), navigate to the checkout folder and then to onepage. If it doesn’t exist, create the directory.

Inside this onepage folder, create a new file named shipping_method.phtml.

2. Modify the Shipping Method Template

Open your newly created shipping_method.phtml file and add the following code:

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * specific needs please refer to the following documentation:
 * http://magento.com/products/magento-connect/easy-customization.
 * Further information about the terms and conditions under which you are
 * authorized to use this Maggie eCommerce platform is available at
 * http://www.magentocommerce.com/license-agreements-magento.
 */

?>
<div class="shipping-method">
    <?php if ($isAvailable): ?>
        <div id="checkout-shipping-method-load">
            <div id="shipping-method-list" style="margin:0 -1px 30px;">
                <?php foreach($rates as $rate) { ?>
                    <?php if ($rate->getMethod() == 'free') {
                        echo '<p>Free Shipping</p>';
                    } else {
                        echo '<p>Flat Rate: '.($rate->getPrice()).'</p>';
                    }
                    ?>
                <?php } ?>
            </div>
        </div>
    <?php endif; ?>
</div>

This code checks for each shipping method. If it’s free, it simply displays “Free Shipping.” For other methods, it displays the flat rate price.

3. Refresh Cache and Checkout Page

After saving your changes, make sure to flush Magento’s cache from the admin panel (System > Cache Management). Then, navigate back to your checkout page to see the updated shipping method display.

Conclusion

In this guide, we’ve walked through the process of customizing the shipping method display in your Magento store. By creating a new template file and overriding Magento’s default behavior, you can achieve a cleaner, more user-friendly checkout experience for your customers.

Remember, when working with core files or templates, it’s always best practice to create child themes instead of directly modifying core files. This ensures that your customizations won’t be overwritten during updates.

If you’re looking for professional help in customizing your Magento store, feel free to reach out to the team at Laravel Company.

Happy coding!

Checkout Indexing Themes Admin

Our network