Search code examples
phpmagento

How to filter order list by shipping method?


I try to create custom grid with orders shipped by some shipping method (for example TNT). Here is a method where should be a filter:

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass());
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

I'm going to use something like addFieldToFilter(), but I don't know field name. Could you help me?


Solution

  • How about "shipping_method" or "shipping_description". this fields are from "sales_flat_order"