0

I tried using this in my catalog_product_view.xml:

<?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" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
    <!-- <referenceContainer name="content"> 
        <referenceContainer name="product.info.main">
        <referenceContainer name="alert.urls">

        <referenceBlock name="product.info">
                <action method="setTemplate">
                    <argument name="shopmethtempindex" xsi:type="string">Interjar_ConfigurableChildVisibility::product/view/form.phtml</argument>
                </action>
            </referenceBlock>       
            </referenceContainer>
    </referenceContainer>
    </referenceContainer> -->

    <!-- <referenceContainer name="content"> 
    <referenceContainer name="product.info.main">
            <referenceBlock name="product.info">
                <action method="setTemplate">
                    <argument name="shopmethtempindex" xsi:type="string">Interjar_ConfigurableChildVisibility::product/view/form.phtml</argument>
                </action>
            </referenceBlock>
    </referenceContainer>
    </referenceContainer> -->

    <referenceContainer name="content">                
        <referenceContainer name="product.info.main">

            <block class="Magento\Catalog\Block\Product\View" name="product.info" template="Interjar_ConfigurableChildVisibility::product/view/form.phtml">
            </block>
            
   
        </referenceContainer>
        
    </referenceContainer>
    </body>
</page>


But it is not working. Any help would be appreciated.

2
  • override in theme or custom module ?? Oct 28, 2021 at 11:02
  • override in custom module
    – mechanic
    Oct 28, 2021 at 11:04

1 Answer 1

0

templates are a Ui components not templates you can also review this Want to override Magento 2 Contact Form Block

1
  • I think you misunderstood. I am trying to override the core file which is located in vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml
    – mechanic
    Oct 28, 2021 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.