I created a custom tab extending catalog_product_view.xml
and now I don't know how to order my custom tab, it's displayed the first by default. I want to be displayed after the "Details" tab for example but it's not working the after
neither before
instructions.
<?xml version="1.0"?>
<page layout="1column" 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" as="custom"
template="Vendor_Module::product/custom.phtml" group="detailed_info" after="product.info.description">
<arguments>
<argument translate="true" name="title" xsi:type="string">Custom tab</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>
What am I doing wrong? The "Details" tab is named product.info.description
right?
I found some solutions, but all consist rewriting all tabs and ordering as you want, but I think it has to be better solutions because rewriting the structure, what will happen if another extension does the same?