2

I'm trying to add a custom block as a child block to product.info (inside the form of the add to cart) so I add the following code to app/design/frontend/{Vendor}/{Theme}/Magento_Catalog/layout/catalog_product_view.xml:

<?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>
    <referenceBlock name="product.info">
        <block class="Magento\Framework\View\Element\Template" name="testing" template="Magento_Cms::test.phtml" />
    </referenceBlock>
</body>
</page>

not working, no change. Magento 2, developer mode is on, cleared cache, deployed files etc.

any Ideas?

thanks

1 Answer 1

1

When you want override a page in Magento 2. You don't change name at

<block class="Magento\Framework\View\Element\Template" name="testing" template="Magento_Cms::test.phtml" />

of it. It word for me.

1
  • this is not an override of a page.. it's a custom new page. also this is just an example... I also tried insert there a static block and other elements.. non of them were rendered.
    – arielmorry
    Commented Dec 10, 2016 at 9:26

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.