set breadcrumb for Magento One Step Checkout page

set breadcrumb for Magento One Step Checkout page

October 4, 2026 · Illustrated author avatarBy Stefan Bogdanescu
set breadcrumb for Magento One Step Checkout page

Setting Up Breadcrumb for Magento One Step Checkout Page

Hello! I understand that you’re new to Magento and need help setting up breadcrumbs on your one-step checkout page. Let’s dive into how we can achieve this.

Understanding the Default Breadcrumbs in Magento

By default, Magento includes a built-in module (Mage_Cms in older versions or Magento_Theme in later versions) that handles the generation of breadcrumb navigation for CMS pages and category pages. However, the one-step checkout page is not covered by this default functionality.

How to Add Breadcrumbs to One Step Checkout Page

To add custom breadcrumbs to your one-step checkout page, you’ll need to modify the layout XML files located in your theme’s directory under app/design/frontend/<your_website>/<your_theme> or use a template override if you’re following Magento 2 best practices.

Option A: Modifying Layout Files

You can add breadcrumbs directly to the one-step checkout page by modifying the existing layout XML files. Here’s how:

  1. Open onepagecheckout.xml in your theme directory (or create it if it doesn’t exist).

  2. Add a new reference block for ‘breadcrumbs’ inside the <reference name="root">...</reference> section, as shown in the code snippet you provided.

  3. Inside this new <reference name="breadcrumbs">... section, add two action methods to set up your custom breadcrumb navigation:

<action method="addCrumb" translate="label,title">
    <name>home</name>
    <params>
        <label>Home</label>
        <title>Home</title>
        <link/>
    </params>
</action>

<action method="addCrumb" translate="label,title">
    <name>One Page Checkout</name>
    <params>
        <label>OnePage Checkout</label>
        <title>OnePage Checkout</title>
        <link>onepagecheckout</link>
    </params>
</action>

The first action sets the “Home” crumb, and the second one sets the “One Page Checkout” crumb. The translate attribute is used to enable translation for both the label and title.

  1. Save your changes and clear the cache using a command like this (if you’re using Magento 2):
php bin/magento cache:clean

Option B: Using a Template Override

If you prefer following Magento 2 best practices, you should create an override template for the breadcrumbs block. Here’s how:

  1. Create a new directory app/design/frontend/<your_website>/<your_theme>/Magento_Backend/templates/breadcrumbs.phtml.

  2. Inside this file, add your custom HTML structure for the breadcrumb navigation.

  3. In your theme’s layout XML (e.g., onepagecheckout.xml), remove any existing references to the ‘breadcrumbs’ block and replace them with a reference to your new template:

<referenceBlock name="breadcrumbs" template="Magento_Backend::breadcrumbs.phtml"/>
  1. Clear the cache using the command from Option A.

Conclusion

Setting up custom breadcrumbs for the one-step checkout page involves modifying layout XML files or creating template overrides, depending on your preference and Magento version.

The code snippet you provided is a good starting point but lacks some necessary attributes like title for SEO purposes. Make sure to include those in your final implementation.

Remember, whenever you’re working with layout files, it’s always a good idea to create a child theme or use a template override to avoid overwriting core Magento files and causing issues during updates.

If you’re looking for more advanced customization tips and in-depth guides on Magento development, feel free to explore the resources available at Laravel Company.

Happy coding!

Magento 2 Checkout Catalog Extensions

Our network