i have use default collection and change this file
/app/code/core/Mage/Adminhtml/Block/Sales/Order/grid.php
Now replace your _prepareCollection()
function to this following code
protected function _getCollectionClass()
{
return 'sales/order_grid_collection';
}
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass())
->join(
'sales/order_item',
'`sales/order_item`.order_id=`main_table`.entity_id',
array(
'sku' => new Zend_Db_Expr('group_concat(`sales/order_item`.sku SEPARATOR ",")'),)
);
$collection->getSelect()->group('entity_id');
$this->setCollection($collection);
return parent::_prepareCollection();
}
and add skus
field in grid
$this->addColumn('skus', array(
'header' => Mage::helper('Sales')->__('Skus'),
'width' => '100px',
'index' => 'skus',
'filter_index' => 'sku',
'type' => 'text',
));
but order count showing wrong
how can solve this issue
Thanks!!