I've made some modifcations to the products sold report template located here:
app/code/core/Mage/Adminhtml/Block/Report/Product/Sold
I've added SKU to the report, which works and also the supplier attribute, however supplier field returns a number instead of a word. What could be causing this problem
Period Product Name Product Sku Supplier Quantity Ordered
19 Apr 2015 | 620 | 2 | ||
631 | 2 | |||
473 | 2 | |||
621 | 2 | |||
473 | 2 | |||
430 | 1 | |||
673 | 1 | |||
431 | 1 | |||
673 | 1 | |||
473 | 1 | |||
430 | 1 | |||
622 | 1 | |||
828 | 1 | |||
673 | 1 | |||
430 | 1 | |||
624 | 1 | |||
430 | 1 | |||
473 | 1 | |||
425 | 1 | |||
673 | 1 |
protected function _prepareColumns()
{
$this->addColumn('name', array(
'header' =>Mage::helper('reports')->__('Product Name'),
'index' =>'order_items_name'
));
$this->addColumn('sku', array(
'header' =>Mage::helper('reports')->__('Product Sku'),
'sortable' =>true,
'index' =>'sku'
));
$this->addColumn('supplier', array(
'header' =>Mage::helper('reports')->__('Supplier'),
'sortable' =>true,
'index' =>'supplier'
));
$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();
}
}
Hi, Did you get an answer for this? I'm having the same problem.