0
如何调用运输方式,付款方式和订单状态的ID。我只发现getShippingDescription();
返回方法的全文和getShippinid();不起作用。Magento获取运输方式,付款方式和订单状态的ID
如何调用运输方式,付款方式和订单状态的ID。我只发现getShippingDescription();
返回方法的全文和getShippinid();不起作用。Magento获取运输方式,付款方式和订单状态的ID
我假设你想获得订单的这些细节。如果是这样,你可以使用下面的代码:
/*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最好的办法