Magento: How to edit the admin panel sales order listing table?

Magento: How to edit the admin panel sales order listing table?

September 24, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento: How to edit the admin panel sales order listing table?

Magento: Customizing the Admin Sales Order Listing Table

As an experienced e-commerce developer, I understand your frustration when dealing with admin panel customizations in Magento. The sales order listing table is a critical component of the back-end experience, and modifying its appearance or data structure can be challenging.

Identifying the Controlling Template File

The formatting of the admin sales order table is primarily controlled by two template files located under app/design/adminhtml/default/default/template/sales/order/view.grid.phtml. This file contains the HTML structure for the grid (table), while the CSS styles are defined in skin/adminhtml/default/default/css/style.css.

However, directly editing these core files is not recommended as it can lead to issues during upgrades. Instead, let’s explore a more elegant solution using Magento’s theme inheritance and customization features.

Creating a Custom Theme for Admin

To avoid modifying the core files, we need to create a new admin theme that extends the default theme but allows us to override specific templates and styles. Here are the steps:

  1. Navigate to app/design/adminhtml/default and copy the default folder to create a new theme folder, e.g., my_custom_admin.

  2. Inside the my_custom_admin folder, create the following directory structure:

    my_custom_admin
    └── template
        └── sales
            └── order
                └── view.grid.phtml
    
  3. Copy the view.grid.phtml file from the default theme to your new theme: app/design/adminhtml/default/default/template/sales/order/view.grid.phtml -> app/design/adminhtml/my_custom_admin/template/sales/order/view.grid.phtml.

Customizing the Admin Grid

Now that we have a custom theme set up, let’s modify the grid template to add or edit columns.

  1. Open app/design/adminhtml/my_custom_admin/template/sales/order/view.grid.phtml in your preferred text editor.

  2. To add a new column, you need to locate the <tr> element that represents the main table row. This is usually found near line 70 of the file.

  3. Inside this <tr>, locate the <th> elements representing the existing columns. You can add a new <th> element for your custom column with an appropriate header label, e.g., My Custom Column.

<th class="col-company">
   <span class="nobr"><?php echo $this->__('My Custom Column') ?></span>
</th>
  1. Next, locate the <tr> element that follows this (usually around line 75), which represents a sample row with data.

  2. Inside this <tr>, add a new <td> element for your custom column after an existing one, e.g., right before the col-entity_id cell:

<td class="data-grid-col">
   <span class="nobr"><?php echo $this->__('Custom Value'); ?></span>
</td>
  1. Save and close the file.

Applying the Custom Theme

To apply your new custom admin theme, follow these steps:

  1. Log in to the Magento admin interface.

  2. Navigate to “System” > “Configuration”.

  3. Click on “Advanced” (under the ‘Advanced’ group).

  4. Under “Admin”, change “Admin Template” to my_custom_admin.

  5. Change “Admin Skin” to my_custom_admin.

  6. Click “Save Config”.

Conclusion

Customizing the admin sales order listing table in Magento requires careful handling of core files and a solid understanding of theme inheritance. By creating a custom admin theme, you can safely override the default template without risking conflicts during upgrades.

Remember, always make backups before performing any modifications to your codebase, especially in production environments. If you find yourself needing more advanced customizations or encountering complex issues, consider seeking professional support from experienced Magento developers at Laravel Company.

Happy coding!

Database Themes Admin Deployment

Our network