How to Add New Tabs to a Product Page in Magento 2

How to Add New Tabs to a Product Page in Magento 2

To add a new custom tab to a product page you need to follow these steps:

  1. Create a new module:

How to Add New Tabs to a Product Page in Magento 2

module.xml:

registration.php:

  1. Create a new product attribute. We are going to do this with the help of the InstallData.php script

  1. Add the new custom tab to a product page with the help of the catalog_product_view.xml file

  1. Then create new_tab.phtml template where we need to output our attribute

  1. Change the attribute value on the Product Edit page

How to Add New Tabs to a Product Page in Magento 2

And here we get a new tab on the required page.

How to Add New Tabs to a Product Page in Magento 2



2 comments

Post a new comment

top