when you want to add a custom tab in the Customer information (Magento admin), this article will help you out for adding a custom tab.

3 different methods we have described below which will help you to add a custom tab in Customer information (Magento admin)

Method 1:

Override the file /app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php,

Inside _beforeToHtml() method, add the following code:

Override the file /app/code/core/Mage/Adminhtml/controllers/CustomerController.php,

Add the following code:

Create the file /app/code/core/Namespace/ModuleName/Block/Adminhtml/Customer/Edit/Tab/ and create Custom.php,

Add the following source code to the file:

Now, you need to create a template file.

Go to /app/design/adminhtml/default/default/template/modulename/customer/tab/ and create custom.phtml,

Write your code here.

Method 2:

Add this code to your custom module config.xml located at Namespace/ModuleName/etc/config.xml,

Now create one Observer at Namespace/ModuleName/Model/Observer.php,

Override the file /app/code/core/Mage/Adminhtml/controllers/CustomerController.php,

Add the following code:

Create the file /app/code/core/Namespace/ModuleName/Block/Adminhtml/Customer/Edit/Tab/ and create Custom.php,

Add the following source code to the file:

Now, you need to create a template file.

Go to /app/design/adminhtml/default/default/template/modulename/customer/tab/ and create custom.phtml,

Write your code here.

Method 3:

Go to app/code/local/Namespace/Modulename/etc/config.xml,

Go to app/design/adminhtml/default/default/layout/modulename.xml,

Go to app/code/local/Namespace/ModuleName/Block/Adminhtml/Customer/Tab.php,

Go to app/design/adminhtml/default/default/template/modulename/customer/tab.phtml,

————————————————————————————————————————————————————————————————————–

Result :

Customer tab in customer_info

 

Issue Fixed By: Nimit Shah

Guided By: Sunil Patel