0

I am trying to have a few more additional tabs added after the Reviews tab, though my tab keeps appearing as the first tab

<?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="postage.tab" as="postage" template="product/view/postage.phtml" group="detailed_info" >
             <arguments>
                <argument translate="true" name="title" xsi:type="string">Postage</argument>
             </arguments>
          </block>
        </referenceBlock>
    </body>
</page>

enter image description here

  • Hello @Paul, You can use after and before tag to adjust position of tab – Pawan Apr 18 at 2:00
2

Check it, if it solves your problem

<?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="postage.tab1" as="postage1" 
            template="[Vendor]_[Module]::postage1.phtml" group="detailed_info" >
             <arguments>
                <argument translate="true" name="title" xsi:type="string">Postage1</argument>
             </arguments>
          </block>
          <block  class="Magento\Catalog\Block\Product\View" name="postage.tab2" as="postage2" 
            template="[Vendor]_[Module]::postage2.phtml" group="detailed_info" >
             <arguments>
                <argument translate="true" name="title" xsi:type="string">Postage2</argument>
             </arguments>
          </block>
          <block  class="Magento\Catalog\Block\Product\View" name="postage.tab3" as="postage3" 
            template="[Vendor]_[Module]::postage3.phtml" group="detailed_info" >
             <arguments>
                <argument translate="true" name="title" xsi:type="string">Postage3</argument>
             </arguments>
          </block>
        </referenceBlock>
    </body>
</page>

enter image description here

  • this still seems to make it the first tab – Paul 'Whippet' McGuane Apr 17 at 13:59
  • tabs are displayed after review tab – ASQ Apr 17 at 14:54
  • see above with the image – Paul 'Whippet' McGuane Apr 17 at 14:59
  • which theme and magento version you are using – ASQ Apr 17 at 15:07
  • 1
    you can set priority or sort on tabs to change their position <argument name="priority" xsi:type="string">50</argument> – ASQ Apr 17 at 15:28

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.