Home » Magento25 March 2013

Magento: Add new tab to Customer Account Section

Suppose, you have a custom Magento module and you wanted to add a custom tab to “Customer My Account” section, i.e. the frontend part displayed after customer login.

Here is the solution:-

Let’s suppose, your module’s name is Yourmodule.

1) Add these xml code in app/design/frontend/your_package/your_theme/layout/yourmodule.xml

Note:- In default Magento settings, your_package = default & your_theme = default, i.e. if you are using the default Magento theme and package then your path will be app/design/frontend/default/default/layout/

yourmodule.xml is the layout file for your module.

2) Create controller class file app/code/local/YourNamespace/Yourmodule/controllers/CustomerController.php

3) Create a block class app/code/local/YourNamespace/Yourmodule/Block/Customer.php

4) Create template file app/design/frontend/your_package/your_theme/template/yourmodule/customer/view.phtml

Add some random text on view.phtml

Now you should be able to see a new tab in ‘Customer My Account’ section.

Hope it helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Here it is great platform for the developer and coders to get the complete information with coding and also update news regarding the magento is well.

  • vadim

    Followed all the steps but can not see the tab in admin section of customer.
    can you tell me whether i am missing something ?

  • John Doe

    This code works for me but
    “code lines in viewAction() function in CustomerController.php file not workes for me.

    What wrong I am doing. If I am commenting these 3 lines and echo any string there works fine.. but only string and not any magento layout.