0

I am trying to override phtml file. for that, I have changed the path in layout for phtml and block. but my changes are not working. I have made an error in the file but nothing happens.

here is my layout file code which i am using to overriding.

<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="catalog_product_view"/>
<body>
    <referenceContainer name="content">
        <container name="product.info.details" htmlTag="div" htmlClass="product info detailed" after="product.info.media">
            <block class="XYZ\Custom\Block\Product\View\ListView" name="product.info.product_additional_data" as="product_additional_data" template="Custom_Module::product/view/lists.phtml"/>
        </container>
    </referenceContainer>
</body>

0

To override product list.phtml file use below code

app/design/frontend/<vendor_name>/<theme_name>/Magento_Catalog/templates/product/view/lists.phtml

and do deployment after doing this.

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.