Public Member Functions | |
__construct () | |
Protected Member Functions | |
_prepareCollection () | |
_prepareColumns () |
Definition at line 34 of file Grid.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Mage_Adminhtml_Block_Report_Grid.
Definition at line 37 of file Grid.php.
00038 { 00039 parent::__construct(); 00040 $this->setId('gridSales'); 00041 }
_prepareCollection | ( | ) | [protected] |
Prepare grid collection object
Validate from and to date
Getting and saving store ids for website & group
Reimplemented from Mage_Adminhtml_Block_Report_Grid.
Definition at line 43 of file Grid.php.
00044 { 00045 parent::_prepareCollection(); 00046 $this->getCollection()->initReport('reports/order_collection'); 00047 }
_prepareColumns | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Block_Report_Grid.
Definition at line 49 of file Grid.php.
00050 { 00051 $this->addColumn('orders', array( 00052 'header' =>Mage::helper('reports')->__('Number of Orders'), 00053 'index' =>'orders', 00054 'total' =>'sum', 00055 'type' =>'number' 00056 )); 00057 00058 $this->addColumn('items', array( 00059 'header' =>Mage::helper('reports')->__('Items Ordered'), 00060 'index' =>'items', 00061 'total' =>'sum', 00062 'type' =>'number' 00063 )); 00064 00065 $currency_code = $this->getCurrentCurrencyCode(); 00066 00067 $this->addColumn('subtotal', array( 00068 'header' =>Mage::helper('reports')->__('Subtotal'), 00069 'type' =>'currency', 00070 'currency_code' => $currency_code, 00071 'index' =>'subtotal', 00072 'total' =>'sum', 00073 'renderer' =>'adminhtml/report_grid_column_renderer_currency' 00074 )); 00075 00076 $this->addColumn('tax', array( 00077 'header' =>Mage::helper('reports')->__('Tax'), 00078 'type' =>'currency', 00079 'currency_code' => $currency_code, 00080 'index' =>'tax', 00081 'total' =>'sum', 00082 'renderer' =>'adminhtml/report_grid_column_renderer_currency' 00083 )); 00084 00085 $this->addColumn('shipping', array( 00086 'header' =>Mage::helper('reports')->__('Shipping'), 00087 'type' =>'currency', 00088 'currency_code' => $currency_code, 00089 'index' =>'shipping', 00090 'total' =>'sum', 00091 'renderer' =>'adminhtml/report_grid_column_renderer_currency' 00092 )); 00093 00094 $this->addColumn('discount', array( 00095 'header' =>Mage::helper('reports')->__('Discounts'), 00096 'type' =>'currency', 00097 'currency_code' => $currency_code, 00098 'index' =>'discount', 00099 'total' =>'sum', 00100 'renderer' =>'adminhtml/report_grid_column_renderer_currency' 00101 )); 00102 00103 $this->addColumn('total', array( 00104 'header' =>Mage::helper('reports')->__('Total'), 00105 'type' =>'currency', 00106 'currency_code' => $currency_code, 00107 'index' =>'total', 00108 'total' =>'sum', 00109 'renderer' =>'adminhtml/report_grid_column_renderer_currency' 00110 )); 00111 00112 $this->addColumn('invoiced', array( 00113 'header' =>Mage::helper('reports')->__('Invoiced'), 00114 'type' =>'currency', 00115 'currency_code' => $currency_code, 00116 'index' =>'invoiced', 00117 'total' =>'sum', 00118 'renderer' =>'adminhtml/report_grid_column_renderer_currency' 00119 )); 00120 00121 $this->addColumn('refunded', array( 00122 'header' =>Mage::helper('reports')->__('Refunded'), 00123 'type' =>'currency', 00124 'currency_code' => $currency_code, 00125 'index' =>'refunded', 00126 'total' =>'sum', 00127 'renderer' =>'adminhtml/report_grid_column_renderer_currency' 00128 )); 00129 00130 $this->addExportType('*/*/exportSalesCsv', Mage::helper('reports')->__('CSV')); 00131 $this->addExportType('*/*/exportSalesExcel', Mage::helper('reports')->__('Excel')); 00132 00133 return parent::_prepareColumns(); 00134 }