I am using magento 2.3.3 in custom theme and I want to compare products add in new tab
how can achieve this?
Thanks in advance

1 Answer 1


On Product Detail Page, First Create a new tab and add below code in xml. In your theme/module's catalog_product_view.xml if you want to create a new phtml in new tab use below code

<referenceBlock name="product.info.details">
          <block class="Vendor\ModuleName\Block\Product\View\Attributes" name="product.question" template="product/view/yournewphtmlfile.phtml" group="detailed_info">
                <argument translate="true" name="title" xsi:type="string">Product Question</argument>

Or to move content add below code to add compare products to details tab.

<move element="category.product.addto.compare" destination="product.question" />

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.