I'm looking to create a custom Magento Adminhtml report based on the Products Sold report (Reports->Products->Products Ordered
in Adminhtml). I can see that the Products Sold report's Grid Block is Mage_Adminhtml_Block_Report_Product_Sold_Grid
.
However, I'm obviously missing something, because the report has a period column, which isn't added to the report in the Grid block's _prepareColumns()
function. Here are the other two columns being added in Mage_Adminhtml_Block_Report_Product_Sold_Grid
:
protected function _prepareColumns()
{
$this->addColumn('name', array(
'header' =>Mage::helper('reports')->__('Product Name'),
'index' =>'order_items_name'
));
$this->addColumn('ordered_qty', array(
'header' =>Mage::helper('reports')->__('Quantity Ordered'),
'width' =>'120px',
'align' =>'right',
'index' =>'ordered_qty',
'total' =>'sum',
'type' =>'number'
));
$this->addExportType('*/*/exportSoldCsv', Mage::helper('reports')->__('CSV'));
$this->addExportType('*/*/exportSoldExcel', Mage::helper('reports')->__('Excel XML'));
return parent::_prepareColumns();
}
My question is where is the Period column is coming from, and from where is it getting its data?