Tab Ordering on Product Page
Hi All,
I'm trying to update the tab order on the product page and used this code below but it doesn't seem to work.
<referenceBlock name="product.info.details">
<referenceBlock name="product.info.description">
<arguments>
<argument name="title" translate="true" xsi:type="string">Description</argument>
</arguments>
</referenceBlock>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.short.description" as="short.description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
<arguments>
<argument name="at_call" xsi:type="string">getShortDescription</argument>
<argument name="at_code" xsi:type="string">short_description</argument>
<argument name="css_class" xsi:type="string">short-description</argument>
<argument name="at_label" xsi:type="string">none</argument>
<argument name="title" translate="true" xsi:type="string">Summary</argument>
<argument name="sort_order" xsi:type="string">10</argument>
</arguments>
</block>
<block class="Magento\Catalog\Block\Product\View" name="ingredients.tab" as="ingredients" template="product/view/ingredients.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Ingredients</argument>
<argument name="sort_order" xsi:type="string">40</argument>
</arguments>
</block>
<block class="Magento\Catalog\Block\Product\View" name="directions.tab" as="directions" template="product/view/directions.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Directions of Use</argument>
<argument name="sort_order" xsi:type="string">30</argument>
</arguments>
</block>
<block class="Magento\Review\Block\Product\Review" name="reviews.tab" as="reviews" template="Magento_Review::review.phtml" group="detailed_info" ifconfig="catalog/review/active">
<arguments>
<argument name="sort_order" xsi:type="string">50</argument>
</arguments>
<block class="Magento\Review\Block\Form" name="product.review.form" as="review_form" ifconfig="catalog/review/active">
<container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before"/>
</block>
</block>
<block class="Magento\Catalog\Block\Product\View" name="deliveryinfo.tab" as="deliveryinfo" template="product/view/delivery_info.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Delivery</argument>
<argument name="sort_order" xsi:type="string">60</argument>
</arguments>
</block>
</referenceBlock>
Reviews tab is still before summary, ingredients, directions of use and delivery. How can we change the ordering of the tabs please?
Cheers, Sas
Please sign in to leave a comment.
Comments
0 comments