1: <?php
2: /**
3: * Magento
4: *
5: * NOTICE OF LICENSE
6: *
7: * This source file is subject to the Open Software License (OSL 3.0)
8: * that is bundled with this package in the file LICENSE.txt.
9: * It is also available through the world-wide-web at this URL:
10: * http://opensource.org/licenses/osl-3.0.php
11: * If you did not receive a copy of the license and are unable to
12: * obtain it through the world-wide-web, please send an email
13: * to license@magentocommerce.com so we can send you a copy immediately.
14: *
15: * DISCLAIMER
16: *
17: * Do not edit or add to this file if you wish to upgrade Magento to newer
18: * versions in the future. If you wish to customize Magento for your
19: * needs please refer to http://www.magentocommerce.com for more information.
20: *
21: * @category Mage
22: * @package Mage_Adminhtml
23: * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24: * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25: */
26:
27: /**
28: * Order information tab
29: *
30: * @category Mage
31: * @package Mage_Adminhtml
32: * @author Magento Core Team <core@magentocommerce.com>
33: */
34: class Mage_Adminhtml_Block_Sales_Order_View_Tab_Info
35: extends Mage_Adminhtml_Block_Sales_Order_Abstract
36: implements Mage_Adminhtml_Block_Widget_Tab_Interface
37: {
38: /**
39: * Retrieve order model instance
40: *
41: * @return Mage_Sales_Model_Order
42: */
43: public function getOrder()
44: {
45: return Mage::registry('current_order');
46: }
47:
48: /**
49: * Retrieve source model instance
50: *
51: * @return Mage_Sales_Model_Order
52: */
53: public function getSource()
54: {
55: return $this->getOrder();
56: }
57:
58: /**
59: * Retrieve order totals block settings
60: *
61: * @return array
62: */
63: public function getOrderTotalData()
64: {
65: return array(
66: 'can_display_total_due' => true,
67: 'can_display_total_paid' => true,
68: 'can_display_total_refunded' => true,
69: );
70: }
71:
72: public function getOrderInfoData()
73: {
74: return array(
75: 'no_use_order_link' => true,
76: );
77: }
78:
79: public function getTrackingHtml()
80: {
81: return $this->getChildHtml('order_tracking');
82: }
83:
84: public function getItemsHtml()
85: {
86: return $this->getChildHtml('order_items');
87: }
88:
89: /**
90: * Retrieve giftmessage block html
91: *
92: * @deprecated after 1.4.2.0, use self::getGiftOptionsHtml() instead
93: * @return string
94: */
95: public function getGiftmessageHtml()
96: {
97: return $this->getChildHtml('order_giftmessage');
98: }
99:
100: /**
101: * Retrieve gift options container block html
102: *
103: * @return string
104: */
105: public function getGiftOptionsHtml()
106: {
107: return $this->getChildHtml('gift_options');
108: }
109:
110: public function getPaymentHtml()
111: {
112: return $this->getChildHtml('order_payment');
113: }
114:
115: public function getViewUrl($orderId)
116: {
117: return $this->getUrl('*/*/*', array('order_id'=>$orderId));
118: }
119:
120: /**
121: * ######################## TAB settings #################################
122: */
123: public function getTabLabel()
124: {
125: return Mage::helper('sales')->__('Information');
126: }
127:
128: public function getTabTitle()
129: {
130: return Mage::helper('sales')->__('Order Information');
131: }
132:
133: public function canShowTab()
134: {
135: return true;
136: }
137:
138: public function isHidden()
139: {
140: return false;
141: }
142: }
143: