嗨,谁能告诉我成功下订单后如何获得运输方式标题?
这是我所拥有的
$iOrderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$oOrder = Mage::getModel('sales/order')->loadByIncrementId($iOrderId);
echo $oOrder->getShippingMethod();
但我怎样才能得到这个运输方式的标题?
$oOrder->getShippingDescription();
$order = Mage::getModel('sales/order')->loadByIncrementId($iOrderId);
$order->getShippingDescription();
或者
$shipping = $order->getShippingAddress()->getShippingMethod();
echo $shipping->getData('title');
这在寻找自定义标题时对我有用:
Mage::getModel('sales/order')->loadByIncrementId($orderId)->getTracksCollection()->getFirstItem()->getTitle();
$order->getShippingDescription(); // returns Shipping Method Title