Magento – Magento 2: How to edit existing product tab

magento-2.1magento2product-tabtabs

Please guide there are tabs on product page named Details, More information, Reviews. Can you please tell me how to add attributes in these tabs. and please tell me if I want to change tab name "Details" to "Description", "MORE INFORMATION" to "SPECIFICATIONS".

The first tab is for Details in product how to add/edit from admin.

The second tab is for MORE INFORMATION in product how to add/edit attributes from admin.

Best Answer

You need to Create catalog_product_view.xml in your custom theme to change text of existing tab

app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml

<?xml version="1.0"?>
<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">
            <block class="Magento\Catalog\Block\Product\View\Attributes" name="product.attributes" as="additional" template="product/view/attributes.phtml" group="detailed_info">
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Change More Information</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

If you want to change content of tab you need to change template

<block class="Magento\Catalog\Block\Product\View\Attributes" name="product.attributes" as="additional" template="Magento_Catalog::product/view/attributes.phtml" group="detailed_info">

and create attributes.phtml at

app/design/frontend/Vendor/theme/Magento_Catalog/templates/product/view/attributes.phtml

Related Topic