Question

I call custom phtml in product.info.details but it's not working.

How I call:

<referenceBlock name="product.info.details">
    <block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::html/header/test.phtml"/>
</referenceBlock>
Was it helpful?

Solution

Try this

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
      <referenceContainer name="content">
        <container name="custom.container" before="product.info.details">
            <block class="Magento\Framework\View\Element\Template" name="blockname" template="Vendor_Module::path/yourfile.phtml"/>
        </container>
      </referenceContainer>
    </body>
</page>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top