I need a new tab in the product view page similar to the description.
3 Answers
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 -->
I hope this useful for you.
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/
create
catalog_product_view.xml
file in your custom theme
app/design/frontend/vendor/themename/Magento_Catalog/layout/catalog_product_view.xml
Then, add below code to catalog_product_view.xml
Remove var/* rm -rf var/*
Now, check Its worked for me..
This Question is already answered. Please take a look on the below link