sales_flat_orderへのカスタムフィールドの追加
私はかなりの量のグーグル、試行錯誤を行ってきましたが、問題の解決策を見つけることができません。 sales_order_gridのフィールドと順序を変更する機能。そして このグリッドに2つのカスタムフィールドを表示する機能(フィルター可能)。 前者(ポイント1)はMage_Adminhtml_Block_Widget_Grid、カスタムモジュールを拡張することで解決されました(オブザーバーについては知っていますが、インストールされている他のモジュールは、オブザーバーによる私の変更をオーバーライドしていました)。 とにかく、後者は私の現在の問題です。以下は、これまでに失敗した2つの方法です。 方法1 <?php /* @var $this Mage_Sales_Model_Mysql4_Setup */ $this->startSetup(); $connection = $this->getConnection(); /** * Create the payment method dropdown field, because this field _may_ be * used for searching we will create an index for it. */ $connection->addColumn( $this->getTable('sales/order_grid'), 'x_payment_method', "ENUM('PayPal', 'SagePay') DEFAULT NULL" ); $connection->addKey($this->getTable('sales/order_grid'), …