Customize Magento checkout summary (Magento 2.x.x)

Customize Magento checkout summary (Magento 2.x.x)

July 18, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Customize Magento checkout summary (Magento 2.x.x)

Customizing Magento Checkout Summary in Magento 2

Adding custom fields and elements to the Magento checkout summary is a common requirement for e-commerce stores looking to enhance their checkout process and provide additional information to customers before finalizing their orders. In this guide, we will walk you through the step-by-step process of customizing the checkout summary in Magento 2.

Understanding the Checkout Process

Before diving into the code modifications, it is essential to understand how Magento’s checkout process works. The checkout summary appears on the review page and displays a summary of the customer’s selected products, quantities, prices, taxes, and shipping information.

By default, Magento uses knockout.js templates and HTML files to render the checkout summary. To make changes, you will need to create custom templates that override the existing ones.

Step 1: Create a Custom Theme

If you haven’t already, start by creating a child theme for your Magento installation. This allows you to make modifications without directly affecting the core files. You can follow the official Magento documentation on creating and configuring themes.

Step 2: Override the Checkout Summary Templates

To customize the checkout summary, you need to create custom knockout.js templates that will override the default ones.

  1. Navigate to your child theme’s directory.
  2. Create a new folder named checkout inside the Magento_Checkout module.
  3. Inside the checkout folder, create two sub-folders: summary and summary.html.
  4. Open the summary.html file in your preferred code editor.

Step 3: Add Custom Fields

To add custom fields to the checkout summary, you need to modify the HTML structure inside the summary.html file. For example, let’s assume you want to add a text field for a special instruction:

<div class="checkout-order-summary">
    <table id="checkout-review-table" class="data-table summary">
        <thead>
            <tr>
                <!-- Existing table header -->
            </tr>
        </thead>
        <tbody>
            <!-- Existing table body -->
        </tbody>
        <tfoot>
            <!-- Existing footer -->
        </tfoot>
    </table>

    <div id="checkout-order-totals">
        <h2 class="summary-heading">Summary</h2>
        <dl id="checkout-review-total-discounts" class="totals">
            <!-- Existing discount section -->
        </dl>
        <dl id="checkout-review-total-checkout-methods" class="totals">
            <!-- Existing payment methods section -->
        </dl>

        <!-- Add custom fields here -->
        <div id="custom-field-container">
            <label for="special-instruction">Special Instruction:</label>
            <input type="text" name="special_instruction" id="special_instruction" />
        </div>
    </div>
</div>

Step 4: Update the Checkout Summary Script

Now that you have modified the HTML structure, you need to update the corresponding knockout.js script. Create a new file named summary.js inside your child theme’s Magento_Checkout module.

In this file, you can define additional data bindings for your custom fields:

define([
    'jquery',
    'ko'
], function ($, ko) {
    'use strict';

    return function (config) {
        config = $.extend({}, config);

        // Define a new observable property for the special instruction field
        config.specialInstruction = ko.observable('');

        // Update the checkout summary with your custom fields
        config.updateSummary = function(summaryElement, totalsElement) {
            // Existing update code...

            // Update the custom field container with the new property
            var customFieldContainer = totalsElement.find('#custom-field-container');
            if (customFieldContainer.length > 0) {
                customFieldContainer.find('#special-instruction').val(config.specialInstruction());
            }
        };

        return config;
    };
});

Step 5: Flush Cache and Verify Changes

After saving your modifications, flush the Magento cache using the command bin/magento cache:flush. Then, navigate to the checkout page of your storefront.

You should now see your custom fields added to the checkout summary. Customers can enter their special instructions before proceeding with the order placement.

Conclusion

Customizing the Magento checkout summary allows you to enhance the user experience by providing additional information and functionality during the checkout process. By following this guide, you have learned how to create a child theme, override knockout.js templates, and add custom fields to the checkout summary.

Remember that it is always recommended to make modifications in a development environment before deploying them to your live store. This ensures minimal disruption to your existing customers’ experience.

If you need further assistance or want to explore more advanced customizations for Magento 2, don’t hesitate to check out our Magento 2 services at Laravel Company. Our team of experienced developers is ready to help you transform your e-commerce store into a powerful and user-friendly platform.

Happy coding!

Magento 2 Checkout Catalog Themes

Our network