cancel
Showing results for 
Search instead for 
Did you mean: 

How to change sequence of Tabs in Product details Page in porto theme

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How to change sequence of Tabs in Product details Page in porto theme

Hi , i had few tabs in product detailed page and i want to show those tabs in order like Details , Key Specifications , contents Of Package , More Information , Warranty , Reviews For reference please find the image link

Image Link

13 REPLIES 13

Re: How to change sequence of Tabs in Product details Page ?

Hello @sekhar_n 

 
You can use sort_order argument in "app/design/frontend/Packagename/themename/Magento_Catalog/layout/catalog_product_view.xml" xml config file.

 

<referenceBlock name="product.info.description">
    <arguments>
        <argument name="title" translate="true" xsi:type="string">Description</argument>
        <argument name="sort_order" xsi:type="string">30</argument>
    </arguments>
</referenceBlock>

Also make sure to update method "getGroupChildNames" with "getGroupSortedChildNames" in template file, if you are overriding it. app/design/frontend/Packagename/themename/Magento_Catalog/templates/product/view/details.phtml.


As per Magento 2.3.1

<?php if ($detailedInfoGroup = $block->getGroupSortedChildNames('detailed_info', 'getChildHtml')):?>

Also, If you are overriding Magento\Catalog\Block\Product\View\Details.php block class then your block class should have that updated method "getGroupSortedChildNames" as well.

If my answer is useful, please Accept as Solution & give Kudos

Re: How to change sequence of Tabs in Product details Page ?

in my theme catalog_product_view.xml is look like

<?xml version="1.0"?>
<!--
/**
* Copyright テつゥ 2018 Porto. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="sidebar.additional">
<block class="Smartwave¥Porto¥Block¥Template" name="product_view_custom_block" before="-" template="Magento_Catalog:Smiley Tongueroduct/view/custom_block.phtml"/>
</referenceContainer>
<move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
<move element="product.info.review" destination="product.info.main" before="product.info.price"/>
<move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
<!--<referenceBlock name="catalog.product.related" remove="true"/>-->
<move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
<referenceContainer name="after.body.start">
<block class="Magento¥Catalog¥Block¥Product¥View" name="product_custom" template="Magento_Catalog:Smiley Tongueroduct/view/product_custom.phtml" before="-"/>
<block class="Smartwave¥Porto¥Block¥Template" name="product_view_config" after="-" template="Magento_Catalog:Smiley Tongueroduct/view/config.phtml"/>
</referenceContainer>
<referenceContainer name="columns.top">
<block class="Magento¥Catalog¥Block¥Product¥View" name="prev_next_products" template="Magento_Catalog:Smiley Tongueroduct/view/prev_next.phtml" before="-"/>
</referenceContainer>
<move element="prev_next_products" destination="product.info.main" before="-"/>
<move element="page.main.title" destination="product.info.main" before="-"/>
<referenceContainer name="product.info.social">
<block class="Smartwave¥Porto¥Block¥Template" name="product_view_addthis_links" after="-" template="Magento_Catalog:Smiley Tongueroduct/view/addthis.phtml"/>
</referenceContainer>
<referenceContainer name="content">
<block class="Smartwave¥Porto¥Block¥RickSnippet" name="rich_snippet" template="Magento_Catalog:Smiley Tongueroduct/view/rich_snippet.phtml" before="-"/>
<block class="Smartwave¥Porto¥Block¥Template" name="product_view_main_custom_block" ifconfig="porto_settings/product/main_custom_block" before="product.info.main" template="Magento_Catalog:Smiley Tongueroduct/view/main_custom_block.phtml"/>
<block class="Smartwave¥Porto¥Block¥Template" name="product_view_main_custom_block2" after="-" template="Magento_Catalog:Smiley Tongueroduct/view/main_custom_block2.phtml"/>
<block class="Smartwave¥Porto¥Block¥Template" name="product.clearer" after="product.info.media" template="Magento_Catalog:Smiley Tongueroduct/view/clearer.phtml"/>
</referenceContainer>
<move element="product_view_main_custom_block2" destination="product.info.main" after="product.info.overview"/>
<move element="product.info.main" destination="content" after="product.info.media"/>
<referenceContainer name="columns">
<block class="Smartwave¥Porto¥Block¥Template" name="side_popup" after="-" template="Magento_Catalog:Smiley Tongueroduct/view/side_popup.phtml"/>
</referenceContainer>
</body>
</page>

Re: How to change sequence of Tabs in Product details Page ?

HI @sekhar_n ,

Please have a look into below stack solution. 

https://magento.stackexchange.com/a/134231

I hope it will help you!

Re: How to change sequence of Tabs in Product details Page ?

Hi @sekhar_n,

Also check if your custom tab is randering from admin configuration. 

 

Admin->Store Configuration->Porto->Porto Setting Panel->Product View->Product Custom Tabs.

Then you can set order there as well. PFA.

 

pasted_image.png

 https://www.portotheme.com/magento2/porto/documentation/

Go to Custom Tab configuration.

 

I hope it will help you!

Re: How to change sequence of Tabs in Product details Page ?

creating tabs from admin only but I need tab sequence like
Details KeySpecifications ContentsofPackage More Information Warranty and reviews

Re: How to change sequence of Tabs in Product details Page ?

Add enter order value as per your sequence or share any scheenshot of the admin custom tab, so I can check structure. 

Re: How to change sequence of Tabs in Product details Page ?

please find the attached image

Image URL

 

Re: How to change sequence of Tabs in Product details Page ?

Hi @sekhar_n ,

As per your current screenshot, you can see a order column, you can add sort order there. 

 

PFA for the reference. 

pasted_image.png

Flush th cache and check. 

Re: How to change sequence of Tabs in Product details Page ?

What is default order value for Details More Information and Review Tabs?