Pregunta

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

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top