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

How do I change the width of the status column in admin? 
 
ErwinDR
Jr. Member
 
Total Posts:  3
Joined:  2009-12-08
 

How do I change the width of the status column (& of the drop-down box) in admin on the orders overview page?
( admin > sales > orders )

The column is currently so small that it’s difficult to select orders based on a specific order status, especially when using various ‘pending’ variations.

I’ve searched the files and the boards but didn’t find any clue where this is defined.

Thanks!
Erwin

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

Look in app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
for something like this

$this->addColumn('status', array(
            
'header' => Mage::helper('sales')->__('Status'),
            
'index' => 'status',
            
'type'  => 'options',
            
'width' => '70px',
            
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
        ));
and replace the width (70px) to what ever you want.
 
Magento Community Magento Community
Magento Community
Magento Community
 
ErwinDR
Jr. Member
 
Total Posts:  3
Joined:  2009-12-08
 

Great! That worked. Thanks!

As an osCommerce veteran but a complete Magento newbie I didn’t look at the code residing in any ‘core’ directories. (Trying to avoid the mess I created with osCommerce wink ) I Thought the answer would be in the ‘/design/adminhtml/’ directories.

Still have to learn ....

Kind regards,
Erwin

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

Actually you are right.
You shouldn’t edit core files.
but you can extend (rewrite) them.
Here is a tutorial: http://magedev.com/2009/06/03/magento-overriding-model-block-or-helper/
What you need is to rewrite the app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php block.
But it’s a lot of work just to change a column width.

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