Requirements vary from business to business. And by default Magento allows store owners to manage several different customer information from the store backend. But it’s not useful to every store owner depending on their business type. At that time instead of manually finding and collecting that information in one place. The best thing we can do is customized our Magento store according to our need and that’s how Magento Custom Development comes in picture.
Recently, one of the customers has asked us about adding a new custom tab in the Magento Customer Edit page. So, he can easily grab all the required information at once place in the store back end. In order to do this, we have created one separate tab in the customer Magento 2 admin. Sharing such useful code with you guys also help you to customize and collect your business information in less than a minute and it will also save your time and efforts that you can use for planning store stuff.
So, let’s get started with these 3 steps tiny guide.
In the first step, we need to create “Customer_index_edit.xml” file inside our layout folder using below code.
app\code\Vendor\Extension\view\adminhtml\layout\customer_index_edit.xml

Now we need to create one Block file “View.php” at the following path.
app\code\Vendor\Extension\Block\Adminhtml\Customeredit\Tab\View.php

In third and last step we need to create “customtab_view.phtml” at below path.
app\code\Vendor\Extension\view\adminhtml\templates\tab\customtab_view.phtml
That’s it. Simply clear cache and you are done with adding your custom tab inside Magento 2 store backend Edit customer page. You can add one or more elements to “customtab_view.phtml” according to your need for collecting information at one place.

That’s it for today, Let us know if you are facing an issue while implementing using this code by commenting below.

Happy Coding!

Click to rate this post!
[Total: 9 Average: 4.8]