How to add custom customer attribute in custom tab in customer edit page of admin in magento2magento 2.1 grid on custom tab of admin product edit pageHow to add custom customer attribute in customer edit account pageCustom attribute - Product pageMagento 2: How to edit existing product tabMagento 2 Add Group Title and its own Tabs in Customer Admin edit viewHow to send data from custom fields to a function in admin customer editHow to show custom attributes of customer in separate/new tabMagento 2: Custom Customer Attributes Showing in Customer Grid but Not Admin Account
How can an organ that provides biological immortality be unable to regenerate?
When should a starting writer get his own webpage?
Should I be concerned about student access to a test bank?
How to remove space in section title at KOMA-Script
Does convergence of polynomials imply that of its coefficients?
Why doesn't the fusion process of the sun speed up?
Does fire aspect on a sword, destroy mob drops?
Asserting that Atheism and Theism are both faith based positions
Why is indicated airspeed rather than ground speed used during the takeoff roll?
Would storms on an ocean world harm the marine life?
Single word to change groups
Help with identifying unique aircraft over NE Pennsylvania
Jem'Hadar, something strange about their life expectancy
Would it be believable to defy demographics in a story?
When did hardware antialiasing start being available?
How can a new country break out from a developed country without war?
Exit shell with shortcut (not typing exit) that closes session properly
pipe commands inside find -exec?
Can "few" be used as a subject? If so, what is the rule?
How do researchers send unsolicited emails asking for feedback on their works?
If I cast enlarge/reduce on an arrow, what weapon could it count as?
How to read string as hex number in bash?
What is the reasoning behind standardization (dividing by standard deviation)?
How can I query the supported timezones in Apex?
How to add custom customer attribute in custom tab in customer edit page of admin in magento2
magento 2.1 grid on custom tab of admin product edit pageHow to add custom customer attribute in customer edit account pageCustom attribute - Product pageMagento 2: How to edit existing product tabMagento 2 Add Group Title and its own Tabs in Customer Admin edit viewHow to send data from custom fields to a function in admin customer editHow to show custom attributes of customer in separate/new tabMagento 2: Custom Customer Attributes Showing in Customer Grid but Not Admin Account
I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.
I want to show them in my custom tab.
magento-2.1 php
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.
I want to show them in my custom tab.
magento-2.1 php
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
found the solution for this?
– CompactCode
Mar 29 '18 at 2:52
Any body know solution ?
– amit_game
Jul 31 '18 at 5:55
I need a solution, too.
– skymeissner
Sep 28 '18 at 13:07
the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab
– David Verholen
Jan 11 at 21:12
add a comment |
I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.
I want to show them in my custom tab.
magento-2.1 php
I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.
I want to show them in my custom tab.
magento-2.1 php
magento-2.1 php
edited Jul 27 '17 at 12:25
Teja Bhagavan Kollepara
3,00641949
3,00641949
asked Jun 7 '17 at 13:36
Mohit chauhanMohit chauhan
34219
34219
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 7 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
found the solution for this?
– CompactCode
Mar 29 '18 at 2:52
Any body know solution ?
– amit_game
Jul 31 '18 at 5:55
I need a solution, too.
– skymeissner
Sep 28 '18 at 13:07
the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab
– David Verholen
Jan 11 at 21:12
add a comment |
found the solution for this?
– CompactCode
Mar 29 '18 at 2:52
Any body know solution ?
– amit_game
Jul 31 '18 at 5:55
I need a solution, too.
– skymeissner
Sep 28 '18 at 13:07
the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab
– David Verholen
Jan 11 at 21:12
found the solution for this?
– CompactCode
Mar 29 '18 at 2:52
found the solution for this?
– CompactCode
Mar 29 '18 at 2:52
Any body know solution ?
– amit_game
Jul 31 '18 at 5:55
Any body know solution ?
– amit_game
Jul 31 '18 at 5:55
I need a solution, too.
– skymeissner
Sep 28 '18 at 13:07
I need a solution, too.
– skymeissner
Sep 28 '18 at 13:07
the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab
– David Verholen
Jan 11 at 21:12
the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab
– David Verholen
Jan 11 at 21:12
add a comment |
1 Answer
1
active
oldest
votes
To create a new tab in the admin customer edit, create a xml in the following path
Step 1:
/app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml
<body>
<referenceBlock name="customer_form">
<block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
<action method="setTabLabel">
<argument name="label" xsi:type="string">Test Tab</argument>
</action>
</block>
</referenceBlock>
</body>
Step 2:
Create a block file in the below path to load the contents when the tab is clicked
/app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php
<?php
namespace VendornameModulenameBlockAdminhtmlEditTab;
use MagentoCustomerControllerRegistryConstants;
use MagentoUiComponentLayoutTabsTabInterface;
class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
null
*/
public function getCustomerId()
return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabLabel()
return __(‘Tab label’);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabTitle()
return __(‘Tab Title’);
/**
* @return bool
*/
public function canShowTab()
if ($this->getCustomerId())
return true;
return false;
/**
* @return bool
*/
public function isHidden()
if ($this->getCustomerId())
return false;
return true;
/**
* Tab class getter
*
* @return string
*/
public function getTabClass()
return '';
/**
* Return URL link to Tab content
*
* @return string
*/
public function getTabUrl()
//replace the tab with the url you want
return $this->getUrl('test/*/test', ['_current' => true]);
/**
* Tab should be loaded trough Ajax call
*
* @return bool
*/
public function isAjaxLoaded()
return true;
Your new test tab will be added to customer edit left side menu.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f177902%2fhow-to-add-custom-customer-attribute-in-custom-tab-in-customer-edit-page-of-admi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
To create a new tab in the admin customer edit, create a xml in the following path
Step 1:
/app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml
<body>
<referenceBlock name="customer_form">
<block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
<action method="setTabLabel">
<argument name="label" xsi:type="string">Test Tab</argument>
</action>
</block>
</referenceBlock>
</body>
Step 2:
Create a block file in the below path to load the contents when the tab is clicked
/app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php
<?php
namespace VendornameModulenameBlockAdminhtmlEditTab;
use MagentoCustomerControllerRegistryConstants;
use MagentoUiComponentLayoutTabsTabInterface;
class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
null
*/
public function getCustomerId()
return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabLabel()
return __(‘Tab label’);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabTitle()
return __(‘Tab Title’);
/**
* @return bool
*/
public function canShowTab()
if ($this->getCustomerId())
return true;
return false;
/**
* @return bool
*/
public function isHidden()
if ($this->getCustomerId())
return false;
return true;
/**
* Tab class getter
*
* @return string
*/
public function getTabClass()
return '';
/**
* Return URL link to Tab content
*
* @return string
*/
public function getTabUrl()
//replace the tab with the url you want
return $this->getUrl('test/*/test', ['_current' => true]);
/**
* Tab should be loaded trough Ajax call
*
* @return bool
*/
public function isAjaxLoaded()
return true;
Your new test tab will be added to customer edit left side menu.
add a comment |
To create a new tab in the admin customer edit, create a xml in the following path
Step 1:
/app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml
<body>
<referenceBlock name="customer_form">
<block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
<action method="setTabLabel">
<argument name="label" xsi:type="string">Test Tab</argument>
</action>
</block>
</referenceBlock>
</body>
Step 2:
Create a block file in the below path to load the contents when the tab is clicked
/app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php
<?php
namespace VendornameModulenameBlockAdminhtmlEditTab;
use MagentoCustomerControllerRegistryConstants;
use MagentoUiComponentLayoutTabsTabInterface;
class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
null
*/
public function getCustomerId()
return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabLabel()
return __(‘Tab label’);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabTitle()
return __(‘Tab Title’);
/**
* @return bool
*/
public function canShowTab()
if ($this->getCustomerId())
return true;
return false;
/**
* @return bool
*/
public function isHidden()
if ($this->getCustomerId())
return false;
return true;
/**
* Tab class getter
*
* @return string
*/
public function getTabClass()
return '';
/**
* Return URL link to Tab content
*
* @return string
*/
public function getTabUrl()
//replace the tab with the url you want
return $this->getUrl('test/*/test', ['_current' => true]);
/**
* Tab should be loaded trough Ajax call
*
* @return bool
*/
public function isAjaxLoaded()
return true;
Your new test tab will be added to customer edit left side menu.
add a comment |
To create a new tab in the admin customer edit, create a xml in the following path
Step 1:
/app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml
<body>
<referenceBlock name="customer_form">
<block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
<action method="setTabLabel">
<argument name="label" xsi:type="string">Test Tab</argument>
</action>
</block>
</referenceBlock>
</body>
Step 2:
Create a block file in the below path to load the contents when the tab is clicked
/app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php
<?php
namespace VendornameModulenameBlockAdminhtmlEditTab;
use MagentoCustomerControllerRegistryConstants;
use MagentoUiComponentLayoutTabsTabInterface;
class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
null
*/
public function getCustomerId()
return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabLabel()
return __(‘Tab label’);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabTitle()
return __(‘Tab Title’);
/**
* @return bool
*/
public function canShowTab()
if ($this->getCustomerId())
return true;
return false;
/**
* @return bool
*/
public function isHidden()
if ($this->getCustomerId())
return false;
return true;
/**
* Tab class getter
*
* @return string
*/
public function getTabClass()
return '';
/**
* Return URL link to Tab content
*
* @return string
*/
public function getTabUrl()
//replace the tab with the url you want
return $this->getUrl('test/*/test', ['_current' => true]);
/**
* Tab should be loaded trough Ajax call
*
* @return bool
*/
public function isAjaxLoaded()
return true;
Your new test tab will be added to customer edit left side menu.
To create a new tab in the admin customer edit, create a xml in the following path
Step 1:
/app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml
<body>
<referenceBlock name="customer_form">
<block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
<action method="setTabLabel">
<argument name="label" xsi:type="string">Test Tab</argument>
</action>
</block>
</referenceBlock>
</body>
Step 2:
Create a block file in the below path to load the contents when the tab is clicked
/app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php
<?php
namespace VendornameModulenameBlockAdminhtmlEditTab;
use MagentoCustomerControllerRegistryConstants;
use MagentoUiComponentLayoutTabsTabInterface;
class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
null
*/
public function getCustomerId()
return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabLabel()
return __(‘Tab label’);
/**
* @return MagentoFrameworkPhrase
*/
public function getTabTitle()
return __(‘Tab Title’);
/**
* @return bool
*/
public function canShowTab()
if ($this->getCustomerId())
return true;
return false;
/**
* @return bool
*/
public function isHidden()
if ($this->getCustomerId())
return false;
return true;
/**
* Tab class getter
*
* @return string
*/
public function getTabClass()
return '';
/**
* Return URL link to Tab content
*
* @return string
*/
public function getTabUrl()
//replace the tab with the url you want
return $this->getUrl('test/*/test', ['_current' => true]);
/**
* Tab should be loaded trough Ajax call
*
* @return bool
*/
public function isAjaxLoaded()
return true;
Your new test tab will be added to customer edit left side menu.
edited Jan 31 at 7:20
Rakesh Donga
1,893316
1,893316
answered Jan 31 at 7:07
nishunishu
263
263
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f177902%2fhow-to-add-custom-customer-attribute-in-custom-tab-in-customer-edit-page-of-admi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
found the solution for this?
– CompactCode
Mar 29 '18 at 2:52
Any body know solution ?
– amit_game
Jul 31 '18 at 5:55
I need a solution, too.
– skymeissner
Sep 28 '18 at 13:07
the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab
– David Verholen
Jan 11 at 21:12