Hello Magento Folks,

In this article, I will illustrate How to add Custom Tab in Customer Account in Magento 2. Also, check out our previously published blog where I have discussed 7 Proven Steps to Speed up Your Magento 2 Store

Basically, by default, Magento 2 provides settings where the store customers will automatically redirect to the customer account dashboard after the registration or login process. Mainly the customer account dashboard includes  My Account, My Orders, My Wishlist sections. 

Despite that, in many situations to increase the user experience during shopping from your store all the online store owners prefer to provide addon tabs for the customers to the dashboard for reviewing their processing refunds, query ticket, or many such types of custom requirements. Unfortunately, by default, Magento 2 does not provide such add-on features. Hence to fulfill this requirement the admin needs to add Custom Tab in the Customer Account in Magento 2. Check out the below steps to add a custom tab in customer’s accounts.

Steps to add Custom Tab in Customer Account in Magento 2:

Step 1: Firstly, we will need to Create Customer Account Layout

For this create a file namely customer_account.xml in the below-given path and add the following code respectively.

app\code\Vendor\Extension\view\frontend\layout\

Step 2: Create routes.xml in the below-given path and add the following code respectively.

app\code\Vendor\Extension\etc\frontend\

Step 3: Now navigate to the following path and create the routesname_customer_index.xml file and add the below-given code to it.

app\code\Vendor\Extension\view\frontend\layout\

Step 4: Create a file namely the Index.php file in the below-given path and add the following code respectively.

app\code\Vendor\Extension\Controller\Customer\

Step 5: At last,  create customtab.phtml file as given below path add code.

app\code\Vendor\Extension\view\frontend\templates

Output: 

custom tab

That’s It, You are done with adding Custom Tab in Customer Account in Magento 2.

Wrap Up:

Most probably all are able to follow the above illustration step by step and successfully added the Custom Tab in Customer Account in your Magento 2 store. If you need any help then you can reach our certified developers for precisely adding the Custom Tab in Customer Account in your Magento 2 store.

Comment down your views or difficulties if any in the comment section below.

Share the article with your Magento Developer Friends.

Happy Reading.

[Total: 6   Average: 5/5]