1

I am trying to change the way displaying the tabs in product page ( details, more information and reviews ). I don not want it to be tabs I want it to display directly one after one: details then reviews then more information all showing on the same time not tabs. I hope that I explained it correct enter image description here

2
  • Have you tried anything so far ? If yes, can you share it, and the problem you're having ?
    – Cladiuss
    Commented Oct 14, 2023 at 20:43
  • no I could not found any related question about this and I did not found the file that I should modify
    – Ibrahim
    Commented Oct 14, 2023 at 21:27

2 Answers 2

0

You can review & override the following files, which are intended to display tabs in product page.

vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml

You can remove tabs by remove or change data item title & data item content class, or you can change HTML structure as per your requirement.

2
  • can you share idea of the code to do what I want ?
    – Ibrahim
    Commented Oct 15, 2023 at 21:33
  • Have you reviewed the mentioned file? Commented Oct 16, 2023 at 5:56
0

As stated in @HarishKuril 's answer, the tabs and content are managed in the following file :

vendor/magento/module-catalog/view/frontend/templates/product/view/details.phtml

You should copy it into your theme under the following path (replace <vendor> and <theme> with your theme path) :

app/design/frontend/<vendor>/<theme>/Magento_Catalog/templates/product/view/details.phtml

In this file, removing the data-mage-init='{"tabs":{"openedState":"active"}}' at the line 12 should be enough to prevent it from displaying tabs.

You might also have to add some CSS or modify some classes to improve how it will be displayed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.