Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

overwriting block gives blabber instead of grid
 
ericbb
Jr. Member
 
Total Posts:  6
Joined:  2009-05-20
 

I want to add the order status to the grid in Mage_Adminhtml_Block_Edit_Tab_Orders. So I do this:

class Mine_Adminhtml_Block_CustomerEditTabOrders extends Mage_Adminhtml_Block_Edit_Tab_Orders{
    
    
public function __construct() {
        parent
::_construct();
    
}
    
    
public function _prepareColumns()
    
{
        $this
->addColumn('increment_id', array(
            
'header'    => Mage::helper('customer')->__('Order #'),
            
'width'     => '100',
            
'index'     => 'increment_id',
        ));
        
        
$this->addColumn('status', array(
            
'header' => Mage::helper('sales')->__('Status'),
            
'index' => 'status',
            
'type'  => 'options',
            
'width' => '70px',
            
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
        ));

        
$this->addColumn('created_at', array(
            
'header'    => Mage::helper('customer')->__('Purchase On'),
            
'index'     => 'created_at',
            
'type'      => 'datetime',
        ));

       
        
$this->addColumn('billing_name', array(
            
'header'    => Mage::helper('customer')->__('Bill to Name'),
            
'index'     => 'billing_name',
        ));

        
$this->addColumn('shipping_name', array(
            
'header'    => Mage::helper('customer')->__('Shipped to Name'),
            
'index'     => 'shipping_name',
        ));

        
$this->addColumn('grand_total', array(
            
'header'    => Mage::helper('customer')->__('Order Total'),
            
'index'     => 'grand_total',
            
'type'      => 'currency',
            
'currency'  => 'order_currency_code',
        ));

        if (!
Mage::app()->isSingleStoreMode()) {
            $this
->addColumn('store_id', array(
                
'header'    => Mage::helper('customer')->__('Bought From'),
                
'index'     => 'store_id',
                
'type'      => 'store',
                
'store_view' => true
            
));
        
}

        $this
->addColumn('action', array(
            
'header'    => ' ',
            
'filter'    => false,
            
'sortable'  => false,
            
'width'     => '100px',
            
'renderer'  => 'adminhtml/sales_reorder_renderer_action'
        
));

        return 
parent::_prepareColumns();
        
    
}
}

all I get from this is:

�������<ϱ�0Н��Ɔ%&��J�`��i�H��u�~Z@l� �΍W�v���DF X�h��� ,��`�9Jo9�}*��C4w#�X�&#xH1;��QD���~q*5�tSF��a}����*J� !Պ] �S;%���?��`%����U��<�@��3�Y�I��� ������,������

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ericbb
Jr. Member
 
Total Posts:  6
Joined:  2009-05-20
 

anyone has seen this before?

thanx in advance

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top