1

I need a new tab in the product view page similar to the description. enter image description here

0

3 Answers 3

1

You Can try this its work for me.

Add Following Code in your theme.

app/design/frontend/{vender name}/{theme name}/Magento_Catalog/layout/catalog_product_view.xml

<!-- this is code to add new tab start -->
<referenceBlock name="product.info.details">
    <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.video" template="product/view/attribute.phtml" group="detailed_info">
    <arguments>
        <argument name="at_call" xsi:type="string">getVideo</argument>
        <argument name="at_code" xsi:type="string">video</argument>
        <argument name="css_class" xsi:type="string">video</argument>
        <argument name="at_label" xsi:type="string">none</argument>
        <argument name="title" translate="true" xsi:type="string">Video</argument>
    </arguments>
    </block>
</referenceBlock>
<!-- this is code to add new tab end -->
0

I hope this useful for you.

  1. Create one custom theme Refernece:

    http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-create.html

    https://www.cloudways.com/blog/create-custom-theme-magento-2-part-1/

  2. create catalog_product_view.xml file in your custom theme

app/design/frontend/vendor/themename/Magento_Catalog/layout/catalog_product_view.xml

  1. Then, add below code to catalog_product_view.xml

    https://github.com/mageprince/magento2-productAttachment/blob/master/view/frontend/layout/catalog_product_view.xml

  2. Remove var/* rm -rf var/*

Now, check Its worked for me..

0

This Question is already answered. Please take a look on the below link

Add new tab on product detail page Magento 2