Add A New Tab On Product Detail Page

Do you need to add new tab on product detail page with additional information? That can be done easier than you think!

We will create a sample module for that post as we usually do, but as this task requires only layout and template changes, these files can be easily also added under your theme. It will be a simple example, just adding a text in a new tab without also using a custom block class but the existing Magento\Catalog\Block\Product\View.

So to add a new custom tab on product detail page, we will need to do it via the catalog_product_view.xml layout like below.

We have defined to use a custom template called custom_tab.phtml, where we just added a text and the product name.

The result on product detail page will be the following.

The full example as extension can be found here.

Feel free to share this post and ask your questions in the comments below.

Till next time!