Add new tab on product detail page Magento 2
Create file catalog_product_view.xml in the app/design/frontend/{vender name}/{theme name}/Magento_Catalog/layout/catalog_product_view.xml
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View" name="deliveryinfo.tab" as="deliveryinfo" template="product/view/delivery_info.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Product Question</argument>
</arguments>
</block>
</referenceBlock>
app/design/frontend/{vender name}/{theme name}/Magento_Catalog/templates/product/view/delivery_info.phtml
Create file catalog_product_view.xml in the app/design/frontend/{vender name}/{theme name}/Magento_Catalog/layout/catalog_product_view.xml
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View" name="deliveryinfo.tab" as="deliveryinfo" template="product/view/delivery_info.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Product Question</argument>
</arguments>
</block>
</referenceBlock>
app/design/frontend/{vender name}/{theme name}/Magento_Catalog/templates/product/view/delivery_info.phtml
No comments:
Post a Comment