Magento 2: Not able to set custom template using module

template
php7
magento226
(Rajat Thakur) #1

I am creating a custom module to set a custom template for `

vendor/magento/module-catalog/view/frontend/templates/product/view/options/type/default.phtml

`
but I am not able to override it. I have tried xml layout method but its not working which is below

`

<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.options.default">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">SR_MagentoCommunity::product/view/options/type/default.phtml</argument>
        </action>
    </referenceBlock>
</body>

`

0 Likes