如何从订单ID Magento获取所有订单详细信息,包括付款客户和运输详细信息

罗希特·戈尔(Rohit Goel)

我需要获取所有订单详细信息,其中包括所有付款详细信息,客户详细信息和运输详细信息,或者说订单的所有详细信息。为此,我在配置文件中使用了一个事件

checkout_onepage_controller_success_action 

我的观察者文件中的功能是

public function getorderrealid($observer) {

    print_r($observer->getData());
}

该函数会正确触发,但是会返回以下数组

Array
(
    [event] => Varien_Event Object
        (
            [_observers:protected] => Varien_Event_Observer_Collection Object
                (
                    [_observers:protected] => Array
                        (
                        )

                )

            [_data:protected] => Array
                (
                    [order_ids] => Array
                        (
                            [0] => 66
                        )

                    [name] => checkout_onepage_controller_success_action
                )

            [_hasDataChanges:protected] => 
            [_origData:protected] => 
            [_idFieldName:protected] => 
            [_isDeleted:protected] => 
            [_oldFieldsMap:protected] => Array
                (
                )

            [_syncFieldsMap:protected] => Array
                (
                )

        )

    [order_ids] => Array
        (
            [0] => 66
        )

)

它仅给出订单ID。

请建议我如何获取订单的所有详细信息。

Keyur Shah
$order = Mage::getModel('sales/order')->load($orderid);
$orderData = $order->getData();
print_r($orderData);

编辑

$billingAddress = $order->getBillingAddress();
$shippingAddress = $order->getShippingAddress();

有关信用卡信息

CC前4个数字: $order->getPayment()->getCcLast4()

$order->getPayment()->getCcExpMonth();
$order->getPayment()->getCcExpYear();

当您打印时,$orderData您可以获得以下信息,例如

Array
(
    [entity_id] => 45
    [state] => processing
    [status] => pending
    [coupon_code] => stickytest
    [protect_code] => 1036b0
    [shipping_description] => Voucher code discount
    [is_virtual] => 0
    [store_id] => 1
    [customer_id] =>
    [base_discount_amount] => -195.0000
    [base_discount_canceled] =>
    [base_discount_invoiced] =>
    [base_discount_refunded] =>
    [base_grand_total] => 0.0000
    [base_shipping_amount] => 0.0000
    [base_shipping_canceled] =>
    [base_shipping_invoiced] =>
    [base_shipping_refunded] =>
    [base_shipping_tax_amount] => 0.0000
    [base_shipping_tax_refunded] =>
    [base_subtotal] => 177.2700
    [base_subtotal_canceled] =>
    [base_subtotal_invoiced] =>
    [base_subtotal_refunded] =>
    [base_tax_amount] => 0.0000
    [base_tax_canceled] =>
    [base_tax_invoiced] =>
    [base_tax_refunded] =>
    [base_to_global_rate] => 1.0000
    [base_to_order_rate] => 1.0000
    [base_total_canceled] =>
    [base_total_invoiced] =>
    [base_total_invoiced_cost] =>
    [base_total_offline_refunded] =>
    [base_total_online_refunded] =>
    [base_total_paid] =>
    [base_total_qty_ordered] =>
    [base_total_refunded] =>
    [discount_amount] => -195.0000
    [discount_canceled] =>
    [discount_invoiced] =>
    [discount_refunded] =>
    [grand_total] => 0.0000
    [shipping_amount] => 0.0000
    [shipping_canceled] =>
    [shipping_invoiced] =>
    [shipping_refunded] =>
    [shipping_tax_amount] => 0.0000
    [shipping_tax_refunded] =>
    [store_to_base_rate] => 1.0000
    [store_to_order_rate] => 1.0000
    [subtotal] => 177.2700
    [subtotal_canceled] =>
    [subtotal_invoiced] =>
    [subtotal_refunded] =>
    [tax_amount] => 0.0000
    [tax_canceled] =>
    [tax_invoiced] =>
    [tax_refunded] =>
    [total_canceled] =>
    [total_invoiced] =>
    [total_offline_refunded] =>
    [total_online_refunded] =>
    [total_paid] =>
    [total_qty_ordered] => 1.0000
    [total_refunded] =>
    [can_ship_partially] =>
    [can_ship_partially_item] =>
    [customer_is_guest] => 1
    [customer_note_notify] => 1
    [billing_address_id] => 89
    [customer_group_id] => 0
    [edit_increment] =>
    [email_sent] => 1
    [forced_shipment_with_invoice] =>
    [gift_message_id] =>
    [payment_auth_expiration] =>
    [paypal_ipn_customer_notified] =>
    [quote_address_id] =>
    [quote_id] => 215
    [shipping_address_id] => 90
    [adjustment_negative] =>
    [adjustment_positive] =>
    [base_adjustment_negative] =>
    [base_adjustment_positive] =>
    [base_shipping_discount_amount] => 0.0000
    [base_subtotal_incl_tax] => 195.0000
    [base_total_due] =>
    [payment_authorization_amount] =>
    [shipping_discount_amount] => 0.0000
    [subtotal_incl_tax] => 195.0000
    [total_due] =>
    [weight] => 1.0000
    [customer_dob] =>
    [increment_id] => 100000034
    [applied_rule_ids] => 4
    [base_currency_code] => AUD
    [customer_email] => [email protected]
    [customer_firstname] => billing[firstname]
    [customer_lastname] => billing[lastname]
    [customer_middlename] =>
    [customer_prefix] =>
    [customer_suffix] =>
    [customer_taxvat] =>
    [discount_description] => stickytest
    [ext_customer_id] =>
    [ext_order_id] =>
    [global_currency_code] => AUD
    [hold_before_state] =>
    [hold_before_status] =>
    [order_currency_code] => AUD
    [original_increment_id] =>
    [relation_child_id] =>
    [relation_child_real_id] =>
    [relation_parent_id] =>
    [relation_parent_real_id] =>
    [remote_ip] => 192.168.0.18
    [shipping_method] => matrixrate_matrixrate_free
    [store_currency_code] => AUD
    [store_name] => Main Website
Main Store
English
    [x_forwarded_for] =>
    [customer_note] =>
    [created_at] => 2012-11-19 10:53:11
    [updated_at] => 2012-11-19 10:53:12
    [total_item_count] => 1
    [customer_gender] =>
    [base_custbalance_amount] =>
    [currency_base_id] =>
    [currency_code] =>
    [currency_rate] =>
    [custbalance_amount] =>
    [is_hold] =>
    [is_multi_payment] =>
    [real_order_id] =>
    [tax_percent] =>
    [tracking_numbers] =>
    [hidden_tax_amount] => 17.7300
    [base_hidden_tax_amount] => 17.7300
    [shipping_hidden_tax_amount] => 0.0000
    [base_shipping_hidden_tax_amnt] => 0.0000
    [hidden_tax_invoiced] =>
    [base_hidden_tax_invoiced] =>
    [hidden_tax_refunded] =>
    [base_hidden_tax_refunded] =>
    [shipping_incl_tax] => 0.0000
    [base_shipping_incl_tax] => 0.0000
    [onestepcheckout_customercomment] => onestepcheckout_comments
    [onestepcheckout_customerfeedback] => Google
    [payment_authorization_expiration] =>
    [forced_do_shipment_with_invoice] =>
    [base_shipping_hidden_tax_amount] => 0.0000
)

让我知道你是否有任何疑问

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何从订单ID Magento获取所有订单详细信息,包括付款客户和运输详细信息

来自分类Dev

通过magento中的订单ID获取订单详细信息

来自分类Dev

通过订单ID获取订单详细信息

来自分类Dev

实施客户电话,运输详细信息和订单的最佳方法是什么?

来自分类Dev

如何在Infusionsoft中通过订单ID获取订单详细信息

来自分类Dev

保持贝宝付款时如何通过邮件获取订单详细信息?

来自分类Dev

如何使用$ exceptionHandler获取异常的所有详细信息,包括errorMsg,url和lineNumber?

来自分类Dev

贝宝:如何获取订单ID并传递到交易详细信息页面

来自分类Dev

SQL返回每个客户的最后订单详细信息

来自分类Dev

Amazon API检索订单详细信息

来自分类Dev

woocommerce结帐后获取订单详细信息

来自分类Dev

woocommerce结帐后获取订单详细信息

来自分类Dev

从数据库中获取woocommerce订单详细信息

来自分类Dev

如何获取所有用户详细信息

来自分类Dev

创建带有订单详细信息的Woocommerce简码

来自分类Dev

如何在没有API详细信息的情况下获取潜在客户详细信息?

来自分类Dev

如何在没有API详细信息的情况下获取潜在客户详细信息?

来自分类Dev

如何在“订单详细信息”页面的“订购的商品”表中显示额外字段-Magento

来自分类Dev

如何使用 Razorpay PHP API 获取付款详细信息?

来自分类Dev

如何从所有区域的AWS账户获取ELB列表和详细信息

来自分类Dev

如何在Wordpress中的自定义插件中获取订单详细信息

来自分类Dev

如何从woocommerce挂钩中的订单中获取供应商详细信息-Dokan

来自分类Dev

MS CRM 2011,从报价详细信息到销售订单详细信息

来自分类Dev

如何获取既是卖家又是买家的客户的详细信息

来自分类Dev

需要找到包含订单和订单详细信息的大量代码

来自分类Dev

如何在同一视图上显示特定的订单详细信息以及仅属于该特定订单的所有产品

来自分类Dev

Woocommerce订单详细信息无法正确加载

来自分类Dev

Prestashop Web服务PSWebServiceLibrary返回空订单详细信息

来自分类Dev

在ASP.NET MVC中编辑订单详细信息

Related 相关文章

  1. 1

    如何从订单ID Magento获取所有订单详细信息,包括付款客户和运输详细信息

  2. 2

    通过magento中的订单ID获取订单详细信息

  3. 3

    通过订单ID获取订单详细信息

  4. 4

    实施客户电话,运输详细信息和订单的最佳方法是什么?

  5. 5

    如何在Infusionsoft中通过订单ID获取订单详细信息

  6. 6

    保持贝宝付款时如何通过邮件获取订单详细信息?

  7. 7

    如何使用$ exceptionHandler获取异常的所有详细信息,包括errorMsg,url和lineNumber?

  8. 8

    贝宝:如何获取订单ID并传递到交易详细信息页面

  9. 9

    SQL返回每个客户的最后订单详细信息

  10. 10

    Amazon API检索订单详细信息

  11. 11

    woocommerce结帐后获取订单详细信息

  12. 12

    woocommerce结帐后获取订单详细信息

  13. 13

    从数据库中获取woocommerce订单详细信息

  14. 14

    如何获取所有用户详细信息

  15. 15

    创建带有订单详细信息的Woocommerce简码

  16. 16

    如何在没有API详细信息的情况下获取潜在客户详细信息?

  17. 17

    如何在没有API详细信息的情况下获取潜在客户详细信息?

  18. 18

    如何在“订单详细信息”页面的“订购的商品”表中显示额外字段-Magento

  19. 19

    如何使用 Razorpay PHP API 获取付款详细信息?

  20. 20

    如何从所有区域的AWS账户获取ELB列表和详细信息

  21. 21

    如何在Wordpress中的自定义插件中获取订单详细信息

  22. 22

    如何从woocommerce挂钩中的订单中获取供应商详细信息-Dokan

  23. 23

    MS CRM 2011,从报价详细信息到销售订单详细信息

  24. 24

    如何获取既是卖家又是买家的客户的详细信息

  25. 25

    需要找到包含订单和订单详细信息的大量代码

  26. 26

    如何在同一视图上显示特定的订单详细信息以及仅属于该特定订单的所有产品

  27. 27

    Woocommerce订单详细信息无法正确加载

  28. 28

    Prestashop Web服务PSWebServiceLibrary返回空订单详细信息

  29. 29

    在ASP.NET MVC中编辑订单详细信息

热门标签

归档