1

I want to display multiple tabs(inconstant number) on product page, with the code below by using layout(catalog_product_view) i am only able to add fixed amount of tabs.

<?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="AbdusSalam\AddTab\Block\ProductTabs" name="extratab"  template="AbdusSalam_AddTab::product_tabs.phtml" group="detailed_info">
           <arguments>
               <argument name="title" xsi:type="string">Extra Tab</argument>
           </arguments>
        </block>      
    </referenceBlock>
</body>

2
  • Can you specify your requirement in some more detail. Feb 8, 2019 at 14:01
  • @DhirenVasoya I want to add tabs on product page dynamically means some value(1,2,3 etc) is save in my table against a product (e.g fusion bag) and based on that value i want to display tabs on the specific product page.
    – ASQ
    Feb 8, 2019 at 15:51

1 Answer 1

1

I suggest you visit this link.

https://knowthemage.com/create-dynamic-custom-tabs-on-product-view-page/

This worked for me.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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