/**
  * Get the shipping method using the shipping code.
  *
  * @param  string
  * @return string | null
  */
 protected function getShippingMethod($shipping)
 {
     $data = array_filter(explode('_', $shipping));
     if (count($data) > 1) {
         /** @var string */
         $shippingCode = $data[0];
         /** @var string */
         $shippingMethodCode = $data[1];
         /** @var Mage_Shipping_Model_Carrier_Abstract | false */
         $carrier = $this->shipping->getCarrierByCode($shippingCode);
         return $carrier ? sprintf('%s - %s', $carrier->getConfigData('title'), $this->getShippingMethodName($carrier, $shippingMethodCode)) : null;
     }
     return null;
 }
 public function getCarrierByCode($carrierCode, $storeId = null)
 {
     if ($carrierCode == 'imported') {
         $className = Mage::getStoreConfig('carriers/' . $carrierCode . '/model', $storeId);
         if (!$className) {
             return false;
         }
         $obj = Mage::getModel($className);
         if ($storeId) {
             $obj->setStore($storeId);
         }
         return $obj;
     } else {
         return parent::getCarrierByCode($carrierCode, $storeId);
     }
 }