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

Remove columns in Orders Grid
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

I was wondering if it’s possible to remove the two columns ("GT (Base)” and “GT (Purchased) in the sales orders grid.

 
Magento Community Magento Community
Magento Community
Magento Community
 
G_Mehta
Guru
 
Avatar
Total Posts:  418
Joined:  2010-01-27
India
 

Edit “Grid.php” file (../app/code/Core/Mage/Adminhtml/block/sales/order)

find following code and comment it

$this->addColumn('base_grand_total', array(
            
'header' => Mage::helper('sales')->__('G.T. (Base)'),
            
'index' => 'base_grand_total',
            
'type'  => 'currency',
            
'currency' => 'base_currency_code',
        ));

        
$this->addColumn('grand_total', array(
            
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
            
'index' => 'grand_total',
            
'type'  => 'currency',
            
'currency' => 'order_currency_code',
        ));

Good luck,

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

Yeah, I tried this also:

/*
        $this->addColumn(\'base_grand_total\', array(
            \'header\' => Mage::helper(\'sales\')->__(\'G.T. (Base)\'),
            \'index\' => \'base_grand_total\',
            \'type\'  => \'currency\',
            \'currency\' => \'base_currency_code\',
        ));
        
        
        $this->addColumn(\'grand_total\', array(
            \'header\' => Mage::helper(\'sales\')->__(\'G.T. (Purchased)\'),
            \'index\' => \'grand_total\',
            \'type\'  => \'currency\',
            \'currency\' => \'order_currency_code\',
        ));
*/

But it doesn\’t change..

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

Has someone a solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Did you remember to refresh the cache in your administration panel? You could also try to delete the directory var/cache.

Hope it helps!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

So, I refreshed the cache, deleted the directory var/cache but still nothing…

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

Other solutions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

That’s a bit strange. Are you certain that you are looking at the right grid? Could you tell us exactly where you are navigating to in the top menu?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

So, the file that I’m editing is Grid.php located in: app/code/core/Mage/Adminhtml/Block/Sales/Order/

I changed this block of code to a comment:

/*
        $this->addColumn('base_grand_total', array(
            'header' => Mage::helper('sales')->__('G.T. (Base)'),
            'index' => 'base_grand_total',
            'type'  => 'currency',
            'currency' => 'base_currency_code',
        ));
        
    
        $this->addColumn('grand_total', array(
            'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
            'index' => 'grand_total',
            'type'  => 'currency',
            'currency' => 'order_currency_code',
        ));
        
        */

The strange thing is when I change

'header' => Mage::helper('sales')->__('G.T. (Base)'),

to

'header' => Mage::helper('sales')->__('This is a test)'),

Gives us: “This is a test” in the sales-ordergrid of the backend.

Editing is possible, removing not.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

First of all, thx for the answer.
So I went to the app folder, but which file do I have to open in code/community or code/local?

There only are a few extensions that I’ve previously installed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeroenpeters
Member
 
Total Posts:  58
Joined:  2011-01-19
 

Okay, I found a solution. I added this code:

parent::_prepareColumns();
   unset(
$this->_columns['grand_total']);
   return 
$this;

Now I posted a new topic about adding an extra column in the grid:
http://www.magentocommerce.com/boards/viewthread/263594/

 
Magento Community Magento Community
Magento Community
Magento Community
 
maria_atwix
Sr. Member
 
Avatar
Total Posts:  129
Joined:  2012-01-23
 

Hi! Our team has solution of this problem in the article http://www.atwix.com/magento/customize-orders-grid/

Hope this information helps

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