Go to /app/code/core/Mage/Adminhtml/Block/Sales/Order and open grid.php
Now replace your _prepareCollection() function to this following code
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass())
->join(
‘sales/order_item’,
‘`sales/order_item`.order_id=`main_table`.entity_id’,
array(
‘skus’ => new Zend_Db_Expr(‘group_concat(`sales/order_item`.sku SEPARATOR “,”)’),
‘names’ => new Zend_Db_Expr(‘group_concat(`sales/order_item`.name SEPARATOR “,”)’),
)
);
$collection->getSelect()->group(‘entity_id’);
$this->setCollection($collection);
return parent::_prepareCollection();
}
After adding this function lets add the columns in grid for sku and ordername add this code in your _prepareColumns() function
$this->addColumn(‘skus’, array(
‘header’ => Mage::helper(‘Sales’)->__(‘Skus’),
‘width’ => ‘100px’,
‘index’ => ‘skus’,
‘type’ => ‘text’,
));
$this->addColumn(‘names’, array(
‘header’ => Mage::helper(‘Sales’)->__(‘Name’),
‘width’ => ‘100px’,
‘index’ => ‘names’,
‘type’ => ‘text’,
after this you’ll display your sales order screen in like this