5

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.

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

1 Answer 1

1

Tabs on Product Detail Page are rendered in this file

/vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml

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.

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

Your Answer

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

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