【问题标题】:How to get Invoice data in magento?如何在magento中获取发票数据?
【发布时间】:2016-05-18 05:38:08
【问题描述】:

我在这里尝试, 看到我正在获取订单数据,但是,我没有得到任何 $order->hasInvoice()

$orderID = 100000062;
$order = Mage::getModel('sales/order')->load($orderID);
if ($order->hasInvoices()) {
    $invIncrementIDs = array();
    foreach ($order->getInvoiceCollection() as $inv) {
        $invIncrementIDs[] = $inv->getIncrementId();
    } Mage::log($invIncrementIDs);
}

【问题讨论】:

    标签: magento collections invoice


    【解决方案1】:

    你能试试下面的代码吗:

    $orders_invoice = Mage::getModel("sales/order_invoice")->getCollection();
    
    foreach($orders_invoice as $val) { 
      print_r($val->getData()); 
    }
    

    【讨论】:

    • 但是我越来越空白了兄弟
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多