I am overriding the Adminhtml Sales Order Create Items Grid template by using a layout in my custom module:


<?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">
        <referenceBlock name='items_grid>
            <action method='setTemplate'>
                <argument name='template' xsi:type='string'>Vendor_Module::order/create/items/grid.phtml</argument>

The problem I am facing is that when the page is loaded via AJAX: 1. Click "Create New Order" 2. Click on a customer 3. Page loads via AJAX and shows the grid.

The grid template that loads is the base grid template (Magento_Sales/view/templates/order/create/items/grid.phtml). If I refresh the page or enter the page directly, it loads the overridden template.

My question is: Where does this template get loaded first and how do I prevent it from loading, or how do I force my template to load every time.


You have to override this handle too


for ajax call set template here too

| improve this answer | |
  • Thanks for the reply. I tried your suggestion and there was no change to sales order create page. Here is my code: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="items_grid"> <action method='setTemplate'> <argument name='template' xsi:type='string'>Vendor_Module::order/create/items/grid.phtml</argument> </action> </referenceBlock> </body> </page> – Alex Block Apr 4 '17 at 14:04
  • @AlexBlock have you solved that issue ? – Prince Yadav Feb 25 '18 at 14:05
  • Have you solved this? – Dhaduk Mitesh Nov 3 '18 at 5:43

You have to override below three files:

  1. sales_order_create_index.xml,
  2. sales_order_create_load_block_data.xml,
  3. sales_order_create_load_block_items.xml
| improve this answer | |
New contributor
TUAN NGUYEN VAN is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.