Skip to main content
3 of 3
added 110 characters in body
Rob D. A.
  • 867
  • 11
  • 38

How to add searchable column "shipping methods" into Sales/Orders admin grid?

To make my admin Sales/Orders grid better I added column to the grid: enter image description here

and as on the picture above it shows order delivery method but ... how to create "delivery method" dropdown list to make it easier to use? So far I tried to add a class:

public function getCarrierList()
{
    $shippingMethods = Mage::getSingleton('shipping/config')->getActiveCarriers();  
    $methods = array();
    foreach($shippingMethods as $method)
    {
            $methods[$method['value']] = $methods[$method['label']];
    }
    return $methods;
}

and added to the column definition:

    $this->addColumn('shipping_method', array(
        'header' => Mage::helper('sales')->__('Shipping Method'),
        'index' => 'shipping_description',
        'type'=> 'options',
        'filter_index' => 'shipping_method',
        'options' => $this->getCarrierList(),
    ));
    

but then my column stays empty and drop-down is also empty. Of course I can live without it but if I can have a list instead of a typing method name .. would be nice.

Rob D. A.
  • 867
  • 11
  • 38