0

I am trying to override sales_order_create_index.xml to remove the custom payment method but getting this error

1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Custom_Module:order/create/billing/method/info.phtml' in module: 'Magento_Sales' block's name: 'order_create_billing_form'

sales_order_create_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="order_create_billing_form">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Custom_Module::order/create/billing/method/info.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

Template Path:

enter image description here

1

Your file name is form.phtml and you have set template name info.phtml. So either update your file name to info.phtml or update template name in xml file to form.phtml and clean cache once.

3
  • Let me know if it helps – Kishan Savaliya Oct 13 '20 at 16:53
  • 1
    Oops, I forgot to update that. Thanks for the quick fix. – Bushra Oct 14 '20 at 5:18
  • You're welcome ;-) – Kishan Savaliya Oct 14 '20 at 5:28

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.