カスタム モジュールを作成します...続きを読むマジェントオーダーグリッド/
app/code/local/RWS/OrderGridOptions/etc/config.xml 内
<global>
<blocks>
<adminhtml>
<rewrite>
<sales_order_grid>RWS_OrderGridOptions_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
</rewrite>
</adminhtml>
</blocks>
</global>
app/code/local/RWS/OrderGridOptions/Block/Adminhtml/Sales/Order/Grid.php に作成します。
(app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php を参照)
作成関数 _prepareColumns()
$this->addColumn('product_options', array(
'header' => Mage::helper('order')->__('Options'),
'width' => '150',
'index' => 'product_options'
'renderer' = new RWS_OrderGridOptions_Block_Adminhtml_Renderer_Data() // added this line
));
続きを読む @ http://www.magentocommerce.com/boards/viewthread/192232/#t239222
app/code/local/RWS/OrderGridOptions/Block/Adminhtml/Renderer/Data.php 内
class RWS_OrderGridOptions_Block_Adminhtml_Renderer_Data extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
{
public function render(Varien_Object $row)
{
return $this->_getValue($row);
}
public function _getValue(Varien_Object $row)
{
$val = $row->getData($this->getColumn()->getIndex()); // row value
$array = unserialize($val);
//loop thru the $array and create a format string
//
$format_val = $array['xyx'] . ' ' . $array['abc'];
return $format_val;
}
}