How to Remove 'Create New Order' Button from Sales Order Grid

The sales order grid in Magento provides a convenient overview of all orders placed in your store.

However, you may want to customize the grid by removing certain elements that are not relevant to your business process.

In this blog post, we will discuss how to remove the 'Create New Order' button from the sales order grid, focusing on Magento 2.

Step 1: Locate the Grid Component

To begin, we need to locate the grid component responsible for rendering the sales order grid. In Magento 2, the grid component is defined in a UI component XML file. Navigate to the following file in your project directory:

app/code/Vendor/Module/view/adminhtml/ui_component/sales_order_grid.xml

Step 2: Modify the XML File

Open the sales_order_grid.xml file and locate the <listing> node.

Inside this node, you will find the <listingToolbar> node, which represents the toolbar displayed above the grid.

Within the <listingToolbar>, there is a <addNew> node defining the 'Create New Order' button.

To remove the button, comment out or delete the entire <addNew> node.

Save the file once your modifications are complete.

Step 3: Clear Cache and Refresh

Once you've saved the changes to the sales_order_grid.xml file, clear the Magento cache to ensure the modifications take effect. Open a terminal, navigate to your Magento installation directory, and run the following command:

php bin/magento cache:clean

Finally, refresh your Magento admin panel to see the updated sales order grid without the 'Create New Order' button.

Conclusion:

By following the steps outlined above, you can easily remove the 'Create New Order' button from the sales order grid in Magento 2.

This customization allows you to tailor the interface to align with your specific business requirements.

Remember to clear the cache after making changes to XML files to ensure that the modifications are reflected accurately.