Posts

Showing posts from September, 2012

MAGENTO::Sales Order Grid Customization - Add SKU list and customer email column to the grid

Add SKU list and Customer Email column to the grid Supposed you had copied your code\core\Mage\Adminhtml\Block\Sales\Order\Grid.php to code\local\Mage\Adminhtml\Block\Sales\Order\Grid.php because you want to display the subtotals, credit card types, total of items ordered for the sales order. The new version of Magento which is 1.4.1 in code\local\Mage\Adminhtml\Block\Sales\Order\Grid.php change like this protected function _prepareCollection() { $collection = Mage::getResourceModel($this->_getCollectionClass()); $collection->getSelect()->joinLeft( array('sfoi'=>'sales_flat_order_item'), 'main_table.entity_id=sfoi.order_id', array( 'sku' =>'sfoi.sku' ) ); $collection->addExpressionFieldToSelect ( "sku", "GROUP_CONCAT(sku SEPARATOR ' , ')", $fields="" ); $collection->getSelect()->group("entity_id"); $collection->getSelect()->join