Magento - Add column to customer grid

Magento - Add column to customer grid

July 2, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento - Add column to customer grid

Adding a Custom Column to Magento Customer Grid

Are you looking to modify your Magento customer grid to include additional information? In this guide, we’ll show you how to add a custom column to the customer grid using the Magento admin interface.

Understanding Magento Configuration

Before jumping into code, let’s understand the Magento configuration. By default, the customer grid is defined in the customer.grid.form layout XML file located at app/design/frontend/your_package/your_theme/layout/customer_grid_form.xml.

You can find more detailed information about Magento layout structure and XML files on Laravel Company’s guide to Magento layouts.

Adding a New Column

To add a new column, you’ll need to modify the customer grid form XML file. Open your preferred code editor and navigate to app/design/frontend/your_package/your_theme/layout/customer_grid_form.xml.

Find the <reference name="content"> section. Within this section, you should see an existing column definition like this:

<block type="customer/grid" name="customer.grid">
    <action method="setSaveParameters"><param name="customer_id" value="1"/></action>
    <block type="customer/edit" name="edit_form">
        <attribute name="form_code">customer_form_edit</attribute>
    </block>
    <block type="core/text_list" name="grid.form.additional.info">
        <action method="setText"><text><![CDATA[
            <div class="form-additional-info">
                <!-- Additional info goes here -->
            </div>
            ]]></text></action>
    </block>
</block>

Adding Your Custom Column

To add a new column, you’ll need to modify the <block type="customer/grid" ...> section. Let’s say you want to display the customer’s registration date as a custom column.

First, make sure the registration_date attribute exists for your customers. If not, you can create it using Magento’s EAV system or through database manipulation tools like MySQL Workbench.

Next, add the following code within the <block type="customer/grid"...> section:

<action method="addColumn">
    <column_name>registration_date</column_name>
    <header_label translate="label">Registration Date</header_label>
    <type>date</type>
    <sortable>true</sortable>
    <indexer>customer_grid</indexer>
    <filter_indexer>customer_grid</filter_indexer>
    <page_size>false</page_size>
    <searchable>true</searchable>
</action>

This code defines a new column called “Registration Date” which displays the customer’s registration date as a date field. The column_name attribute matches the name of your custom attribute.

Conclusion

Adding a custom column to Magento’s customer grid involves modifying the layout XML file and defining the new column’s properties. Remember, all changes should be made within your theme folder to avoid conflicts with core files or other themes.

If you’re looking for more advanced customizations or have questions about other areas of Magento development, feel free to explore our Magento tutorials on Laravel Company.

Don’t forget that regular backups and testing are crucial before deploying any changes in a production environment. Always make sure your theme is up-to-date with the latest security patches.

Happy coding!

Themes Admin Configuration Customers

Our network