0

I am overriding Catalog/Product/View/options.phtml template in my custom module but its not working, I am using below code in catalog_product_view.xml file.

enter image description here

2
  • 1
    Please make sure whatever path you have defined in the XML, same path should be available for options.phtml file in your custom module. Please check, I think there will be an issue with Path
    – Nits
    Dec 2, 2020 at 12:04
  • @Nits Path is correct. Dec 2, 2020 at 12:09

1 Answer 1

0

I hope the below code will help you.

<referenceBlock name="product.info.options">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Vendor_Extension::product/view/options.phtml</argument>
        </action>
</referenceBlock>

Please update the file path and name correctly.

php bin/magento setup:upgrade 
php bin/magetno setup:static-content:deploy -f

Please let me know if this will not work.

1
  • Its working i used like this <referenceContainer name="content"> <referenceBlock name="product.info.options"> <action method="setTemplate"> <argument name="template" xsi:type="string">Vendor_Module::product/view/options.phtml</argument> </action> </referenceBlock> </referenceContainer> Dec 2, 2020 at 14:17

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.