Not getting value from my own custom extension in magento

67 Views Asked by At

I am trying to create custom extension in magento 2

In this i am simply trying to print Hello but by overwriting product media section.

My layout xml file name is catalog_product_view.xml

Code of it:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <css src="Abc_ProductMagnifier::css/dummy.css"/>
    <script src="Abc_ProductMagnifier::js/dummy.js"/>
</head>
<body>
    <referenceContainer name="content">
        <container name="product.info.media" htmlTag="div" htmlClass="product media" after="product.info.main">
            <block class="Abc\ProductMagnifier\Block\Catalog\Product\ProductMagnifier" name="product.info.media.image" template="product/hello.phtml"></block>
        </container>
    </referenceContainer>
</body>
</page>

Now problem is i get my script and css on product description page but i didnot get content from hello.phtml

code for hello.phtml

<h1>Hello</h1>

I am just stucked here please help me in that...

0

There are 0 best solutions below