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

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.

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.

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.

added 2 characters in body
Source Link
Rob D. A.
  • 867
  • 11
  • 38

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.

To make my admin Sales/Orders grid better 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.

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.

Source Link
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 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.