且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Magento,使用XML标记方法扩展订单网格,选择选项

更新时间:2023-11-30 09:48:10

我相信问题出在您的<options>元素上,如果您通过重写重写销售订单网格,则必须为选项指定一个静态函数.我四处看看,看来您需要更改调用此方法的方式.

I believe the issue is with your <options> element, if you override the sales order grid by rewriting it, you have to specify a static function for the options. I've had a look around and it looks like you need to change the way you invoke this.

您可以尝试使用

<filter>Flipmedia_AddShippingCountryColumn_Adminhtml_Block_Widget_Grid_Column_Filter_Country</filter>

请注意新类,它应该像这样扩展Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select ...签出

Note the new class, it should extend Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select like this...check out the magento svn as a reference.

class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid_Filter_Inventory extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select
{

    protected function _getOptions()
    {
        // return an array of options
        return array(
                array(
                'value' =>  '',
                'label' =>  ''
        ));
    }
}