3

After adding this code in checkout_index_index.xml breadcrumbs are not shown.

<referenceBlock name="breadcrumbs">
        <action method="addCrumb">
            <argument name="crumbName" xsi:type="string">Home</argument>
            <argument name="crumbInfo" xsi:type="array">
                <item name="title" xsi:type="string">Home</item>
                <item name="label" xsi:type="string">Home</item>
                <item name="link" xsi:type="string">/</item>
            </argument>
        </action>
        <action method="addCrumb">
            <argument name="crumbName" xsi:type="string">Checkout</argument>
            <argument name="crumbInfo" xsi:type="array">
                <item name="title" xsi:type="string">Checkout</item>
                <item name="label" xsi:type="string">Checkout</item>
            </argument>
        </action>
    </referenceBlock>

Note:same works for checkout cart page but not for checkout page

3

Compare your code with given below code.

IF in theme already have a checkout_index_index.xml file then add below code.

<referenceBlock name="breadcrumbs">
<action method="addCrumb">
<argument name="crumbName" xsi:type="string">Home</argument>
<argument name="crumbInfo" xsi:type="array">
<item name="title" xsi:type="string">Home</item>
<item name="label" xsi:type="string">Home</item>
<item name="link" xsi:type="string">/</item>
</argument>
</action>
<action method="addCrumb">
<argument name="crumbName" xsi:type="string">Shopping Cart</argument>
<argument name="crumbInfo" xsi:type="array">
<item name="title" xsi:type="string">Shopping Cart</item>
<item name="label" xsi:type="string">Shopping Cart</item>
<item name="link" xsi:type="string">/checkout/cart</item>
</argument>
</action>
</referenceBlock>

In case there is no checkout_index_index.xml file in the layout folder, you have to create new one with such content (note the file format, it should be .xml):

    <?xml version="1.0"?>
    <!--
    /**
    * Copyright © 2015 Magento. All rights reserved.
    * See COPYING.txt for license details.
    */
    -->
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
        <move element="logo" destination="header-wrapper.grid-container"/>
        <referenceBlock name="page.preloader" remove="true" />
        <referenceBlock name="breadcrumbs">
        <action method="addCrumb">
        <argument name="crumbName" xsi:type="string">Home</argument>
        <argument name="crumbInfo" xsi:type="array">
        <item name="title" xsi:type="string">Home</item>
        <item name="label" xsi:type="string">Home</item>
        <item name="link" xsi:type="string">/</item>
        </argument>
        </action>
        <action method="addCrumb">
        <argument name="crumbName" xsi:type="string">Shopping Cart</argument>
        <argument name="crumbInfo" xsi:type="array">
        <item name="title" xsi:type="string">Shopping Cart</item>
        <item name="label" xsi:type="string">Shopping Cart</item>
        <item name="link" xsi:type="string">/checkout/cart</item>
        </argument>
        </action>
        </referenceBlock>
        </body>
    </page>

Run php bin/magento c:c

Run php bin/magento c:f

  • yes checked and not shows – Tirth Patel Oct 5 '18 at 4:59
  • Find in your whole magento directory is there add code like <referenceBlock name="breadcrumbs" remove="true"> – Chirag Patel Oct 5 '18 at 5:01
  • no there is not like this code in any file – Tirth Patel Oct 5 '18 at 5:14
  • It might be possible this block is override in another file. otherwise it is working form me. – Chirag Patel Oct 5 '18 at 5:19
  • yes there is custom module where checkout_index_index file override but that module was disabled is that creating issue? – Tirth Patel Oct 5 '18 at 5:26
2

make sure checkout_index_index.xml is in right place app/design/frontend/Vendor/default/Magento_Checkout/layout/checkout_index_index.xml

in your checkout_index_index.xml file paste below code

<referenceBlock name="breadcrumbs">
            <action method="addCrumb">
                <argument name="crumbName" xsi:type="string">Home</argument>
                <argument name="crumbInfo" xsi:type="array">
                    <item name="title" xsi:type="string">Home</item>
                    <item name="label" xsi:type="string">Home</item>
                    <item name="link" xsi:type="string">/</item>
                </argument>
            </action>
            <action method="addCrumb">
                <argument name="crumbName" xsi:type="string">Checkout</argument>
                <argument name="crumbInfo" xsi:type="array">
                    <item name="title" xsi:type="string">Checkout</item>
                    <item name="label" xsi:type="string">Checkout</item>
                </argument>
            </action>
        </referenceBlock>

run this command after adding code php bin/magento cache:clean && php bin/magento cache:flush

if you want also display breadcrubs into checkout shoping cart page follow this link

  • yes its placed right place still issue – Tirth Patel Oct 5 '18 at 4:56
  • make sure your custom app/code directory contains checkout_index_index.xml file? just search around there if yes then add above code there. – Hitesh Oct 5 '18 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.