Magento Forum

   
Updating sales_order.grid from layout xml
 
pcreact
Jr. Member
 
Total Posts:  4
Joined:  2013-02-20
 

Hello,

This one is driving me crazy.

<sales_order_grid_update_handle>
        <
reference name="sales_order.grid">
            <
action method="addFranchiseFilterColumn"></action>
        </
reference>
    </
sales_order_grid_update_handle>
    <
adminhtml_sales_order_grid>
        <!-- 
apply layout handle defined above -->
        <
update handle="sales_order_grid_update_handle" />
    </
adminhtml_sales_order_grid>
    <
adminhtml_sales_order_index>
        <!-- 
apply layout handle defined above -->
        <
update handle="sales_order_grid_update_handle" />
    </
adminhtml_sales_order_index>

That works fine and I get the new column in my sales_order.grid

But for some reason when I use this:

<sales_invoice_grid_update_handle>
        <
reference name="sales_invoice.grid">
            <
action method="addFranchiseFilterColumn"></action>
        </
reference>
    </
sales_invoice_grid_update_handle>
    <
adminhtml_sales_invoice_grid>
        <!-- 
apply layout handle defined above -->
        <
update handle="sales_invoice_grid_update_handle" />
    </
adminhtml_sales_invoice_grid>
    <
adminhtml_sales_invoice_index>
        <!-- 
apply layout handle defined above -->
        <
update handle="sales_invoice_grid_update_handle" />
    </
adminhtml_sales_invoice_index>

addFranchiseFilterColumn never gets called.

Is this a bug in magento or am I doing something wrong?

Thanks in advance for any help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ryan Sun _Kuafu
Guru
 
Total Posts:  317
Joined:  2008-11-14
FL
 

there are also customized block and method you didn’t realize

 
Magento Community Magento Community
Magento Community
Magento Community
 
pcreact
Jr. Member
 
Total Posts:  4
Joined:  2013-02-20
 

I am using a customised block but I have confirmed that it is the one being used by over-riding the prepareLayout function and echo-ing some random text out.

I’ve also confirmed that the <sales_order_grid_update_handle> is part of the layout XML when the page is loaded.

Still really stumped on this one, thanks for the input.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top