0

I've added custom tabs to our Magento 2 store called "features","in the box" and "specification".

Currently the tabs on the site display in this order:

Details Reviews Warranty Info Features In the box Specifications

We'd like to rearrange our tabs such that our custom ones come first, then the rest. We've tried everything we looked up so far with no success.

1
  • Have you got solution ?
    – Pawan
    Feb 1, 2018 at 18:07

1 Answer 1

0

You can do the following by makeing changes in the phtml

app/design/frontend/Package/Theme/Magento_Catalog/templetes/product/view/details.phtml

If you rearrage the index of $detailedInfoGroup, it will be listed in that manner. Below is my code of rearranging the tabs.This hint me be useful to you.

$detailedInfoGroup = array_reverse($detailedInfoGroup); 
unset($detailedInfoGroup[0]);
$detailedInfoGroup[] = "reviews.tab"; 
unset($detailedInfoGroup[1]);
2
  • Not sure what part of the details.phtml file the code above should go on. (top, bottom, after some block of code).
    – Dacod
    Feb 2, 2018 at 7:51
  • look for $detailedInfoGroup. Make changes before foreach loop of $detailedInfoGroup Feb 2, 2018 at 9:01

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.