1

Under my account page, I need to change the Account Navigation from left to right, along with My Orders block. My Account Dashborad will be on left side.

Also I need to add My Cart Block above My Orders Block.

For example:

My Account Dashboard                        My Account
                                            Account Dashboard
Recent Orders Block                         Account Information
                                            Address Book
                                            My Orders
                                            Billing Agreements
Account Information                         My Product Reviews
                                            My Tags

                                            My Cart Info
                                            My Cart Block

                                            My Orders Info
                                            My Orders Block

I tried changing the layout from 2columns-left.phtml to 2columns-right.phtml but its not working.

Also I have a blog extension with 2columns-right.phtml layout, so is it going to affect account navigation layout too.

6

try following way. Create a local.xml file inside layout folder to your active theme.

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

Because of you change template "columns-left" to "columns-right", so need to change navigation location from "left" to "right". example

<customer_account translate="label">
    <reference name="right">
        <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>
  • Thanks for responsind @Sohel Rana. But I have got two issues here. 1) How can I change navigation location using local.xml ? 2) My Archive Blog posts are viewed on right sidebar along with my account – Mark Apr 19 '14 at 10:42
  • 1) How can I change navigation location using local.xml ? - yes. – Sohel Rana Apr 19 '14 at 10:46
  • We usually do not put the whole code in local.xml, so what code I need to add in local.xml or add the complete code above ? – Mark Apr 19 '14 at 10:48
  • First portion of code change the template "columns-left" to "columns-right". If you need "my account" navigation (default place in left sidebar), then you can go with second portion. all code are place inside local.xml file inside<layout>...</layout> tag. – Sohel Rana Apr 19 '14 at 10:54
  • Yes that works fine but conflicting with my blog posts that are also displayed on right and has 2columns-right as layout – Mark Apr 19 '14 at 11:02

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.