Magento 1.9 breadcrumbs does not display

0

I'm working on a magento ecommerce, but I was not the one who set up or installed it, I'm just doing the CSS of it, however, the site does not display the breadcrumbs.

Inside the "page / html / breadcrumbs.phtml" file I made a var_dump in the $ crumbs variable and it is always empty.

In the XML only in one situation the breadcrumbs is displayed in the frontend, when I insert the code inside the "default" tag if I put this code inside "customer_account_login" for example, nothing will be displayed on the front.

Code from my breadcrumbs.phtml

<?php if($crumbs && is_array($crumbs)): ?>
<div class="breadcrumbs">
    <ul>
        <?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
            <li class="<?php echo $_crumbName ?>">
            <?php if($_crumbInfo['link']): ?>
                <a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>"><?php echo $this->htmlEscape($_crumbInfo['label']) ?></a>
            <?php elseif($_crumbInfo['last']): ?>
                <strong><?php echo $this->htmlEscape($_crumbInfo['label']) ?></strong>
            <?php else: ?>
                <?php echo $this->htmlEscape($_crumbInfo['label']) ?>
            <?php endif; ?>
            <?php if(!$_crumbInfo['last']): ?>

            <?php endif; ?>
            </li>

        <?php endforeach; ?>
    </ul>
</div>
<?php endif; ?>

Part of my costumer.xml code:

<?xml version="1.0"?>

    <layout version="0.1.0">

        <default>
            <!-- Mage_Customer -->
            <reference name="top.links">
                <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
            </reference>

            <!-- AQUI, EM TODAS AS TELAS ATÉ MESMO FORA DO COSTUMER ELE IMPRIME O BREADCRUMBS HOME/MY ACCOUNT -->
            <reference name="breadcrumbs">
                <action method="addCrumb">
                    <crumbName>Home</crumbName>
                    <crumbInfo><label>Home</label><title>Home</title><link>/</link></crumbInfo>
                </action>
                <action method="addCrumb">
                    <crumbName>My Account</crumbName>
                    <crumbInfo><label>My Account</label><title>My Account</title><link>/customer/account/</link></crumbInfo>
                </action>
            </reference>
        </default>

        <!-- Load this update on every page when customer is logged in -->
        <customer_logged_in>
            <reference name="top.links">
                <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
            </reference>
        </customer_logged_in>

        <!-- Load this update on every page when customer is logged out -->
        <customer_logged_out>
            <reference name="top.links">
                <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
            </reference>
            <remove name="reorder"></remove>
        </customer_logged_out>

        <!-- Layout for customer login page -->
        <customer_account_login translate="label">
            <label>Customer Account Login Form</label>
            <!-- Mage_Customer -->
            <remove name="right"/>
            <remove name="left"/>

            <reference name="root">
                <action method="setTemplate"><template>page/1column.phtml</template></action>
            </reference>
            <reference name="content">
                <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
            </reference>
        </customer_account_login>

Notice that I put it as an example there in "default", when it is there, on all the screens .. contact, cms, products, category, my account etc ... it prints the breadcrumbs home / my account. .

If I move this piece of code into "customer_account_login", on all screens it returns $ crumbs as null, not displaying anything.

I have no idea what's going on.

    
asked by anonymous 01.08.2018 / 17:47

0 answers