0

I want to show my custom block at bottom of product details page (after tab section) in Magento 2.3. How can I do this?

    <referenceContainer name="content">
        <block class="Vendor\CatalogProduct\Block\Custom" name="custom" template="Vendor_CatalogProduct::product/view/custom.phtml" after="-"/>
    </referenceContainer>
  • Does your template show? – SebastianT Mar 4 at 14:14
  • can you update full code of your catalog_product_view.xml and its path? – jafar pinjar Mar 4 at 14:21
  • what's the full path of "custom.phtml" within your module – Philipp Sander Mar 4 at 14:34
  • @PhilippSander app/code/Vendor/CatalogProduct/view/frontend/templates/product/view/custom_insta.phtml – Akhil Anand Mar 4 at 14:39
  • @SebastianT Yes, Only issue with the block position – Akhil Anand Mar 4 at 14:41
0

Hi I have used the move tag for moving my custom block after content bottom

<move element="custom" destination="main" after="content.bottom"/>
|improve this answer|||||
0

add Below in your custom catalog_product_view.xml layout file.

app/design/frontend/ThemeVendor/ThemeName/Magento_Catalog/layout/catalog_product_view.xml

    <referenceContainer name="content">
        <block class="Vendor\Module\Your\Block\Class" name="custom.block" after="product.info.details" template="Vendor_Module::product/test.phtml" />
    </referenceContainer>
|improve this answer|||||

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.