I want to add a tab on product view page in magento2.

That tab will only be visible if the customer belongs to a certain customer group.

Tabs are added via XML file, how can I create a custom handler in magento2 or use some condition on that.

  • do you have any solution for it? Aug 29, 2017 at 20:35

1 Answer 1


Tabs on Product Detail Page are rendered in this file


Override this file in your theme/module

In this file $detailedInfoGroup contains the list of all tabs to be rendered. You can apply condition on this varibale to show your desired tabs.

  • Thanks for showing me the right path to solve this problem. Great Nov 6, 2017 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.