Magento checkout - remove "Subtotal" and the "Shipping & Handling (Flat Rate - Fixed)"

Magento checkout - remove "Subtotal" and the "Shipping & Handling (Flat Rate - Fixed)"

July 11, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento checkout - remove "Subtotal" and the "Shipping & Handling (Flat Rate - Fixed)"

Removing Unwanted Lines from Magento Checkout

If you’re running an e-commerce store using Magento, you might find that some of the default checkout fields aren’t necessary for your business model. For example, if you offer free shipping to all customers, those shipping and handling lines become redundant.

In this post, I’ll guide you through removing “Subtotal” and the specific “Shipping & Handling (Flat Rate - Fixed)” line from the Magento one-page checkout page (/checkout/onepage/). Let’s dive right in!

Understanding the Checkout Process

Before we begin, it’s important to understand that Magento’s checkout is built on a combination of PHP functions and XML layout updates. The appearance of these lines isn’t hardcoded into files; instead, they are defined through various configuration settings.

In most cases, to remove an element from the checkout page, you’ll need to override the template file responsible for rendering it. This involves creating a custom theme and extending the base template with your own version that omits the unwanted lines.

Step 1: Create a Custom Theme

First, create a new folder in app/design/frontend named after your package (e.g., laravelTheme). Inside this folder, create another folder called Magento_checkout. This is where we’ll create our custom template file.

If you haven’t already, make sure you have set up Magento to allow for custom theme creation. You can find detailed instructions in the official Magento documentation.

Step 2: Identify and Override the Template File

The “Subtotal” line is rendered by the summary.html file located at vendor/magento/module-checkout/view/frontend/templates/summary.phtml. To override this, create a new file with the same name in your custom theme folder (app/design/frontend/laravelTheme/Magento_checkout/templates/summary.phtml).

Step 3: Remove the Unwanted Lines

Open the default summary.html file and locate the lines responsible for rendering the “Subtotal” and “Shipping & Handling (Flat Rate - Fixed)” text. The exact line numbers may vary depending on your Magento version, but they should be easily identifiable by their content.

For example, in Magento 2.4, you’ll find something like this:

<div class="field subtotal">
    <label class="label" for="subtotal"><span data-bind="i18n: 'Subtotal'"></span></label>
    <div class="control" data-bind="css: {'required-entry': !billingAddress().isAvailable()}">
        <input type="text"
               name="subtotal"
               id="subtotal"
               data-bind="attr: {disabled: isDisabled, 'data-sortable': sortables}, visible: subtotal() != 0, valueInsertion: subtotal, bindValueInsertion: subtotal"
               class="input-text"
               readonly="true"/>
    </div>
</div>

<div class="field shipping-handling">
    <label class="label" for="shipping-handling"><span data-bind="i18n: 'Shipping &amp; Handling (Flat Rate - Fixed)'"></span></label>
    <div class="control">
        <input type="text"
               name="shipping-handling"
               id="shipping-handling"
               data-bind="attr: {'data-sortable': sortables}, visible: shippingCost() != 0, valueInsertion: shippingCost, bindValueInsertion: shippingCost"
               class="input-text"
               readonly="true"/>
    </div>
</div>

You can simply delete these two div sections—everything between the <div class="field subtotal"> and the closing </div> tag—to remove them from your checkout page.

Step 4: Add Your Custom Text

To replace the removed lines with your own text, you can add custom HTML elements within the template file. For example:

<div class="your-custom-text">
    <label class="label"><span>Your First Custom Text</span></label>
    <div class="control">
        <input type="text" readonly="true" value="Your First Custom Text Value"/>
    </div>
</div>

<div class="another-custom-text">
    <label class="label"><span>Your Second Custom Text</span></label>
    <div class="control">
        <input type="text" readonly="true" value="Your Second Custom Text Value"/>
    </div>
</div>

Step 5: Update Your Theme Configuration

Finally, you need to tell Magento to use your custom template file instead of the default one. Open app/design/frontend/laravelTheme/Magento_checkout/etc/view.xml (create it if it doesn’t exist) and add the following:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Laravel Theme</title>
    <parent>Magento/blank</parent>
    <media>
        <images>
            <image id="preview" size="240x240">Media/LaravelTheme/logo.png</image>
        </images>
    </media>
    <templates>
        <template file="Magento_Checkout/summary.phtml"/>
    </templates>
</theme>

Conclusion

Removing unnecessary lines from the Magento checkout page is a straightforward process once you understand how to override template files. By following this guide, you’ve successfully removed “Subtotal” and the specific shipping line while adding your own custom text.

Remember that customizing Magento requires careful attention to version compatibility and proper file permissions. Always backup your files before making changes, and consider consulting with a professional developer if you’re unsure about any aspect of the process.

For more advanced customizations, I recommend exploring Laravel Company’s extensive range of Magento development services. They provide expert guidance on everything from theme creation to complex module integration.

Happy coding!

Checkout Themes Configuration Customers

Our network