0

I want to display products in registration side bar. i have added reference to customer.xml.

 <customer_account_index translate="label">
        <label>Customer My Account Dashboard</label>
         <reference name="right">
            <block type="reports/product_viewed" name="right.reports.product.viewed" template="catalog/product/list/featured.phtml" />
        </reference>
        <update handle="customer_account"/>
        <!-- Mage_Customer -->
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="my.account.wrapper">
            <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
                <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
                <block type="core/template" name="customer_account_dashboard_top" as="top" />
                <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
                <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
                <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
            </block>
        </reference>

    </customer_account_index>

but side bar is not display.

2
  • Could you please check in which folder you have changed the customer.xml file? ie theme / base / default folder. Magento took theme folder as the first priority. just and remove your reference name = right and confirm the right side bar appears or not.
    – alamelu
    Jul 5, 2014 at 18:03
  • Where are you trying to add this? On the page where a customer creates an account or the my accounts pages? Jul 6, 2014 at 10:55

1 Answer 1

1

Of course it won't display; did you notice:

<reference name="root">
    <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>

This template will not render the right column. You need to change the template to page/3columns.phtml.

However, you should not do any of this in customer.xml. Your module should specify its own update file, and then you can do both in there:

<customer_account_index>
    <reference name="root">
        <action method="setTemplate"><template>page/3columns.phtml</template></action>
    </reference>
    <reference name="right">
        <block type="reports/product_viewed" name="right.reports.product.viewed" template="catalog/product/list/featured.phtml" />
    </reference>
</customer_account_index>
2
  • Surely page/2columns-RIGHT.phtml will render the right column just like 3columns.phtml would? Jul 6, 2014 at 10:57
  • 1
    I assume OP still wants the left column as well.
    – benmarks
    Jul 6, 2014 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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