- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要获取所有订单详细信息,其中包括所有付款详细信息、客户详细信息和运输详细信息,或者说出订单的所有详细信息。为此,我在配置文件中使用了一个事件
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。
请建议我如何获取订单的所有详细信息。
最佳答案
$order = Mage::getModel('sales/order')->load($orderid);
$orderData = $order->getData();
print_r($orderData);
编辑
$billingAddress = $order->getBillingAddress();
$shippingAddress = $order->getShippingAddress();
信用卡信息
抄送最后 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] => someone@somewhere.com
[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
)
如果您有任何疑问,请告诉我
关于magento - 如何从订单 ID Magento 获取所有订单详细信息,包括付款客户和运输详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23798073/
127.0.0.1:8000/api/仅包含来自第二个应用程序的 url,但我将两个 url 模块链接到相同的模式。甚至有可能做到这一点吗? 第一个应用程序: from django.urls imp
我目前正在学习 ColdFusion。我有 PHP 背景,对此我有点困惑。 我有一个选择菜单,我希望将选项保存在不同的文件中。 (例如 options.cfm)当我调用文件时,我想在选择菜单中包含选项
字符串: "75,000", "is", "95%", "or", "95/100" "of", "monthly", "income" o/p: "is","%, "or", "/", "of",
我有 4 个 javascript 文件(每个文件对应一个 HTML 文件),所有 4 个文件中的 3 个函数都是相同的。我想找到一个顺利的解决方案,我可以以某种方式分别包含这 3 个函数...是否可
我在 PHP 中有这种情况,其中 include在一台服务器上被遗漏,但在另一台服务器上没有(我没有设置服务器,所以我不能告诉你更多;我不是真正的 devops 人,所以这就是我在这里问的原因)。两台
这是一个模式文件,midi.xsd定义类型,note ,用于存储 MIDI 音符值: 这是另一个模式文件,octaves.xsd使用
我想备份以下文件夹 /home /etc /usr/local /root /var /boot 并排除 /var/tmp /var/run /var/lock /home/*/.thumbnails
如何重新编码具有许多值(包括缺失值)的数值变量,以获得数字 0:n-1哪里n是唯一值的数量,包括 NA ,整齐? 例子: df 1 1000 0 2 1000 0 3 N
选择元素的 html(包括在内)的最佳方法是什么?例如: This is just a test. 而$('#testDiv').html()返回"This is just a test."
我正在尝试设置Varnish来处理本地环境中的ESI包含。 我在虚拟机中运行 Varnish ,内容在主机上运行。 我有两个文件“index.html”和“test.html”。它们都存储在apach
我有以下内容,并且想要检索“ FromEmail”不为空的数据 Simple email@gma
欧海,我正在编写一个小型 PHP 应用程序,使用一个单独的 config.php 文件和一个functions.php,其中包含我将在应用程序中使用的所有自定义函数。现在,我真的必须在每个函数中包含
我知道可以将 JavaScript 放在一个特定的 .js 文件中,然后通过执行以下操作将其包含在任何页面中...... 我注意到,对于包含的这些 .js 文件: 它们实际上不必以 .js 结尾 其
我使用 gwt UIBinder 添加了一些项目到我的 ComboBox。 --select one-- Dispute Referral Form Dispute Settlement Clause
我可以将一个 first.c 文件包含到另一个 second.c 中吗? (我正在做一些套接字编程,以将服务器收到的消息存储在链接列表中,因此在第一个程序中,我尝试保留链接列表和第二个程序套接字编程文
我有一个简单的 Spring MVC 数据项目设置,我试图选择 Admin 中尚不存在的用户列表。 table 。这是我的存储库方法 SELECT u FROM User u WHERE u.id N
在 bash 脚本中,使用什么实用程序以及如何删除两个字符串之间的文本,包括字符串。 原文: (ABC blah1)blah 2(def blah 5)blah 7)(DEF blah 8)blah
我有这个 BST 问题,我试图用 Java 解决,但我不知道为什么它不起作用。问题是: 二叉搜索树 (BST) 是一种二叉树,其中每个值节点大于或等于该节点的所有节点中的值左子树并且小于该树中所有节点
我有一个字符串,其中包含“Dollars”和“Cents”符号。我想删除它们。我试过了 string.replaceAll("[\"\\u00A2\" $]", "") 但它不起作用。正确的做法是什么
我在 stories 和 tags 之间有一个多对多的关系,为保存关系而创建的表是 taxonomies。我想搜索所有具有所有给定标签的故事。 到目前为止我使用的查询是这个,当然它对我不起作用,它返回
我是一名优秀的程序员,十分优秀!