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.

  • do you have any solution for it? – Bilal Usean Aug 29 '17 at 20:35
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.

  • Thanks for showing me the right path to solve this problem. Great – saiid Nov 6 '17 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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