我试图在“评论”选项卡后添加更多其他选项卡,但我的选项卡仍然显示为第一个选项卡
<?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 after="reviews.tab" 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>
如果您正在使用Magento 2.3.1,他们通过更改它的类添加了对product.info.details
块的轻微更改。 <block class="Magento\Catalog\Block\Product\View\Details" name="product.info.details"...>
这意味着它需要一个排序顺序参数来控制选项卡的位置。 <arguments><argument name="sort_order" xsi:type="string">10</argument></arguments>
您需要为在detailed_info
组中创建的每个额外选项卡添加排序顺序。