سؤال

I have been struggling with my Magento 1.9.2.4 store. Left customer account navigation is missing and I can't get it back. Been searching for hours and hours and can't find the answer, maybe one of you will take a challenge to help me find out what is wrong with my layout.

It seems like there is a problem with my "left" reference (I think) because nothing is being displayed in the left column in any two column left pages. Customer Account Navigation is what worries me the most really need to get this back urgently.

I use boilerplate theme on my store. I had a look in my 2columns-left.phtml file and here are the details:

    <?php
    ?>
    ?>
    <!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') ?>
            <?php echo $this->getChildHtml('breadcrumbs') ?>
        </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.vampirevape.co.uk/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() ?>

The <?php echo $this->getChildHtml('left') ?> is being called but unfortunately there is nothing being displayed in my 2column-left pages. I have added the breadcrumbs again and they are working in this div.

Like I said it is the customer account navigation that worries me the most so I had a look in the /http/app/design/frontend/base/default/layout customer.xml file and here is the part of it:

    <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>
        <action method="addBodyClass"><class>customer-account</class></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>

It look like the navigation is set to be under the left referance but nothing is being displayed in the customer account left column. When I change the <reference name="left"> to <reference name="content"> all the links are being displayed in the main column which makes me think is has something to do with the <reference name="left"> element but I have no idea what that could be.

I would really appreciate all your help!

Kind regards, Greg

هل كانت مفيدة؟

المحلول

Finally i found what the problem was. I only took over from someone else and only getting my head around the system.

The problem was, there was a

<layout version="1.0">
<default><remove name="left"/></default>

element in one of the custom modules written by someone. Removing the

<remove name="left"/>

fixed my problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top