I am trying to add a new column to the grid. Its about the sales.phtml as you can see the XML:

<reference name="left">
            <block type="adminhtml/customer_edit_tabs" name="customer_edit_tabs">
                <block type="adminhtml/customer_edit_tab_view" name="customer_edit_tab_view" template="customer/tab/view.phtml">
                    <block type="adminhtml/customer_edit_tab_view_sales" name="sales" template="customer/tab/view/sales.phtml" before="-" />
                    <block type="adminhtml/customer_edit_tab_view_accordion" name="accordion" />
                <action method="addTab"><name>customer_edit_tab_view</name><block>customer_edit_tab_view</block></action>

This is my xml:

        <reference name="customer_edit_tab_view">
          <block type="adminhtml/customer_edit_tab_view_sales" name="customsales" before="-" template="mymodulename/customer/edit/tab/view/customesales.phtml"/>

Is there a way to manage this just from the XML?

1 Answer 1


Is there a way to manage this just from the XML ?

No, for several reasons:

  • the grid block with the addColumn() method is created dynamically by the container block, so you cannot reference it in the XML.
  • besides the addColumn() call you also need to add the additional attribute to the collection before it is loaded. So even if you somehow create the grid block directly in the XML, it won't help.

So you have to do it with a custom module. This question references some good resources: Add Column to Admin > Sales > Orders Grid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.