i want to add out of stock colum to magento admin product listing pages, so that it will be easy to view all low stock iteam easily
how can id do it via magento setting or any module ??
I tried to do it via observer but could make it work
<events>
<adminhtml_block_html_before>
<observers>
<add_customer_group_column>
<type>model</type>
<class>customizations/observer</class>
<method>addCustomerGroupColumn</method>
</add_customer_group_column>
</observers>
</adminhtml_block_html_before>
</events>
Observer.h
Model/Observer.php
class Devshree_Unidesing_Model_Observer {
public function addCustomerGroupColumn(Varien_Event_Observer $observer){
if($observer->getBlock()->getType() == 'adminhtml/sales_order_grid'){
$block = $observer->getEvent()->getBlock();
$sales_order_grid_block = $observer->getBlock();
$groups = Mage::getResourceModel('customer/group_collection')
->addFieldToFilter('customer_group_id', array('gt' => 0))
->load()
->toOptionHash();
$block->addColumn('customer_group_id', array(
'header' => Mage::helper('customer')->__('Customer Group'),
'width' => '100',
'index' => 'customer_group_id',
'type' => 'options',
'options' => $groups,
));
$block->addColumnsOrder('customer_group_id', 'shipping_name');
}
}
}