Get Free Audit

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

Jan 12, 2017

4241 Aleksander Kutseika

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

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

  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.

Magento store.belvg.com

Magento Extensions

Take your online store to the next level with BelVG Magento Extensions

Visit the store
Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

7 Comments

  1. Hello,

    How can we handle tab name from admin side? Like name comes from product attribute name which we set in admin.

  2. Hi,

    Using your snippet I am unable to add more than one custom product tab. It throws exception

    . The same exception for other argument type like at_call and at_code.

    How do I more multiple product tabs using your above code?

    Thanks.

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *