I have sales/order_grid_collection
where I'm getting the desired attributes on my grid, but the last one attribute I need is the billing street of the order, how can I get that programmatically?
Here is my code:
public function _prepareCollection()
{
$collection = Mage::getResourceModel('sales/order_grid_collection')->addAttributeToSelect('*');
$this->setCollection($collection);
parent::_prepareCollection();
}
protected function _prepareColumns()
{
$this->addColumn('real_order_id', array(
'header' => $this->_getHelper()->__('#'),
'width' => '80px',
'type' => 'text',
'index' => 'increment_id'
));
$this->addColumn('created_at', array(
'header' => $this->_getHelper()->__('Date'),
'index' => 'created_at',
'type' => 'datetime',
'width' => '100px'
));
$this->addColumn('billing_name', array(
'header' => $this->_getHelper()->__('Customer'),
'index' => 'billing_name'
));
// THIS IS THE ATTRIBUTE I NEED TO SHOW:
$this->addColumn('billing_street', array(
'header' => $this->_getHelper()->__('Address'),
'index' => 'billing_street'
));
//--------------------------------------------------
$this->addColumn('status', array(
'header' => $this->_getHelper()->__('Status'),
'index' => 'status',
'type' => 'options',
'width' => '70px',
'options' => Mage::getSingleton('sales/order_config')->getStatuses()
));
return parent::_prepareColumns();
}
Thanks in advance.