i want to edit sales_order listing view to add new column but i can not find that template to edit.
i want to edit .phtml file not Block
this is url that i want to edit on it
i want to edit sales_order listing view to add new column but i can not find that template to edit.
i want to edit .phtml file not Block
this is url that i want to edit on it
You need to rewrite the sales_order_grid
block in your config.xml file in order to add new column in order listing.
<sales_order_grid>Namespace_Modulename_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
Then create above class in your module & extend it from - Mage_Adminhtml_Block_Widget_Grid
Under _prepareColumns()
function add your new column & value.
Hope this will help you.
$customerData = Mage::getSingleton('customer/session')->getCustomer(); $customer_id = $customerData->getId(); $collection = Mage::getModel('catalog/product')->getCollection(); $collection->addAttributeToSelect('*'); $collection->addFieldToFilter(array( array('attribute'=>'customer_id','eq'=>$customer_id) )); $ids=array(); foreach ($collection as $product) { $ids[]=$product->getId(); }