How To Add a custom tab in product page Magento2
View more Magento 2 Extension
In this post, i will show you how to Add Custom Tab in Product Page Magento 2
The first, check how to create a simple module at
http://www.venustheme.com/how-to-cre...ento-2-module/
1. Create new attribute in Magento 2 Add Custom Tab to Product Page
Go to this link: admin > Store > Product > Add New Attribute
2. Select a Attribute Sets for the attribute
Go to this link: admin > Store > Attribute Set
You will drag and drop into one of the groups in Group block. For ex: to General ta
3. Update the new attribute for a product
4. Create a layout file
Go to this link: app/code/Ves/HelloWorld/View/frontend/layout/catalog_product_view.xml
5. Create a template filePHP Code:
<?xml version="1.0"?>
<page 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" name="demo.tab" template="Ves_HelloWorld::custom_tab.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Cutom Tab</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>
Go to this link:
PHP Code:
app/code/Ves/HelloWorld/View/frontend/templates/custom_tab.phtml
<?php // Get current product
$product = $block->getProduct();
?>
<h1 style="color: #ff5501"><?php echo $product->getData('demo'); ?></h1>
Thank you for your attention about this Magento 2 Add Custom Tab to Product Page.
If you have any question about this tutorial, please write your comment at the bottom
page or watch more these below Related. Your comments will be supported
professionally and effectively.
RELATED TUTORIALS & MAGENTO 2
Magento 2 Order Tracking
Magento 2 Visual Design Editor | Magento 2 Page Builder
Magento 2 Contact Form | Custom Form Builder
Magento 2 image Gallery extension
Magento 2 search extension
Magento 2 testimonials
Magento 2 FAQ extension
Magento 2 form builder extension
Magento 2 Blog extension
Magento 2 Mega menu extension
VIEW DETAIL->View more threads in the same category:
- Magento 2 GoCardless Instant Bank Pay: Streamlining Payment Collection
- WO KANN ICH FALSCHES GELD KAUFEN WhatsApp&...+4915212508422. Falschgeld kaufen in ess
- Buy Nembutal, ketamine, Oxycodone, Amphetamine, ( WhatsApp: +4915215875577 )
- Secure and Efficient Payment Processing with Magento 2 BlueSnap Gateway
- WO KANN ICH FALSCHES GELD KAUFEN WhatsApp&...+4915212508422. Falschgeld kaufen in ess
- buy a USA/UK passport online( https://legitcleandocs.com)visa, SNN, id card
- buy registered drivers license (legitcleandocs.com)IELTS, id
- Modalert 200 - Treat Your Oversleeping Issue
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
- Buy Passport,Driver License,Age & ID Card,(Whatsapp:.......: +1 (551) 239-2904) Visas
Bookmarks