Magento 1.9 – Customer Account Navigation Missing from Left Column

layoutlocal.xmlmagento-1.9xml

I have a issue where my customer account navigation is missing from the left column in the account area.

In my customer.xml file:

<customer_account translate="label">
    <label>Customer My Account (All Pages)</label>
    <!--remove name="catalog.compare.sidebar"/>
    <remove name="sale.reorder.sidebar"/-->
    <!-- Mage_Customer -->
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>

    <reference name="content">
        <block type="page/html_wrapper" name="my.account.wrapper" translate="label">
            <label>My Account Wrapper</label>
            <action method="setElementClass"><value>my-account</value></action>
        </block>
    </reference>

    <reference name="left">
        <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
            <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
            <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
            <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
        </block>
        <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
            <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
        </block>
        <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
        <remove name="tags_popular"/>

    </reference>
</customer_account>

When I change <reference name="left"> to <reference name="content"> the navigation is being displayed in the content column therefore I belive it has something to do with the reference name "left" element.

In my 2column-left.phtml file I got this:

!DOCTYPE html>
<html>
<head>
    <?php echo $this->getChildHtml('head') ?>
</head>

<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>

<?php echo $this->getChildHtml('after_body_start') ?>
<?php echo $this->getChildHtml('header') ?>

<div class="container b30 t30">
    <?php echo $this->getChildHtml('global_notices') ?>
    <?php echo $this->getChildHtml('breadcrumbs') ?>

    <div class="row">
        <aside class="col-md-3">
        <?php echo $this->getChildHtml('left') ?>
        </aside>
        <div class="col-md-9">
            <?php

                $yourUrlKey = 'tpd';
                $yourUrlKey2 = 'tdp-faq';
                $cmsPageUrlKey = Mage::getSingleton('cms/page')->getIdentifier();
                    
                if($yourUrlKey == $cmsPageUrlKey || $yourUrlKey2 == $cmsPageUrlKey) { ?>
                    
                    <div class="three-buttons mB20">
                        <a class="button green mR20" href="/safety-data/">Safety Data</a> <a class="button green mR20 tpd" href="/tpd/">TOBACCO PRODUCTS DIRECTIVE</a> <a class="button green mR20 faq" href="/tdp-faq/">FAQs</a> <a class="button green" target="_blank" href="https://www.domain.com/new_order_form.xlsx">Download Our Order Form</a>
                    </div>
                    
                <?php } ?>
            <?php echo $this->getChildHtml('global_messages') ?>
            <?php echo $this->getChildHtml('content') ?>
            
        </div>
    </div>
</div>

<?php echo $this->getChildHtml('footer') ?>
<?php echo $this->getChildHtml('before_body_end') ?>
<?php echo $this->getAbsoluteFooter() ?>

Best Answer

As you got solution But I want to give some suggestion,

As you found that issue with <remove name="left"/>

because this thing remove from default handler,

If you remove something in default handler then it will never get loaded again by any other handler.

If you remove any block from handler then you cannot re load that block

If you want to load it again that block in that particular block then always use unset.

And specially if you are developing an extension then don't use remove always use unset as a best practice

Related Topic