如何拨打送货方式,付款方式和订单状态的ID。我只发现getShippingDescription();
返回方法的全文和getShippinid();不起作用。
答案 0 :(得分:0)
我假设你想获得订单的这些细节。如果您可以使用以下代码:
/*Just loading the Orders Collections*/
$order = Mage::getModel('sales/order')->getCollection();
/*Getting the First Order details in the collection*/
echo '<br/>Order Status : '.$order->getFirstItem()->getData('status');
echo '<br/>Order Shipping method : '.$order->getFirstItem()->getData('shipping_method');
$order_id = $order->getFirstItem()->getData('entity_id');
/*Loading the Payments of an order*/
$orderPayment = Mage::getResourceModel('sales/order_payment_collection')
->addFieldToSelect('*')
->addFieldToFilter('parent_id',$order_id);
echo '<br/>Order Payment method : '.$orderPayment->getFirstItem()->getMethod();
echo '<br/>Order Payment Id: '.$orderPayment->getFirstItem()->getData('entity_id');
另请查看我的其他答案https://stackoverflow.com/a/15250093/777103以获取最佳方法