Set breadcrumb for one of the pages of Magento?

Set breadcrumb for one of the pages of Magento?

August 9, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Set breadcrumb for one of the pages of Magento?

Enhancing Breadcrumbs for Your Magento Store: A Step-by-Step Guide

As a developer, you understand that navigation is key to providing an optimal user experience on your e-commerce website. One of the most important elements of navigation is the breadcrumb trail, which helps users orient themselves within your site’s hierarchy.

Let’s address the issue faced by Princessly.com—how to set the breadcrumb for the checkout cart page from “Home >>” to “Home >> Shopping Cart.”

Understanding Magento Breadcrumbs

In Magento, the breadcrumb navigation is defined in the Mage_Page_Block_Breadcrumbs block. This block fetches the current category and constructs the breadcrumb trail based on that.

However, for a custom page like the shopping cart, we need to manually define the breadcrumb.

Manipulating Breadcrumbs in Magento

To customize the breadcrumb for the checkout cart page, you’ll need to modify the catalog.xml layout file. This file is located at app/design/frontend/{package}/{theme}/layout/catalog.xml.

Here’s how to do it:

  1. Open the catalog.xml file and find the <checkout_cart_index> node.

  2. Inside this node, add a new element for the breadcrumb:

<reference name="breadcrumbs">
  <action method="addCrumbLink" translate="label">
    <crumbName>shopping_cart</crumbName>
    <title>Shopping Cart</title>
    <parentId>home.catalog.category.breadcrumbs</parentId>
  </action>
</reference>
  1. Save the file and clear your cache using php bin/magento cache:clean.

This modification tells Magento to add a new breadcrumb link for the shopping cart, using “Shopping Cart” as the title.

Verifying the Changes

After making these changes and clearing the cache, visit your website’s checkout cart page. You should now see “Home >> Shopping Cart” as the breadcrumb trail.

Remember, any time you want to modify a Magento template or layout, it’s best practice to work in a child theme rather than directly editing the core files. This ensures that your changes are not overwritten during updates.

Conclusion

Setting custom breadcrumbs for specific pages in Magento requires a basic understanding of how the system constructs navigation and how to manipulate XML layouts. By following these steps, you can ensure that your users always have clear guidance as they navigate through their shopping journey.

For more advanced customizations and insights into Magento development best practices, I recommend checking out our comprehensive guides on LaravelCompany’s Magento Development Blog.

Checkout Catalog Cache Themes

Our network