Magento, Magento 2

How to Rename Details Tab on Product View Page in Magento 2

How to Rename Details Tab on Product View Page in Magento 2

In this tutorial, Today I will explain to how to rename details tab on product view page in Magento 2. On Magento 2 Product view page, there are 3 tabs by default display : Details, More Information and Reviews.

Now, If you want to change tabs name by xml then, you can follow this below way :

You may also like this :

You need to create catalog_product_view.xml file in your custom theme on app/design/frontend/<VendorName>/<ThemeName>/Magento_Catalog/layout this file path and paste this below code :


<?xml version="1.0"?>
<!--
/**
 * Created By : Rohan Hapani
 */
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">    
            <referenceBlock name="product.info.description">
                <arguments>
                    <argument name="title" translate="true" xsi:type="string">Product Details</argument>
                </arguments>
            </referenceBlock>
        </referenceBlock>
    </body>
</page>

It will change “Details” tab name to “Product Details“.

To change 2nd tab name, You can use this below code in your catalog_product_view.xml file at app/design/frontend/<VendorName>/<ThemeName>/Magento_Catalog/layout  :


<?xml version="1.0"?>
<!--
/**
 * Created By : Rohan Hapani
 */
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">
            <referenceBlock name="product.attributes">
                <arguments>
                    <argument name="title" translate="true" xsi:type="string">Product Info</argument>
                </arguments>
            </referenceBlock>
        </referenceBlock>
    </body>
</page>

It will change “More Information” to “Product Info“.

To Change Reviews Tab name, You need to paste this below code in catalog_product_view.xml at app/design/frontend/<VendorName>/<ThemeName>/Magento_Review/layout :


<?xml version="1.0"?>
<!--
/**
 * Created By : Rohan Hapani
 */
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceBlock name="reviews.tab">
            <arguments>
                <argument name="title" translate="false" xsi:type="string">Ratings &amp; Reviews</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Output :

Rename Tab Product View Page Magento 2

That’s it !!!

I hope this blog is easy to understand how to rename details tab on product view page in Magento 2. In case, I missed anything or need to add some information, always feel free to leave a comment in this blog, I’ll get back with a proper solution.

Stay Safe and Stay Connected !!

Tagged , ,