2

I like to view my product page information details like "accordion-toggle" and let me need to add custom tab with static text in same page information details.

3

create below file in this location

app/design/frontend/[VendorName]/[theme]/Magento_Catalog/layout/catalog_product_view.xml

<?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="custom.tab" template="product/view/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

app/design/frontend/[VendorName]/[theme]/Magento_Catalog/templates/product/view/custom_tab.phtml

<?php echo __("test")?>
  • Thank you, I got a custom tab. I like to change tab design to toogle design, is there any idea to change ? – Priya Jun 21 at 6:28
  • @mohana which type you want to change in tab? – Rakesh Donga Jun 21 at 6:32
  • Done. 1st all tab must be close onclick open drop down. please refer the link "codepen.io/syedrafeeq/pen/JroaYK" . – Priya Jun 21 at 6:35
  • @mohana you can customize in product page default tab remove and manally add after get all attributes – Rakesh Donga Jun 21 at 6:36
  • Please can you send some reference link.? – Priya Jun 21 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.