cancel
Showing results for 
Search instead for 
Did you mean: 

sold products report modification not working correctly

sold products report modification not working correctly

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  6202
  6312
  4732
  6212
  4732
  4301
  6731
  4311
  6731
  4731
  4301
  6221
  8281
  6731
  4301
  6241
  4301
  4731
  4251
  6731

 

 

 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();
}
}

2 REPLIES

Re: sold products report modification not working correctly

Hi, Did you get an answer for this? I'm having the same problem.

Re: sold products report modification not working correctly