In the low stock report I need to add the manufacturer/brand as a column for each ID or product name, so that I'm able to prepare stock requests per manufacturer.
Any help to accomplish this is very welcome.
Hope you have override the core Class for Increase stock.
Step 1: Override the grid Class in local folder.
Step 2: In Prepare Column add below Code.
$this->addColumn('brand',
array(
'header' => Mage::helper('reports')->__('Pending'),
'type' => 'string',
'filter' => false,
'sortable' => false,
'renderer' => 'Namespace_Modulename_Block_Adminhtml_Renderer_brand'
));
Step 3: create File app/code/local/Namespace/Modulename/Block/Adminhtml/Renderer/brand.php
.
Step 4: Copy and paste below code.
<?php
class Namespace_Modulename_Block_Adminhtml_Renderer_brand extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
public function render(Varien_Object $row){
$data=Mage::getSingleton('catalog/product')->load($row['entity_id']);
$brandName=$data->getData('brand');
return number_format($brandName,0);
}
}
Step 5: Refresh cache and check in your Grid.