trackorder_module - Version 0.1.1

Version Notes

-Enhancements
- Widget Support
- Order tracking link in email

Download this release

Release Info

Developer Biztech
Extension trackorder_module
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

Files changed (35) hide show
  1. app/code/local/Biztech/All/Helper/Data.php +6 -0
  2. app/code/local/Biztech/All/Model/All.php +10 -0
  3. app/code/local/Biztech/All/Model/Mysql4/All.php +10 -0
  4. app/code/local/Biztech/All/Model/Mysql4/All/Collection.php +10 -0
  5. app/code/local/Biztech/All/Model/Source/Updates/Type.php +50 -0
  6. app/code/local/Biztech/All/Model/Status.php +15 -0
  7. app/code/local/Biztech/All/Model/Update.php +86 -0
  8. app/code/local/Biztech/All/etc/config.xml +147 -0
  9. app/code/local/Biztech/All/etc/system.xml +46 -0
  10. app/code/local/Biztech/Trackorder/Block/Trackorder.php +34 -34
  11. app/code/local/Biztech/Trackorder/Block/Trackwidget.php +27 -0
  12. app/code/local/Biztech/Trackorder/Block/View.php +9 -0
  13. app/code/local/Biztech/Trackorder/Helper/Data.php +8 -8
  14. app/code/local/Biztech/Trackorder/Model/Observer.php +107 -0
  15. app/code/local/Biztech/Trackorder/Model/System/Config/Frontend/Widgetsettings.php +15 -0
  16. app/code/local/Biztech/Trackorder/controllers/IndexController.php +107 -80
  17. app/code/local/Biztech/Trackorder/etc/config.xml +80 -37
  18. app/code/local/Biztech/Trackorder/etc/system.xml +88 -42
  19. app/code/local/Biztech/Trackorder/etc/widget.xml +7 -0
  20. app/code/local/Biztech/Trackorder/sql/trackorder_setup/mysql4-install-0.1.0.php +37 -0
  21. app/design/frontend/default/default/layout/trackorder.xml +93 -27
  22. app/design/frontend/default/default/template/trackorder/info.phtml +101 -0
  23. app/design/frontend/default/default/template/trackorder/order/items.phtml +93 -0
  24. app/design/frontend/default/default/template/trackorder/shipment/items.phtml +73 -0
  25. app/design/frontend/default/default/template/trackorder/trackdetail.phtml +172 -170
  26. app/design/frontend/default/default/template/trackorder/trackorder.phtml +82 -76
  27. app/design/frontend/default/default/template/trackorder/trackorderlink.phtml +15 -0
  28. app/design/frontend/default/default/template/trackorder/trackwidget.phtml +15 -0
  29. app/design/frontend/default/default/template/trackorder/view.phtml +60 -0
  30. app/etc/modules/Biztech_All.xml +52 -0
  31. app/etc/modules/Biztech_Trackorder.xml +19 -19
  32. package.xml +53 -13
  33. skin/frontend/default/default/trackorder/css/trackorder.css +13 -8
  34. skin/frontend/default/default/trackorder/images/Thumbs.db +0 -0
  35. skin/frontend/default/default/trackorder/images/i-trackorder.png +0 -0
app/code/local/Biztech/All/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_All_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Biztech/All/Model/All.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_All_Model_All extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('all/all');
9
+ }
10
+ }
app/code/local/Biztech/All/Model/Mysql4/All.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_All_Model_Mysql4_All extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the all_id refers to the key field in your database table.
8
+ $this->_init('all/all', 'all_id');
9
+ }
10
+ }
app/code/local/Biztech/All/Model/Mysql4/All/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_All_Model_Mysql4_All_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('all/all');
9
+ }
10
+ }
app/code/local/Biztech/All/Model/Source/Updates/Type.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
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
+ */
11
+
12
+ class Biztech_All_Model_Source_Updates_Type extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
13
+ {
14
+ const TYPE_UPDATE_RELEASE = 'UPDATE_RELEASE';
15
+ const TYPE_INSTALLED_UPDATE = 'INSTALLED_UPDATE';
16
+ public function toOptionArray()
17
+ {
18
+ return array(
19
+ array('value' => self::TYPE_INSTALLED_UPDATE, 'label' => Mage::helper('all')->__('My extensions updates')),
20
+ array('value' => self::TYPE_UPDATE_RELEASE, 'label' => Mage::helper('all')->__('All extensions updates')),
21
+ );
22
+ }
23
+
24
+ public function getAllOptions()
25
+ {
26
+ return $this->toOptionArray();
27
+ }
28
+
29
+
30
+ public function getLabel($value)
31
+ {
32
+ $options = $this->toOptionArray();
33
+ foreach ($options as $v) {
34
+ if ($v['value'] == $value) {
35
+ return $v['label'];
36
+ }
37
+ }
38
+ return '';
39
+ }
40
+
41
+ public function getGridOptions()
42
+ {
43
+ $items = $this->getAllOptions();
44
+ $out = array();
45
+ foreach ($items as $item) {
46
+ $out[$item['value']] = $item['label'];
47
+ }
48
+ return $out;
49
+ }
50
+ }
app/code/local/Biztech/All/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_All_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('all')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('all')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/local/Biztech/All/Model/Update.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_All_Model_Update extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ const UPDATE_NOTIFICATION_FEED_URL = 'http://store.biztechconsultancy.com/rss/catalog/new/store_id/1/';
7
+ public function getInterests()
8
+ {
9
+ $types = @explode(',', Mage::getStoreConfig('all/all_general/interests'));
10
+ return $types;
11
+ }
12
+ public function isExtensionInstalled($code)
13
+ {
14
+
15
+ $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children());
16
+ foreach ($modules as $moduleName) {
17
+ if ($moduleName == $code) {
18
+ return true;
19
+ }
20
+ }
21
+ return false;
22
+ }
23
+
24
+ public function check()
25
+ {
26
+ if ((time() - Mage::app()->loadCache('biztech_all_updates_feed_lastcheck')) > Mage::getStoreConfig('all/all_general/check_frequency')) {
27
+ $this->refresh();
28
+ }
29
+ }
30
+
31
+ public function refresh()
32
+ {
33
+ $types = array();
34
+ $feedData = array();
35
+ $extensio_module = array();
36
+ try{
37
+ $xml = file_get_contents(self::UPDATE_NOTIFICATION_FEED_URL);
38
+ $xml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);//LIBXML_NOCDATA LIBXML_NOWARNING
39
+
40
+ $interests = $this->getInterests();
41
+ if(!empty($interests[0])){
42
+ $isInterestedInSelfUpgrades = in_array(Biztech_All_Model_Source_Updates_Type::TYPE_INSTALLED_UPDATE, $interests);
43
+ $isInterestedInAllUpgrades = in_array(Biztech_All_Model_Source_Updates_Type::TYPE_UPDATE_RELEASE, $interests);
44
+ $modules = Mage::getConfig()->getNode('modules')->children();
45
+ $modulesArray = (array)$modules;
46
+ foreach($xml->channel->item as $keys=>$extensions) {
47
+ $types[] = (string) $extensions->update_notifications->type;
48
+ $extensions_name = (string)$extensions->update_notifications->extensions;
49
+
50
+ if((string)$extensions->update_notifications->date!=""&&(string)$extensions->update_notifications->extension_title!=""&&(string)$extensions->update_notifications->extension_content!=""&&(string)$extensions->update_notifications->product_url!=""){
51
+ if(!$isInterestedInAllUpgrades){
52
+ if ($this->isExtensionInstalled($extensions_name)) {
53
+ $feedData[] = array(
54
+ 'severity' => 4,
55
+ 'date_added' => (string) $extensions->update_notifications->date,
56
+ 'title' => (string)$extensions->update_notifications->extension_title,
57
+ 'description' => (string)$extensions->update_notifications->extension_content,
58
+ 'url' => (string)$extensions->update_notifications->product_url,
59
+ );
60
+ }
61
+ } else{
62
+ $feedData[] = array(
63
+ 'severity' => 4,
64
+ 'date_added' => (string)$extensions->update_notifications->date,
65
+ 'title' => (string)$extensions->update_notifications->extension_title,
66
+ 'description' => (string)$extensions->update_notifications->extension_content,
67
+ 'url' => (string)$extensions->update_notifications->product_url,
68
+ );
69
+ }
70
+ }
71
+ }
72
+ if ($feedData) {
73
+ foreach($feedData as $data){
74
+ if ((array_intersect($types,$interests) && $isInterestedInSelfUpgrades)) {
75
+ Mage::getModel('adminnotification/inbox')->parse(array_reverse(array($data)));
76
+ }
77
+ }
78
+ }
79
+ Mage::app()->saveCache(time(), 'biztech_all_updates_feed_lastcheck');
80
+ return true;
81
+ }
82
+ }catch (Exception $e) {
83
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
84
+ }
85
+ }
86
+ }
app/code/local/Biztech/All/etc/config.xml ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Biztech
5
+ * @package Biztech_All
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Biztech_All>
13
+ <version>0.1.0</version>
14
+ </Biztech_All>
15
+ </modules>
16
+ <frontend>
17
+ <routers>
18
+ <all>
19
+ <use>standard</use>
20
+ <args>
21
+ <module>Biztech_All</module>
22
+ <frontName>all</frontName>
23
+ </args>
24
+ </all>
25
+ </routers>
26
+ <!--<layout>
27
+ <updates>
28
+ <all>
29
+ <file>all.xml</file>
30
+ </all>
31
+ </updates>
32
+ </layout>-->
33
+ </frontend>
34
+ <admin>
35
+ <routers>
36
+ <all>
37
+ <use>admin</use>
38
+ <args>
39
+ <module>Biztech_All</module>
40
+ <frontName>all</frontName>
41
+ </args>
42
+ </all>
43
+ </routers>
44
+ </admin>
45
+ <adminhtml>
46
+ <!--<menu>
47
+ <all module="all">
48
+ <title>All</title>
49
+ <sort_order>71</sort_order>
50
+ <children>
51
+ <items module="all">
52
+ <title>Manage Items</title>
53
+ <sort_order>0</sort_order>
54
+ <action>all/adminhtml_all</action>
55
+ </items>
56
+ </children>
57
+ </all>
58
+ </menu> -->
59
+ <acl>
60
+ <resources>
61
+ <all>
62
+ <title>Allow Everything</title>
63
+ </all>
64
+ <admin>
65
+ <children>
66
+ <Biztech_All>
67
+ <title>All Module</title>
68
+ <sort_order>10</sort_order>
69
+ </Biztech_All>
70
+ </children>
71
+ </admin>
72
+ </resources>
73
+ </acl>
74
+ <events>
75
+ <controller_action_predispatch>
76
+ <observers>
77
+
78
+ <bzall_upds>
79
+ <type>singleton</type>
80
+ <class>all/update</class>
81
+ <method>check</method>
82
+ </bzall_upds>
83
+ </observers>
84
+ </controller_action_predispatch>
85
+ </events>
86
+ <!--<layout>
87
+ <updates>
88
+ <all>
89
+ <file>all.xml</file>
90
+ </all>
91
+ </updates>
92
+ </layout> -->
93
+ </adminhtml>
94
+ <global>
95
+ <models>
96
+ <all>
97
+ <class>Biztech_All_Model</class>
98
+ <resourceModel>all_mysql4</resourceModel>
99
+ </all>
100
+ <all_mysql4>
101
+ <class>Biztech_All_Model_Mysql4</class>
102
+ <entities>
103
+ <all>
104
+ <table>all</table>
105
+ </all>
106
+ </entities>
107
+ </all_mysql4>
108
+ </models>
109
+ <resources>
110
+ <all_setup>
111
+ <setup>
112
+ <module>Biztech_All</module>
113
+ </setup>
114
+ <connection>
115
+ <use>core_setup</use>
116
+ </connection>
117
+ </all_setup>
118
+ <all_write>
119
+ <connection>
120
+ <use>core_write</use>
121
+ </connection>
122
+ </all_write>
123
+ <all_read>
124
+ <connection>
125
+ <use>core_read</use>
126
+ </connection>
127
+ </all_read>
128
+ </resources>
129
+ <blocks>
130
+ <all>
131
+ <class>Biztech_All_Block</class>
132
+ </all>
133
+ </blocks>
134
+ <helpers>
135
+ <all>
136
+ <class>Biztech_All_Helper</class>
137
+ </all>
138
+ </helpers>
139
+ </global>
140
+ <default>
141
+ <all>
142
+ <all_general>
143
+ <check_frequency>86400</check_frequency>
144
+ </all_general>
145
+ </all>
146
+ </default>
147
+ </config>
app/code/local/Biztech/All/etc/system.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <config>
3
+ <tabs>
4
+ <biztech translate="label" module="all">
5
+ <label>Biztech Extensions</label>
6
+ <sort_order>400</sort_order>
7
+ </biztech>
8
+ </tabs>
9
+ <sections>
10
+ <all translate="label" module="all">
11
+ <label>Info</label>
12
+ <tab>biztech</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>10</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+
20
+ <all_general translate="label">
21
+ <label>General</label>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>10</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <fields>
28
+
29
+ <interests translate="label">
30
+ <label>I'd like to be informed by Biztech about:</label>
31
+ <comment></comment>
32
+ <frontend_type>multiselect</frontend_type>
33
+ <sort_order>100</sort_order>
34
+ <show_in_default>1</show_in_default>
35
+ <show_in_website>1</show_in_website>
36
+ <show_in_store>1</show_in_store>
37
+ <can_be_empty>1</can_be_empty>
38
+ <source_model>all/source_updates_type</source_model>
39
+ </interests>
40
+
41
+ </fields>
42
+ </all_general>
43
+ </groups>
44
+ </all>
45
+ </sections>
46
+ </config>
app/code/local/Biztech/Trackorder/Block/Trackorder.php CHANGED
@@ -1,35 +1,35 @@
1
- <?php
2
- class Biztech_Trackorder_Block_Trackorder extends Mage_Core_Block_Template
3
- {
4
- public function _prepareLayout()
5
- {
6
- return parent::_prepareLayout();
7
- }
8
-
9
- public function getTrackorder()
10
- {
11
- if (!$this->hasData('trackorder')) {
12
- $this->setData('trackorder', Mage::registry('current_order'));
13
- }
14
- return $this->getData('trackorder');
15
-
16
- }
17
- public function getTrackInfo($order)
18
- {
19
- $shipTrack = array();
20
- if ($order) {
21
- $shipments = $order->getShipmentsCollection();
22
- foreach ($shipments as $shipment){
23
- $increment_id = $shipment->getIncrementId();
24
- $tracks = $shipment->getTracksCollection();
25
-
26
- $trackingInfos=array();
27
- foreach ($tracks as $track){
28
- $trackingInfos[] = $track->getNumberDetail();
29
- }
30
- $shipTrack[$increment_id] = $trackingInfos;
31
- }
32
- }
33
- return $shipTrack;
34
- }
35
  }
1
+ <?php
2
+ class Biztech_Trackorder_Block_Trackorder extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getTrackorder()
10
+ {
11
+ if (!$this->hasData('trackorder')) {
12
+ $this->setData('trackorder', Mage::registry('current_order'));
13
+ }
14
+ return $this->getData('trackorder');
15
+
16
+ }
17
+ public function getTrackInfo($order)
18
+ {
19
+ $shipTrack = array();
20
+ if ($order) {
21
+ $shipments = $order->getShipmentsCollection();
22
+ foreach ($shipments as $shipment){
23
+ $increment_id = $shipment->getIncrementId();
24
+ $tracks = $shipment->getTracksCollection();
25
+
26
+ $trackingInfos=array();
27
+ foreach ($tracks as $track){
28
+ $trackingInfos[] = $track->getNumberDetail();
29
+ }
30
+ $shipTrack[$increment_id] = $trackingInfos;
31
+ }
32
+ }
33
+ return $shipTrack;
34
+ }
35
  }
app/code/local/Biztech/Trackorder/Block/Trackwidget.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Trackorder_Block_Trackwidget extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface {
4
+
5
+ /*protected function _toHtml() {
6
+
7
+ if(Mage::getStoreConfig('trackorder/trackorder_general/enabled'))
8
+ {
9
+ $html ='<div class = "block block-subscribe">';
10
+ $html .= '<div class = "block-title">';
11
+ $html .= '<strong><span>Track Order Here</span></strong>';
12
+ $html .= '</div>';
13
+
14
+ $html .= '<div class = "block-content">';
15
+ $html .= '<div class = "form-subscribe-header">';
16
+ $html .= '<label for = "newsletter"><a target="_blank" href="' . Mage::getBaseUrl() . 'trackorder/index"> Track Order</a></label>';
17
+ $html .= '</div></div></div>';
18
+ return $html;
19
+ }
20
+ }
21
+ */
22
+
23
+ public function _prepareLayout()
24
+ {
25
+ return parent::_prepareLayout();
26
+ }
27
+ }
app/code/local/Biztech/Trackorder/Block/View.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Trackorder_Block_View extends Mage_Core_Block_Template {
4
+
5
+ public function _prepareLayout() {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ }
app/code/local/Biztech/Trackorder/Helper/Data.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
-
3
- class Biztech_Trackorder_Helper_Data extends Mage_Core_Helper_Abstract
4
- {
5
- public function getTrackorderUrl()
6
- {
7
- return $this->_getUrl('trackorder/index');
8
- }
9
  }
1
+ <?php
2
+
3
+ class Biztech_Trackorder_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+ public function getTrackorderUrl()
6
+ {
7
+ return $this->_getUrl('trackorder/index');
8
+ }
9
  }
app/code/local/Biztech/Trackorder/Model/Observer.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Trackorder_Model_Observer {
4
+
5
+ private static $_handleTrackLinkCounter = 1;
6
+
7
+ public function checkstatus(Varien_Event_Observer $observer) {
8
+ $params = Mage::app()->getRequest()->getParam('groups');
9
+ $configValue = $params['trackorder_general']['fields']['enabled']['value'];
10
+ if ($configValue == 0) {
11
+ $trackOrderConfig = new Mage_Core_Model_Config();
12
+ $trackOrderConfig->saveConfig('trackorder/trackorder_general/toplinks', "0");
13
+ $trackOrderConfig->saveConfig('trackorder/trackorder_general/topmenu', "0");
14
+ $trackOrderConfig->saveConfig('trackorder/trackorder_general/sendtrack_link', "0");
15
+ }
16
+
17
+ $showWidget = $params['trackorder_general']['fields']['show_widget']['value'];
18
+
19
+
20
+ if(version_compare(Mage::getVersion(), '1.5.1.0', '>')) {
21
+ $widgetInstance = Mage::getModel('widget/widget_instance')->getCollection()->addFieldToFilter('instance_type' , 'trackorder/trackwidget')->getData();
22
+ }
23
+ else
24
+ {
25
+ $widgetInstance = Mage::getModel('widget/widget_instance')->getCollection()->addFieldToFilter('type' , 'trackorder/trackwidget')->getData();
26
+ }
27
+
28
+
29
+ $widgetInstanceID = $widgetInstance[0]['instance_id'];
30
+ $widgetParameters = array(
31
+ 'param1' => 'This is some value from the widget form',
32
+ 'template' => 'trackorder/trackwidget.phtml'
33
+ );
34
+
35
+ $instance = Mage::getModel('widget/widget_instance')->load($widgetInstanceID);
36
+ $instance->setData(array(
37
+ 'instance_id' => $widgetInstanceID,
38
+ 'type' => 'trackorder/trackwidget',
39
+ 'package_theme' => 'default/default',
40
+ 'title' => 'Track Widget',
41
+ 'store_ids' => '0', // or comma separated list of ids
42
+ 'sort_order' => '0',
43
+ 'widget_parameters' => serialize($widgetParameters),
44
+ 'page_groups' => array(array(
45
+ 'page_group' => 'all_pages',
46
+ 'all_pages' => array(
47
+ 'page_id' => null,
48
+ 'group' => 'all_pages',
49
+ 'layout_handle' => 'default',
50
+ 'block' => $showWidget,
51
+ 'for' => 'all',
52
+ 'template' => $widgetParameters['template'],
53
+ )
54
+ ))
55
+ ))->save();
56
+
57
+ }
58
+
59
+ public function addlinkAdmin(Varien_Event_Observer $observer) {
60
+
61
+ if (Mage::app()->getRequest()->getControllerName() == 'sales_order_create' || Mage::app()->getRequest()->getControllerName() == 'sales_order_edit') {
62
+ if (self::$_handleTrackLinkCounter > 1) {
63
+ return $this;
64
+ }
65
+
66
+ $order = $observer->getEvent()->getOrder();
67
+ self::$_handleTrackLinkCounter++;
68
+ if ($order->getTrackLink() == NULL) {
69
+ $trackLink = substr(md5(microtime()), rand(0, 26), 6);
70
+
71
+ $order->setTrackLink($trackLink);
72
+ }
73
+ }
74
+ }
75
+
76
+ public function addlinkFront(Varien_Event_Observer $observer) {
77
+
78
+ if (Mage::app()->getRequest()->getControllerName() == 'onepage') {
79
+ if (self::$_handleTrackLinkCounter > 1) {
80
+ return $this;
81
+ }
82
+
83
+ $order = $observer->getEvent()->getOrder();
84
+ self::$_handleTrackLinkCounter++;
85
+ if ($order->getTrackLink() == NULL) {
86
+ $trackLink = substr(md5(microtime()), rand(0, 26), 6);
87
+ $order->setTrackLink($trackLink);
88
+ }
89
+ }
90
+ }
91
+
92
+
93
+ public function addmultishipLink(Varien_Event_Observer $observer) {
94
+
95
+ if (Mage::app()->getRequest()->getControllerName() == 'multishipping') {
96
+ $order = $observer->getEvent()->getOrder();
97
+
98
+ if ($order->getTrackLink() == NULL) {
99
+ $trackLink = substr(md5(microtime()), rand(0, 26), 6);
100
+ $order->setTrackLink($trackLink);
101
+ }
102
+ }
103
+ }
104
+
105
+ }
106
+
107
+ ?>
app/code/local/Biztech/Trackorder/Model/System/Config/Frontend/Widgetsettings.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Trackorder_Model_System_Config_Frontend_Widgetsettings
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => 'left',
9
+ 'label' => Mage::helper('trackorder')->__('Left Column')),
10
+ array('value' => 'right',
11
+ 'label' => Mage::helper('trackorder')->__('Right Column')),
12
+ );
13
+ }
14
+
15
+ }
app/code/local/Biztech/Trackorder/controllers/IndexController.php CHANGED
@@ -1,80 +1,107 @@
1
- <?php
2
- class Biztech_Trackorder_IndexController extends Mage_Core_Controller_Front_Action
3
- {
4
- public function indexAction()
5
- {
6
- $this->loadLayout();
7
- $this->renderLayout();
8
- }
9
- public function validate(){
10
-
11
- }
12
- public function initOrder(){
13
- if ($data = $this->getRequest()->getPost()) {
14
- $orderId = $data["order_id"];
15
- $email = $data["email"];
16
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
17
- $cEmail = $order->getCustomerEmail();
18
- if($cEmail == trim($email)){
19
- Mage::register('current_order',$order);
20
- } else {
21
- Mage::register('current_order',Mage::getModel("sales/order"));
22
- }
23
-
24
- }
25
- }
26
- public function trackAction()
27
- {
28
- //$orderId = $this->getRequest()->getPost()
29
- $post = $this->getRequest()->getPost();
30
- if ( $post ) {
31
- try {
32
- if (!Zend_Validate::is(trim($post['order_id']) , 'NotEmpty')) {
33
- $error = true;
34
- }
35
- if (!Zend_Validate::is(trim($post['email']), 'NotEmpty')) {
36
- $error = true;
37
- }
38
- if (!Zend_Validate::is(trim($post['email']), 'EmailAddress')) {
39
- $error = true;
40
- }
41
- if ($error) {
42
- throw new Exception();
43
- }
44
- $this->initOrder($post);
45
- $order = Mage::registry('current_order');
46
- if($order->getId()){
47
-
48
- $this->getResponse()->setBody($this->getLayout()->getMessagesBlock()->getGroupedHtml().$this->_getGridHtml());
49
- return;
50
- /*$this->loadLayout();
51
- $this->renderLayout(); */
52
- } else {
53
- Mage::getSingleton('core/session')->addError(Mage::helper('contacts')->__('Order Not Found.Please try again later'));
54
- $this->getResponse()->setBody($this->getLayout()->getMessagesBlock()->getGroupedHtml());
55
- return;
56
- }
57
-
58
-
59
- }catch (Exception $e) {
60
- Mage::getSingleton('core/session')->addError(Mage::helper('trackorder')->__('Please Enter Order Detail.'));
61
- $this->getResponse()->setBody($this->getLayout()->getMessagesBlock()->getGroupedHtml());
62
- return;
63
-
64
- }
65
- } else {
66
- $this->_redirect('*/*/');
67
- }
68
-
69
- }
70
- protected function _getGridHtml()
71
- {
72
- $layout = $this->getLayout();
73
- $update = $layout->getUpdate();
74
- $update->load("trackorder_index_track");
75
- $layout->generateXml();
76
- $layout->generateBlocks();
77
- $output = $layout->getOutput();
78
- return $output;
79
- }
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Trackorder_IndexController extends Mage_Core_Controller_Front_Action {
4
+
5
+ public function indexAction() {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+
10
+ public function validate() {
11
+
12
+ }
13
+
14
+ public function initOrder() {
15
+ if ($data = $this->getRequest()->getPost()) {
16
+ $orderId = $data["order_id"];
17
+ $email = $data["email"];
18
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
19
+ $cEmail = $order->getCustomerEmail();
20
+ if ($cEmail == trim($email)) {
21
+ Mage::register('current_order', $order);
22
+ } else {
23
+ Mage::register('current_order', Mage::getModel("sales/order"));
24
+ }
25
+ }
26
+ }
27
+
28
+ public function trackAction() {
29
+ //$orderId = $this->getRequest()->getPost()
30
+ $post = $this->getRequest()->getPost();
31
+
32
+ if ($post) {
33
+ try {
34
+ if (!Zend_Validate::is(trim($post['order_id']), 'NotEmpty')) {
35
+ $error = true;
36
+ }
37
+ if (!Zend_Validate::is(trim($post['email']), 'NotEmpty')) {
38
+ $error = true;
39
+ }
40
+ if (!Zend_Validate::is(trim($post['email']), 'EmailAddress')) {
41
+ $error = true;
42
+ }
43
+ if ($error) {
44
+ throw new Exception();
45
+ }
46
+ $this->initOrder($post);
47
+ $order = Mage::registry('current_order');
48
+ if ($order->getId()) {
49
+
50
+ $this->getResponse()->setBody($this->getLayout()->getMessagesBlock()->getGroupedHtml() . $this->_getGridHtml());
51
+ return;
52
+ /* $this->loadLayout();
53
+ $this->renderLayout(); */
54
+ } else {
55
+ Mage::getSingleton('core/session')->addError(Mage::helper('contacts')->__('Order Not Found.Please try again later'));
56
+ $this->getResponse()->setBody($this->getLayout()->getMessagesBlock()->getGroupedHtml());
57
+ return;
58
+ }
59
+ } catch (Exception $e) {
60
+ Mage::getSingleton('core/session')->addError(Mage::helper('trackorder')->__('Please Enter Order Detail.'));
61
+ $this->getResponse()->setBody($this->getLayout()->getMessagesBlock()->getGroupedHtml());
62
+ return;
63
+ }
64
+ } else {
65
+ $this->_redirect('*/*/');
66
+ }
67
+ }
68
+
69
+ public function viewAction() {
70
+
71
+
72
+ $actionUrl = $_SERVER['REQUEST_URI'];
73
+ $pathinfo = pathinfo($actionUrl);
74
+ $trackid = $pathinfo['basename'];
75
+
76
+ $orderdata = Mage::getModel('sales/order')->getCollection()
77
+ ->addAttributeToFilter('track_link', $trackid)
78
+ ->getData();
79
+
80
+ $order = Mage::getModel('sales/order')->load($orderdata[0]['entity_id']);
81
+
82
+
83
+
84
+
85
+ if ($order->getId()) {
86
+ Mage::register('current_order', $order);
87
+ $this->loadLayout();
88
+ $this->renderLayout();
89
+ return true;
90
+
91
+ } else {
92
+ Mage::getSingleton('core/session')->addError($this->__('Order not found. Please try again later.'));
93
+ $this->_redirect('*/*/');
94
+ }
95
+ }
96
+
97
+ protected function _getGridHtml() {
98
+ $layout = $this->getLayout();
99
+ $update = $layout->getUpdate();
100
+ $update->load("trackorder_index_track");
101
+ $layout->generateXml();
102
+ $layout->generateBlocks();
103
+ $output = $layout->getOutput();
104
+ return $output;
105
+ }
106
+
107
+ }
app/code/local/Biztech/Trackorder/etc/config.xml CHANGED
@@ -1,16 +1,16 @@
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
- * @category Biztech
5
- * @package Biztech_Trackorder
6
- * @author ModuleCreator
7
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
- */
9
- -->
10
  <config>
11
  <modules>
12
  <Biztech_Trackorder>
13
- <version>0.1.0</version>
14
  </Biztech_Trackorder>
15
  </modules>
16
  <frontend>
@@ -30,31 +30,52 @@
30
  </trackorder>
31
  </updates>
32
  </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  </frontend>
34
  <admin>
35
  <routers>
36
- <trackorder>
37
- <use>admin</use>
38
- <args>
39
- <module>Biztech_Trackorder</module>
40
- <frontName>trackorder</frontName>
41
- </args>
42
- </trackorder>
43
  </routers>
44
  </admin>
45
  <adminhtml>
46
- <acl>
47
- <resources>
48
- <all>
49
- <title>Allow Everything</title>
50
- </all>
51
- <admin>
52
- <children>
53
- <Biztech_Trackorder>
54
- <title>Trackorder Module</title>
55
- <sort_order>10</sort_order>
56
- </Biztech_Trackorder>
57
- <system>
58
  <children>
59
  <config>
60
  <children>
@@ -65,17 +86,37 @@
65
  </config>
66
  </children>
67
  </system>
68
- </children>
69
- </admin>
70
- </resources>
71
- </acl>
72
- <layout>
73
- <updates>
74
- <trackorder>
75
- <file>trackorder.xml</file>
76
- </trackorder>
77
- </updates>
78
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  </adminhtml>
80
  <global>
81
  <models>
@@ -112,6 +153,8 @@
112
  </connection>
113
  </trackorder_read>
114
  </resources>
 
 
115
  <blocks>
116
  <trackorder>
117
  <class>Biztech_Trackorder_Block</class>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * @category Biztech
5
+ * @package Biztech_Trackorder
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
  <config>
11
  <modules>
12
  <Biztech_Trackorder>
13
+ <version>0.1.1</version>
14
  </Biztech_Trackorder>
15
  </modules>
16
  <frontend>
30
  </trackorder>
31
  </updates>
32
  </layout>
33
+ <events>
34
+ <sales_order_save_after>
35
+ <observers>
36
+ <trackorder_link>
37
+ <type>singleton</type>
38
+ <class>trackorder/observer</class>
39
+ <method>addlinkFront</method>
40
+ </trackorder_link>
41
+ </observers>
42
+ </sales_order_save_after>
43
+ <checkout_type_multishipping_create_orders_single>
44
+ <observers>
45
+ <trackorder_multishiplink>
46
+ <type>singleton</type>
47
+ <class>trackorder/observer</class>
48
+ <method>addmultishipLink</method>
49
+ </trackorder_multishiplink>
50
+ </observers>
51
+ </checkout_type_multishipping_create_orders_single>
52
+
53
+ </events>
54
  </frontend>
55
  <admin>
56
  <routers>
57
+ <trackorder>
58
+ <use>admin</use>
59
+ <args>
60
+ <module>Biztech_Trackorder</module>
61
+ <frontName>trackorder</frontName>
62
+ </args>
63
+ </trackorder>
64
  </routers>
65
  </admin>
66
  <adminhtml>
67
+ <acl>
68
+ <resources>
69
+ <all>
70
+ <title>Allow Everything</title>
71
+ </all>
72
+ <admin>
73
+ <children>
74
+ <Biztech_Trackorder>
75
+ <title>Trackorder Module</title>
76
+ <sort_order>10</sort_order>
77
+ </Biztech_Trackorder>
78
+ <system>
79
  <children>
80
  <config>
81
  <children>
86
  </config>
87
  </children>
88
  </system>
89
+ </children>
90
+ </admin>
91
+ </resources>
92
+ </acl>
93
+ <layout>
94
+ <updates>
95
+ <trackorder>
96
+ <file>trackorder.xml</file>
97
+ </trackorder>
98
+ </updates>
99
+ </layout>
100
+ <events>
101
+ <admin_system_config_changed_section_trackorder>
102
+ <observers>
103
+ <trackorder_status>
104
+ <type>model</type>
105
+ <class>trackorder/observer</class>
106
+ <method>checkstatus</method>
107
+ </trackorder_status>
108
+ </observers>
109
+ </admin_system_config_changed_section_trackorder>
110
+ <sales_order_save_after>
111
+ <observers>
112
+ <trackorder_link>
113
+ <type>singleton</type>
114
+ <class>trackorder/observer</class>
115
+ <method>addlinkAdmin</method>
116
+ </trackorder_link>
117
+ </observers>
118
+ </sales_order_save_after>
119
+ </events>
120
  </adminhtml>
121
  <global>
122
  <models>
153
  </connection>
154
  </trackorder_read>
155
  </resources>
156
+
157
+
158
  <blocks>
159
  <trackorder>
160
  <class>Biztech_Trackorder_Block</class>
app/code/local/Biztech/Trackorder/etc/system.xml CHANGED
@@ -1,42 +1,88 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <config>
3
- <tabs>
4
- <biztech translate="label" module="trackorder">
5
- <label>Biztech Extensions</label>
6
- <sort_order>400</sort_order>
7
- </biztech>
8
- </tabs>
9
- <sections>
10
- <trackorder translate="label" module="trackorder">
11
- <label>Track Order</label>
12
- <tab>biztech</tab>
13
- <frontend_type>text</frontend_type>
14
- <sort_order>10</sort_order>
15
- <show_in_default>1</show_in_default>
16
- <show_in_website>1</show_in_website>
17
- <show_in_store>1</show_in_store>
18
- <groups>
19
- <trackorder_general translate="label">
20
- <label>General</label>
21
- <frontend_type>text</frontend_type>
22
- <sort_order>10</sort_order>
23
- <show_in_default>1</show_in_default>
24
- <show_in_website>1</show_in_website>
25
- <show_in_store>1</show_in_store>
26
- <fields>
27
- <enabled translate="label">
28
- <label>Enabled</label>
29
- <frontend_type>select</frontend_type>
30
- <source_model>adminhtml/system_config_source_yesno</source_model>
31
- <sort_order>1</sort_order>
32
- <show_in_default>1</show_in_default>
33
- <show_in_website>1</show_in_website>
34
- <show_in_store>1</show_in_store>
35
- <comment>Select Yes to enable this feature.</comment>
36
- </enabled>
37
- </fields>
38
- </trackorder_general>
39
- </groups>
40
- </trackorder>
41
- </sections>
42
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <config>
3
+ <tabs>
4
+ <biztech translate="label" module="trackorder">
5
+ <label>Biztech Extensions</label>
6
+ <sort_order>400</sort_order>
7
+ </biztech>
8
+ </tabs>
9
+ <sections>
10
+ <trackorder translate="label" module="trackorder">
11
+ <label>Track Order</label>
12
+ <tab>biztech</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>10</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <trackorder_general translate="label">
20
+ <label>General</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>10</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <enabled translate="label">
28
+ <label>Enabled</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>100</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ <comment>Select Yes to enable this feature.</comment>
36
+ </enabled>
37
+ <toplinks translate="label">
38
+ <label>Allowed For Top Links</label>
39
+ <frontend_type>select</frontend_type>
40
+ <source_model>adminhtml/system_config_source_yesno</source_model>
41
+ <sort_order>150</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <comment>Select Yes to allow for Top Links.</comment>
46
+ <depends>
47
+ <enabled>1</enabled>
48
+ </depends>
49
+ </toplinks>
50
+ <topmenu translate="label">
51
+ <label>Allowed For Top Menu</label>
52
+ <frontend_type>select</frontend_type>
53
+ <source_model>adminhtml/system_config_source_yesno</source_model>
54
+ <sort_order>200</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ <comment>Select Yes to allow for Top Menu.</comment>
59
+ <depends>
60
+ <enabled>1</enabled>
61
+ </depends>
62
+ </topmenu>
63
+ <sendtrack_link translate="label">
64
+ <label>Send TrackOrder Link</label>
65
+ <frontend_type>select</frontend_type>
66
+ <source_model>adminhtml/system_config_source_yesno</source_model>
67
+ <sort_order>250</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>1</show_in_store>
71
+ <comment>Select Yes to send track order link in email.</comment>
72
+ </sendtrack_link>
73
+ <show_widget translate="label">
74
+ <label>Show TrackOrder Widget</label>
75
+ <frontend_type>select</frontend_type>
76
+ <source_model>trackorder/system_config_frontend_widgetsettings</source_model>
77
+ <sort_order>250</sort_order>
78
+ <show_in_default>1</show_in_default>
79
+ <show_in_website>1</show_in_website>
80
+ <show_in_store>1</show_in_store>
81
+ <comment>Choose column for widget to appear</comment>
82
+ </show_widget>
83
+ </fields>
84
+ </trackorder_general>
85
+ </groups>
86
+ </trackorder>
87
+ </sections>
88
+ </config>
app/code/local/Biztech/Trackorder/etc/widget.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <widgets>
3
+ <trackorder_trackwidget type="trackorder/trackwidget">
4
+ <name>Track Order</name>
5
+ <description type="desc">Track Order Link</description>
6
+ </trackorder_trackwidget>
7
+ </widgets>
app/code/local/Biztech/Trackorder/sql/trackorder_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->run("ALTER TABLE `{$this->getTable('sales/order')}` ADD `track_link` VARCHAR(255) NOT NULL;");
5
+
6
+
7
+
8
+ $widgetParameters = array(
9
+ 'param1' => 'This is some value from the widget form',
10
+ 'template' => 'trackorder/trackwidget.phtml'
11
+ );
12
+
13
+ $instance = Mage::getModel('widget/widget_instance')->setData(array(
14
+ 'type' => 'trackorder/trackwidget',
15
+ 'package_theme' => 'default/default', // has to match the concrete theme containing the template
16
+ 'title' => 'Track Widget',
17
+ 'store_ids' => '0', // or comma separated list of ids
18
+ 'sort_order' => '0',
19
+ 'widget_parameters' => serialize($widgetParameters),
20
+ 'page_groups' => array(array(
21
+ 'page_group' => 'all_pages',
22
+ 'all_pages' => array(
23
+ 'page_id' => null,
24
+ 'group' => 'all_pages',
25
+ 'layout_handle' => 'default',
26
+ 'block' => 'left',
27
+ 'for' => 'all',
28
+ 'template' => $widgetParameters['template'],
29
+
30
+ )
31
+ ))
32
+ ))->save();
33
+
34
+
35
+
36
+ $installer->endSetup();
37
+ ?>
app/design/frontend/default/default/layout/trackorder.xml CHANGED
@@ -1,27 +1,93 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <default>
4
- <reference name="top.links">
5
- <action method="addLink" translate="label title" module="trackorder" ifconfig="trackorder/trackorder_general/enabled" ><label>Trackorder</label><url helper="trackorder/getTrackorderUrl"/><title>Trackorder</title><prepare/><urlParams/><position>20</position></action>
6
- </reference>
7
- </default>
8
- <trackorder_index_index>
9
- <reference name="head">
10
- <action method="addCss" ><stylesheet>trackorder/css/trackorder.css</stylesheet></action>
11
- </reference>
12
- <reference name="root">
13
- <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
14
- <action method="setHeaderTitle" translate="title" module="trackorder"><title>Track Your Order</title></action>
15
- </reference>
16
- <reference name="content">
17
- <block type="trackorder/trackorder" name="trackorder" template="trackorder/trackorder.phtml" />
18
- </reference>
19
- </trackorder_index_index>
20
- <trackorder_index_track>
21
- <reference name="content">
22
- <block type="trackorder/trackorder" name="root" output="toHtml" template="trackorder/trackdetail.phtml">
23
-
24
- </block>
25
- </reference>
26
- </trackorder_index_track>
27
- </layout>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+
4
+ <default>
5
+ <reference name="head">
6
+ <action method="addCss" >
7
+ <stylesheet>trackorder/css/trackorder.css</stylesheet>
8
+ </action>
9
+ </reference>
10
+ <reference name="top.links">
11
+ <action method="addLink" translate="label title" module="trackorder" ifconfig="trackorder/trackorder_general/toplinks">
12
+ <label>Trackorder</label>
13
+ <url helper="trackorder/getTrackorderUrl"/>
14
+ <title>Trackorder</title>
15
+ <prepare/>
16
+ <urlParams/>
17
+ <position>20</position>
18
+ </action>
19
+ </reference>
20
+ <reference name="top.menu">
21
+ <block type="trackorder/trackorder" template="trackorder/trackorderlink.phtml"/>
22
+ </reference>
23
+
24
+
25
+ </default>
26
+
27
+
28
+ <trackorder_index_index>
29
+
30
+ <reference name="root">
31
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
32
+ <action method="setHeaderTitle" translate="title" module="trackorder"><title>Track Your Order</title></action>
33
+ </reference>
34
+ <reference name="content">
35
+ <block type="trackorder/trackorder" name="trackorder" template="trackorder/trackorder.phtml" />
36
+ </reference>
37
+ </trackorder_index_index>
38
+
39
+ <trackorder_index_track>
40
+ <reference name="content">
41
+ <block type="trackorder/trackorder" name="root" output="toHtml" template="trackorder/trackdetail.phtml">
42
+ </block>
43
+ </reference>
44
+ </trackorder_index_track>
45
+
46
+ <trackorder_index_view>
47
+ <label>Customer My Account Order View</label>
48
+ <reference name="root">
49
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
50
+ </reference>
51
+ <reference name="content">
52
+ <block type="sales/order_info" as="info" name="sales.order.info" template="trackorder/info.phtml">
53
+ <block type="sales/order_info_buttons" as="buttons" name="sales.order.info.buttons" />
54
+ </block>
55
+ <block type="sales/order_view" name="sales.order.view" template="trackorder/view.phtml">
56
+ <block type="sales/order_items" name="order_items" template="sales/order/items.phtml">
57
+ <action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>sales/order/items/renderer/default.phtml</template></action>
58
+ <action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>sales/order/items/renderer/default.phtml</template></action>
59
+ <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
60
+ <action method="setLabelProperties"><value>colspan="4" class="a-right"</value></action>
61
+ <action method="setValueProperties"><value>class="last a-right"</value></action>
62
+ <block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml" />
63
+ </block>
64
+ </block>
65
+ </block>
66
+ </reference>
67
+ <reference name="sales.order.info">
68
+ <action method="addLink" translate="label" module="sales"><name>view</name><path></path><label>Order Information</label></action>
69
+ <action method="addLink" translate="label" module="sales"><name>invoice</name><path>*/*/invoice</path><label>Invoices</label></action>
70
+ <action method="addLink" translate="label" module="sales"><name>shipment</name><path>*/*/shipment</path><label>Shipments</label></action>
71
+ <action method="addLink" translate="label" module="sales"><name>creditmemo</name><path>*/*/creditmemo</path><label>Refunds</label></action>
72
+ </reference>
73
+ </trackorder_index_view>
74
+
75
+
76
+ <sales_email_order_items>
77
+ <reference name="items">
78
+ <action method="setTemplate" ifconfig="trackorder/trackorder_general/enabled">
79
+ <template>trackorder/order/items.phtml</template>
80
+ </action>
81
+ </reference>
82
+ </sales_email_order_items>
83
+
84
+
85
+ <sales_email_order_shipment_items translate="label">
86
+ <reference name="items">
87
+ <action method="setTemplate" ifconfig="trackorder/trackorder_general/enabled">
88
+ <template>trackorder/shipment/items.phtml</template>
89
+ </action>
90
+ </reference>
91
+ </sales_email_order_shipment_items>
92
+
93
+ </layout>
app/design/frontend/default/default/template/trackorder/info.phtml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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 design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php /** @var $this Mage_Sales_Block_Order_Info */ ?>
28
+ <?php $_order = $this->getOrder() ?>
29
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
30
+ <div class="page-title title-buttons">
31
+ <h1><?php echo $this->__('Order #%s - %s', $_order->getRealOrderId(), $_order->getStatusLabel()) ?></h1>
32
+ <?php echo $this->getChildHtml('buttons') ?>
33
+ </div>
34
+ <?php echo $this->getStatusHistoryRssUrl($_order) ?>
35
+ <dl class="order-info">
36
+ <dt><?php echo $this->__('Order Information') ?></dt>
37
+ <!--<dd><?php //echo $this->__('Order Information');?>
38
+ <?php //$_links = $this->getLinks(); ?>
39
+ <ul id="order-info-tabs">
40
+ <?php //foreach ($_links as $_link): ?>
41
+ <?php //if($_link->getUrl()): ?>
42
+ <li><a href="<?php //echo $_link->getUrl() ?>"><?php //echo $_link->getLabel() ?></a></li>
43
+ <?php //else: ?>
44
+ <li class="current"><?php //echo $_link->getLabel() ?></li>
45
+ <?php //endif; ?>
46
+ <?php //endforeach; ?>
47
+ </ul>-->
48
+ <!-- <script type="text/javascript">decorateGeneric($('order-info-tabs').select('LI'),['first','last']);</script>
49
+ </dd>-->
50
+ </dl>
51
+ <p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
52
+ <?php if (!$_order->getIsVirtual()): ?>
53
+ <div class="col2-set order-info-box">
54
+ <div class="col-1">
55
+ <div class="box">
56
+ <div class="box-title">
57
+ <h2><?php echo $this->__('Shipping Address') ?></h2>
58
+ </div>
59
+ <div class="box-content">
60
+ <address><?php echo $_order->getShippingAddress()->format('html') ?></address>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <div class="col-2">
65
+ <div class="box">
66
+ <div class="box-title">
67
+ <h2><?php echo $this->__('Shipping Method') ?></h2>
68
+ </div>
69
+ <div class="box-content">
70
+ <?php if ($_order->getShippingDescription()): ?>
71
+ <?php echo $this->escapeHtml($_order->getShippingDescription()) ?>
72
+ <?php else: ?>
73
+ <p><?php echo $this->helper('sales')->__('No shipping information available'); ?></p>
74
+ <?php endif; ?>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ <?php endif; ?>
80
+ <div class="col2-set order-info-box">
81
+ <div class="col-1">
82
+ <div class="box">
83
+ <div class="box-title">
84
+ <h2><?php echo $this->__('Billing Address') ?></h2>
85
+ </div>
86
+ <div class="box-content">
87
+ <address><?php echo $_order->getBillingAddress()->format('html') ?></address>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ <div class="col-2">
92
+ <div class="box box-payment">
93
+ <div class="box-title">
94
+ <h2><?php echo $this->__('Payment Method') ?></h2>
95
+ </div>
96
+ <div class="box-content">
97
+ <?php echo $this->getPaymentInfoHtml() ?>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </div>
app/design/frontend/default/default/template/trackorder/order/items.phtml ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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 design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_order = $this->getOrder() ?>
28
+ <?php if ($_order): ?>
29
+ <table cellspacing="0" cellpadding="0" border="0" width="650" style="border:1px solid #EAEAEA;">
30
+ <thead>
31
+ <tr>
32
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Item') ?></th>
33
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Sku') ?></th>
34
+ <th align="center" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Qty') ?></th>
35
+ <th align="right" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Subtotal') ?></th>
36
+ </tr>
37
+ </thead>
38
+
39
+ <?php $i=0; foreach ($_order->getAllItems() as $_item): ?>
40
+ <?php if($_item->getParentItem()) continue; else $i++; ?>
41
+ <tbody<?php echo $i%2 ? ' bgcolor="#F6F6F6"' : '' ?>>
42
+ <?php echo $this->getItemHtml($_item) ?>
43
+ </tbody>
44
+ <?php endforeach; ?>
45
+
46
+ <tbody>
47
+ <?php echo $this->getChildHtml('order_totals') ?>
48
+ </tbody>
49
+ </table>
50
+ <?php if ($this->helper('giftmessage/message')->isMessagesAvailable('order', $_order, $_order->getStore()) && $_order->getGiftMessageId()): ?>
51
+ <?php $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId()); ?>
52
+ <?php if ($_giftMessage): ?>
53
+ <br />
54
+ <table cellspacing="0" cellpadding="0" border="0" width="100%" style="border:1px solid #EAEAEA;">
55
+ <thead>
56
+ <tr>
57
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><strong><?php echo $this->__('Gift Message for this Order') ?></strong></th>
58
+ </tr>
59
+ </thead>
60
+
61
+ <tbody>
62
+
63
+ <tr>
64
+ <td colspan="4" align="left" style="padding:3px 9px">
65
+ <strong><?php echo $this->__('From:'); ?></strong> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?>
66
+ <br /><strong><?php echo $this->__('To:'); ?></strong> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?>
67
+ <br /><strong><?php echo $this->__('Message:'); ?></strong><br /> <?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
68
+ </td>
69
+ </tr>
70
+ </tbody>
71
+ </table>
72
+ <?php endif; ?>
73
+ <?php endif; ?>
74
+ <?php if(Mage::getStoreConfig('trackorder/trackorder_general/enabled') && Mage::getStoreConfig('trackorder/trackorder_general/sendtrack_link') && ($_order->getTrackLink() != NULL)) { ?>
75
+ <br />
76
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
77
+ <thead>
78
+ <tr>
79
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Track Your Order') ?></th>
80
+ </tr>
81
+ </thead>
82
+ <tbody>
83
+ <tr>
84
+ <td style="font-size: 12px; padding: 7px 9px 9px 9px; border-left: 1px solid #EAEAEA;
85
+ border-bottom: 1px solid #EAEAEA; border-right: 1px solid #EAEAEA;">
86
+ <?php echo $this->__('Track Your Order ');?>
87
+ <a style="text-decoration: none;" href="<?php echo Mage::getBaseUrl().'trackorder/index/view/'.$_order->getTrackLink();?>"> <?php echo $this->__('Here');?></a>
88
+ </td>
89
+ </tr>
90
+ </tbody>
91
+ </table>
92
+ <?php } ?>
93
+ <?php endif; ?>
app/design/frontend/default/default/template/trackorder/shipment/items.phtml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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 design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+
29
+
30
+ <?php $_shipment = $this->getShipment() ?>
31
+ <?php $_order = $this->getOrder() ?>
32
+ <?php if ($_shipment && $_order): ?>
33
+ <table cellspacing="0" cellpadding="0" border="0" width="650" style="border:1px solid #EAEAEA;">
34
+ <thead>
35
+ <tr>
36
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Item') ?></th>
37
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Sku') ?></th>
38
+ <th align="center" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Qty') ?></th>
39
+ </tr>
40
+ </thead>
41
+
42
+ <?php $i=0; foreach ($_shipment->getAllItems() as $_item): ?>
43
+ <?php if($_item->getOrderItem()->getParentItem()) continue; else $i++; ?>
44
+ <tbody<?php echo $i%2 ? ' bgcolor="#F6F6F6"' : '' ?>>
45
+ <?php echo $this->getItemHtml($_item) ?>
46
+ </tbody>
47
+ <?php endforeach; ?>
48
+ </table>
49
+
50
+ <?php if(Mage::getStoreConfig('trackorder/trackorder_general/enabled') && Mage::getStoreConfig('trackorder/trackorder_general/sendtrack_link') && ($_order->getTrackLink() != NULL)) { ?>
51
+
52
+ <table cellspacing="0" cellpadding="0" border="0" width="650">
53
+ <thead>
54
+ <tr>
55
+ <th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Track Your Order') ?></th>
56
+ </tr>
57
+ </thead>
58
+ <tbody bgcolor="#F6F6F6">
59
+ <tr>
60
+ <td style="font-size: 12px; padding: 7px 9px 9px 9px; border-left: 1px solid #EAEAEA;
61
+ border-bottom: 1px solid #EAEAEA; border-right: 1px solid #EAEAEA;">
62
+ <?php echo $this->__('Track Your Order ');?>
63
+ <a style="text-decoration: none;" href="<?php echo Mage::getBaseUrl().'trackorder/index/view/'.$_order->getTrackLink();?>"> <?php echo $this->__('Here');?></a>
64
+ </td>
65
+ </tr>
66
+ </tbody>
67
+ </table>
68
+ <?php } ?>
69
+
70
+ <?php endif; ?>
71
+
72
+
73
+
app/design/frontend/default/default/template/trackorder/trackdetail.phtml CHANGED
@@ -1,170 +1,172 @@
1
- <?php
2
- $order = $this->getTrackOrder();
3
- $shipTrack = array();
4
- if ($order) {
5
- $shipments = $order->getShipmentsCollection();
6
- foreach ($shipments as $shipment){
7
- $increment_id = $shipment->getIncrementId();
8
- $tracks = $shipment->getTracksCollection();
9
-
10
- $trackingInfos=array();
11
- foreach ($tracks as $track){
12
- $trackingInfos[] = $track->getNumberDetail();
13
- }
14
- $shipTrack[$increment_id] = $trackingInfos;
15
- }
16
- }
17
- ?>
18
- <?php $_results = $shipTrack; ?>
19
- <div class="page-title title-buttons">
20
- <h1><?php echo $this->__('Tracking Information'); ?></h1>
21
- </div>
22
-
23
- <p><?php echo $this->__("Your Order Status is :")?> <strong><?php echo $order->getStatusLabel() ?></strong></p>
24
-
25
- <?php if(sizeof($_results)>0): ?>
26
- <?php foreach($_results as $shipid => $_result): ?>
27
- <?php if($shipid): ?>
28
- <h4><?php echo $this->__('Shipment #').$shipid; ?></h4>
29
- <?php endif; ?>
30
- <?php if(sizeof($_result)>0): ?>
31
- <?php $rowCount = sizeof($_result); $counter = 1; ?>
32
- <?php foreach($_result as $track): ?>
33
- <table class="data-table track-data-table">
34
- <col width="15%" />
35
- <col />
36
- <tbody>
37
- <?php if(is_object($track)): ?>
38
- <tr>
39
- <th><?php echo $this->__('Tracking Number:'); ?></th>
40
- <td><?php echo $track->getTracking(); ?></td>
41
- </tr>
42
- <?php if ($track->getCarrierTitle()): ?>
43
- <tr>
44
- <th><?php echo $this->__('Carrier:'); ?></th>
45
- <td><?php echo $track->getCarrierTitle(); ?></td>
46
- </tr>
47
- <?php endif; ?>
48
- <?php if($track->getErrorMessage()): ?>
49
- <tr>
50
- <th><?php echo $this->__('Error:'); ?></th>
51
- <td class="error"><?php if ((bool) Mage::getStoreConfig('contacts/contacts/enabled')) : ?><a href="<?php echo $this->getUrl('contacts') ?>" onclick="this.target='_blank'"><?php echo $this->__('Click here') ?></a><?php echo $this->__(' to get details or '); endif; echo $this->__('email us at '); ?><a href="mailto:<?php echo Mage::getStoreConfig('trans_email/ident_support/email'); ?>"><?php echo Mage::getStoreConfig('trans_email/ident_support/email') ?></a>
52
-
53
- </td>
54
- </tr>
55
- <?php elseif($track->getTrackSummary()): ?>
56
- <tr>
57
- <th><?php echo $this->__('Info:'); ?></th>
58
- <td><?php echo $track->getTrackSummary(); ?></td>
59
- </tr>
60
- <?php elseif($track->getUrl()): ?>
61
- <tr>
62
- <th><?php echo $this->__('Track:'); ?></th>
63
- <td><a href="<?php echo $track->getUrl(); ?>" onclick="this.target='_blank'"><?php echo $this->__('Click here to get details'); ?></a></td>
64
- </tr>
65
- <?php else: ?>
66
- <?php if ($track->getStatus()): ?>
67
- <tr>
68
- <th><?php echo $this->__('Status:'); ?></th>
69
- <td><?php echo $track->getStatus(); ?></td>
70
- </tr>
71
- <?php endif; ?>
72
-
73
- <?php if ($track->getDeliverydate()): ?>
74
- <tr>
75
- <th><?php echo $this->__('Delivered on:'); ?></th>
76
- <td><?php echo $this->formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?></td>
77
- </tr>
78
- <?php endif; ?>
79
-
80
- <?php if ($track->getSignedby()): ?>
81
- <tr>
82
- <th><?php echo $this->__('Signed by:'); ?></th>
83
- <td><?php echo $track->getSignedby(); ?></td>
84
- </tr>
85
- <?php endif; ?>
86
-
87
- <?php if ($track->getDeliveryLocation()): ?>
88
- <tr>
89
- <th><?php echo $this->__('Delivered to:'); ?></th>
90
- <td><?php echo $track->getDeliveryLocation(); ?></td>
91
- </tr>
92
- <?php endif; ?>
93
-
94
- <?php if ($track->getShippedDate()): ?>
95
- <tr>
96
- <th><?php echo $this->__('Shipped or billed on:'); ?></th>
97
- <td><?php echo $track->getShippedDate(); ?></td>
98
- </tr>
99
- <?php endif; ?>
100
-
101
- <?php if ($track->getService()): ?>
102
- <tr>
103
- <th><?php echo $this->__('Service Type:'); ?></th>
104
- <td><?php echo $track->getService(); ?></td>
105
- </tr>
106
- <?php endif; ?>
107
-
108
- <?php if ($track->getWeight()): ?>
109
- <tr>
110
- <th><?php echo $this->__('Weight:'); ?></th>
111
- <td><?php echo $track->getWeight(); ?></td>
112
- </tr>
113
- <?php endif; ?>
114
-
115
- <?php endif; ?>
116
- <?php elseif(isset($track['title']) && isset($track['number']) && $track['number']): ?>
117
- <!--if the tracking is custom value-->
118
- <tr>
119
- <th><?php echo ($track['title'] ? $this->escapeHtml($track['title']) : $this->__('N/A')); ?>:</th>
120
- <td><?php echo (isset($track['number']) ? $this->escapeHtml($track['number']) : ''); ?></td>
121
- </tr>
122
- <?php endif; ?>
123
- </tbody>
124
- </table>
125
-
126
- <?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?>
127
- <table class="data-table" id="track-history-table-<?php echo $track->getTracking(); ?>">
128
- <col />
129
- <col width="1" />
130
- <col width="1" />
131
- <col />
132
- <thead>
133
- <tr>
134
- <th><?php echo $this->__('Location') ?></th>
135
- <th><?php echo $this->__('Date') ?></th>
136
- <th><?php echo $this->__('Local Time') ?></th>
137
- <th><?php echo $this->__('Description') ?></th>
138
- </tr>
139
- </thead>
140
- <tbody>
141
- <?php foreach($track->getProgressdetail() as $_detail): ?>
142
- <?php $_detailDate = (isset($_detail['deliverydate']) ? $this->formatDeliveryDate($_detail['deliverydate']) : '') ?>
143
- <?php $_detailTime = (isset($_detail['deliverytime']) ? $this->formatDeliveryTime($_detail['deliverytime'], $_detailDate) : '') ?>
144
- <tr>
145
- <td><?php echo (isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td>
146
- <td><?php echo $_detailDate ?></td>
147
- <td><?php echo $_detailTime ?></td>
148
- <td><?php echo (isset($_detail['activity']) ? $_detail['activity'] : '') ?></td>
149
- </tr>
150
- <?php endforeach; ?>
151
- </tbody>
152
- </table>
153
-
154
- <script type="text/javascript">decorateTable('track-history-table-<?php echo $track->getTracking(); ?>');</script>
155
- <?php endif; ?>
156
- <?php if($counter!=$rowCount): ?>
157
- <?php endif; ?>
158
- <?php $counter++; ?>
159
-
160
- <?php endforeach; ?>
161
- <!--end for each tracking information-->
162
- <?php else: ?>
163
- <p><?php echo $this->__('There is no tracking available for this shipment.'); ?></p>
164
- <?php endif; ?>
165
-
166
- <?php endforeach; ?>
167
- <?php else: ?>
168
- <div><?php echo $this->__('There is no tracking available.'); ?></div>
169
- <?php endif; ?>
170
-
 
 
1
+ <?php
2
+ $order = $this->getTrackOrder();
3
+ $shipTrack = array();
4
+ if ($order) {
5
+ $shipments = $order->getShipmentsCollection();
6
+ foreach ($shipments as $shipment){
7
+ $increment_id = $shipment->getIncrementId();
8
+ $tracks = $shipment->getTracksCollection();
9
+
10
+ $trackingInfos=array();
11
+ foreach ($tracks as $track){
12
+ $trackingInfos[] = $track->getNumberDetail();
13
+ }
14
+ $shipTrack[$increment_id] = $trackingInfos;
15
+ }
16
+ }
17
+ ?>
18
+ <?php $_results = $shipTrack; ?>
19
+ <div class="page-title title-buttons">
20
+ <h1><?php echo $this->__('Tracking Information'); ?></h1>
21
+ </div>
22
+
23
+ <p><?php echo $this->__("Your Order Status is :")?> <strong><?php echo $order->getStatusLabel() ?></strong></p>
24
+ <p><?php echo $this->__("Click")?> <a target="_blank" href="<?php echo Mage::getBaseUrl().'trackorder/index/view/'.$order->getTrackLink();?>"><strong><?php echo $this->__(' here');?></strong></a><?php echo $this->__(" to view your Order Detail.");?></p>
25
+
26
+
27
+ <?php if(sizeof($_results)>0): ?>
28
+ <?php foreach($_results as $shipid => $_result): ?>
29
+ <?php if($shipid): ?>
30
+ <h4><?php echo $this->__('Shipment #').$shipid; ?></h4>
31
+ <?php endif; ?>
32
+ <?php if(sizeof($_result)>0): ?>
33
+ <?php $rowCount = sizeof($_result); $counter = 1; ?>
34
+ <?php foreach($_result as $track): ?>
35
+ <table class="data-table track-data-table">
36
+ <col width="15%" />
37
+ <col />
38
+ <tbody>
39
+ <?php if(is_object($track)): ?>
40
+ <tr>
41
+ <th><?php echo $this->__('Tracking Number:'); ?></th>
42
+ <td><?php echo $track->getTracking(); ?></td>
43
+ </tr>
44
+ <?php if ($track->getCarrierTitle()): ?>
45
+ <tr>
46
+ <th><?php echo $this->__('Carrier:'); ?></th>
47
+ <td><?php echo $track->getCarrierTitle(); ?></td>
48
+ </tr>
49
+ <?php endif; ?>
50
+ <?php if($track->getErrorMessage()): ?>
51
+ <tr>
52
+ <th><?php echo $this->__('Error:'); ?></th>
53
+ <td class="error"><?php if ((bool) Mage::getStoreConfig('contacts/contacts/enabled')) : ?><a href="<?php echo $this->getUrl('contacts') ?>" onclick="this.target='_blank'"><?php echo $this->__('Click here') ?></a><?php echo $this->__(' to get details or '); endif; echo $this->__('email us at '); ?><a href="mailto:<?php echo Mage::getStoreConfig('trans_email/ident_support/email'); ?>"><?php echo Mage::getStoreConfig('trans_email/ident_support/email') ?></a>
54
+
55
+ </td>
56
+ </tr>
57
+ <?php elseif($track->getTrackSummary()): ?>
58
+ <tr>
59
+ <th><?php echo $this->__('Info:'); ?></th>
60
+ <td><?php echo $track->getTrackSummary(); ?></td>
61
+ </tr>
62
+ <?php elseif($track->getUrl()): ?>
63
+ <tr>
64
+ <th><?php echo $this->__('Track:'); ?></th>
65
+ <td><a href="<?php echo $track->getUrl(); ?>" onclick="this.target='_blank'"><?php echo $this->__('Click here to get details'); ?></a></td>
66
+ </tr>
67
+ <?php else: ?>
68
+ <?php if ($track->getStatus()): ?>
69
+ <tr>
70
+ <th><?php echo $this->__('Status:'); ?></th>
71
+ <td><?php echo $track->getStatus(); ?></td>
72
+ </tr>
73
+ <?php endif; ?>
74
+
75
+ <?php if ($track->getDeliverydate()): ?>
76
+ <tr>
77
+ <th><?php echo $this->__('Delivered on:'); ?></th>
78
+ <td><?php echo $this->formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?></td>
79
+ </tr>
80
+ <?php endif; ?>
81
+
82
+ <?php if ($track->getSignedby()): ?>
83
+ <tr>
84
+ <th><?php echo $this->__('Signed by:'); ?></th>
85
+ <td><?php echo $track->getSignedby(); ?></td>
86
+ </tr>
87
+ <?php endif; ?>
88
+
89
+ <?php if ($track->getDeliveryLocation()): ?>
90
+ <tr>
91
+ <th><?php echo $this->__('Delivered to:'); ?></th>
92
+ <td><?php echo $track->getDeliveryLocation(); ?></td>
93
+ </tr>
94
+ <?php endif; ?>
95
+
96
+ <?php if ($track->getShippedDate()): ?>
97
+ <tr>
98
+ <th><?php echo $this->__('Shipped or billed on:'); ?></th>
99
+ <td><?php echo $track->getShippedDate(); ?></td>
100
+ </tr>
101
+ <?php endif; ?>
102
+
103
+ <?php if ($track->getService()): ?>
104
+ <tr>
105
+ <th><?php echo $this->__('Service Type:'); ?></th>
106
+ <td><?php echo $track->getService(); ?></td>
107
+ </tr>
108
+ <?php endif; ?>
109
+
110
+ <?php if ($track->getWeight()): ?>
111
+ <tr>
112
+ <th><?php echo $this->__('Weight:'); ?></th>
113
+ <td><?php echo $track->getWeight(); ?></td>
114
+ </tr>
115
+ <?php endif; ?>
116
+
117
+ <?php endif; ?>
118
+ <?php elseif(isset($track['title']) && isset($track['number']) && $track['number']): ?>
119
+ <!--if the tracking is custom value-->
120
+ <tr>
121
+ <th><?php echo ($track['title'] ? $this->escapeHtml($track['title']) : $this->__('N/A')); ?>:</th>
122
+ <td><?php echo (isset($track['number']) ? $this->escapeHtml($track['number']) : ''); ?></td>
123
+ </tr>
124
+ <?php endif; ?>
125
+ </tbody>
126
+ </table>
127
+
128
+ <?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?>
129
+ <table class="data-table" id="track-history-table-<?php echo $track->getTracking(); ?>">
130
+ <col />
131
+ <col width="1" />
132
+ <col width="1" />
133
+ <col />
134
+ <thead>
135
+ <tr>
136
+ <th><?php echo $this->__('Location') ?></th>
137
+ <th><?php echo $this->__('Date') ?></th>
138
+ <th><?php echo $this->__('Local Time') ?></th>
139
+ <th><?php echo $this->__('Description') ?></th>
140
+ </tr>
141
+ </thead>
142
+ <tbody>
143
+ <?php foreach($track->getProgressdetail() as $_detail): ?>
144
+ <?php $_detailDate = (isset($_detail['deliverydate']) ? $this->formatDeliveryDate($_detail['deliverydate']) : '') ?>
145
+ <?php $_detailTime = (isset($_detail['deliverytime']) ? $this->formatDeliveryTime($_detail['deliverytime'], $_detailDate) : '') ?>
146
+ <tr>
147
+ <td><?php echo (isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td>
148
+ <td><?php echo $_detailDate ?></td>
149
+ <td><?php echo $_detailTime ?></td>
150
+ <td><?php echo (isset($_detail['activity']) ? $_detail['activity'] : '') ?></td>
151
+ </tr>
152
+ <?php endforeach; ?>
153
+ </tbody>
154
+ </table>
155
+
156
+ <script type="text/javascript">decorateTable('track-history-table-<?php echo $track->getTracking(); ?>');</script>
157
+ <?php endif; ?>
158
+ <?php if($counter!=$rowCount): ?>
159
+ <?php endif; ?>
160
+ <?php $counter++; ?>
161
+
162
+ <?php endforeach; ?>
163
+ <!--end for each tracking information-->
164
+ <?php else: ?>
165
+ <p><?php echo $this->__('There is no tracking available for this shipment.'); ?></p>
166
+ <?php endif; ?>
167
+
168
+ <?php endforeach; ?>
169
+ <?php else: ?>
170
+ <div><?php echo $this->__('There is no tracking available.'); ?></div>
171
+ <?php endif; ?>
172
+
app/design/frontend/default/default/template/trackorder/trackorder.phtml CHANGED
@@ -1,76 +1,82 @@
1
- <?php
2
- if(Mage::getStoreConfig('trackorder/trackorder_general/enabled')):
3
- ?>
4
- <div class="page-title"><h1><?php echo $this->__('Track Your Order ') ?></h1></div>
5
- <div class="form-list">
6
- <form name="track_order" id="track_order" action="" method="post" onsubmit="sendAjax('track_order','<?php echo Mage::getUrl('*/*/track');?>'); return false;">
7
- <ul class="form-list">
8
- <li>
9
- <label for="order_id" class="required"><em>*</em><?php echo $this->__('Order Id') ?></label>
10
- <div class="input-box">
11
- <input type="text" name="order_id" id="order_id" value="" title="" class="input-text required-entry" />
12
- </div>
13
- </li>
14
- <li>
15
- <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
16
- <div class="input-box" >
17
- <input type="text" name="email" id="email_address" value="" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
18
- </div>
19
- </li>
20
- </ul>
21
- <div class="buttons-set">
22
- <button type="submit" class="button" title="<?php echo $this->__('Track Order') ?>" name="track" id="track"><span><span><?php echo $this->__('Track Order') ?></span></span></button>
23
- </div>
24
-
25
- </form>
26
- <div id="loading-details" class="loading-details" style="display:none">
27
- <div id="loading-mask" >
28
- <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('trackorder/images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('adminhtml')->__('Loading...') ?>"/><br/><?php echo $this->__('Please wait...') ?></p>
29
- </div>
30
- </div>
31
- </div>
32
-
33
-
34
-
35
- <div id="oderinfo" class="order-info-message"></div>
36
-
37
-
38
-
39
- <script type="text/javascript">
40
- var validateForm = new VarienForm('track_order', true);
41
- </script>
42
- <script type="text/javascript">
43
-
44
- function sendAjax(frmId,url){
45
- if (!validateForm.validator.validate()) {
46
- return;
47
- }
48
- var data = $(frmId).serialize(this);
49
- $("loading-details").show();
50
- new Ajax.Updater(
51
- {
52
- success:"oderinfo"
53
- },
54
- url,
55
- {
56
- asynchronous:true,
57
- evalScripts:false,
58
- onComplete:function(request, json){
59
- $("loading-details").hide();
60
- return false;
61
- },
62
- onLoading:function(request, json){},
63
- parameters:data
64
- }
65
- );
66
- return false;
67
- }
68
-
69
- </script>
70
- <?php else: ?>
71
- <?php
72
- $url = Mage::getBaseUrl();
73
- Mage::app()->getFrontController()->getResponse()->setRedirect($url);
74
- ?>
75
- <?php endif; ?>
76
-
 
 
 
 
 
 
1
+ <?php
2
+ if(Mage::getStoreConfig('trackorder/trackorder_general/enabled')):
3
+ ?>
4
+ <div class="page-title"><h1><?php echo $this->__('Track Your Order ') ?></h1></div>
5
+ <div class="form-list">
6
+ <form name="track_order" id="track_order" action="" method="post" onsubmit="sendAjax('track_order','<?php echo Mage::getUrl('*/*/track');?>'); return false;">
7
+ <!--<form name="track_order" method="post" id="track_order" action="<?php echo Mage::getUrl('*/*/view');?>">-->
8
+ <ul class="form-list">
9
+ <li>
10
+ <label for="order_id" class="required"><em>*</em><?php echo $this->__('Order Id') ?></label>
11
+ <div class="input-box">
12
+ <input type="text" name="order_id" id="order_id" value="" title="" class="input-text required-entry" />
13
+ </div>
14
+ </li>
15
+ <li>
16
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
17
+ <div class="input-box" >
18
+ <input type="text" name="email" id="email_address" value="" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
19
+ </div>
20
+ </li>
21
+ </ul>
22
+ <div class="buttons-set">
23
+ <button type="submit" class="button" title="<?php echo $this->__('Track Order') ?>" name="track" id="track">
24
+ <span><span><?php echo $this->__('Track Order') ?></span></span>
25
+ </button>
26
+ </div>
27
+
28
+ </form>
29
+ <div id="loading-details" class="loading-details" style="display:none">
30
+ <div id="loading-mask" >
31
+ <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('trackorder/images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('adminhtml')->__('Loading...') ?>"/><br/><?php echo $this->__('Please wait...') ?></p>
32
+ </div>
33
+ </div>
34
+ </div>
35
+
36
+
37
+
38
+ <div id="oderinfo" class="order-info-message"></div>
39
+
40
+
41
+
42
+ <script type="text/javascript">
43
+ var validateForm = new VarienForm('track_order', true);
44
+ </script>
45
+ <script type="text/javascript">
46
+
47
+ function sendAjax(frmId,url){
48
+ if (!validateForm.validator.validate()) {
49
+ return;
50
+ }
51
+ var data = $(frmId).serialize(this);
52
+ $("loading-details").show();
53
+
54
+
55
+ new Ajax.Updater(
56
+ {
57
+ success:"oderinfo"
58
+ },
59
+
60
+ url,
61
+ {
62
+ asynchronous:true,
63
+ evalScripts:false,
64
+ onComplete:function(request, json){
65
+ $("loading-details").hide();
66
+ return false;
67
+ },
68
+ onLoading:function(request, json){},
69
+ parameters:data
70
+ }
71
+ );
72
+ return false;
73
+ }
74
+
75
+ </script>
76
+ <?php else: ?>
77
+ <?php
78
+ $url = Mage::getBaseUrl();
79
+ Mage::app()->getFrontController()->getResponse()->setRedirect($url);
80
+ ?>
81
+ <?php endif; ?>
82
+
app/design/frontend/default/default/template/trackorder/trackorderlink.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php if (Mage::getStoreConfig('trackorder/trackorder_general/enabled') && Mage::getStoreConfig('trackorder/trackorder_general/topmenu')) { ?>
3
+ <div id="trackorder_container" style="display: none">
4
+ <li class="level0 nav-3 last level-top">
5
+ <a href="<?php echo $this->getUrl('trackorder') ?>">
6
+ <span><?php echo $this->__('TrackOrder') ?></span></a>
7
+ </li>
8
+ </div>
9
+ <script type="text/javascript">
10
+ var menu = $('nav');
11
+ if (menu) {
12
+ menu.insert($('trackorder_container').innerHTML);
13
+ }
14
+ </script>
15
+ <?php } ?>
app/design/frontend/default/default/template/trackorder/trackwidget.phtml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (Mage::getStoreConfig('trackorder/trackorder_general/enabled')) { ?>
2
+
3
+ <div class = "block block-trackorder">
4
+ <div class = "block-title">
5
+ <strong><span>Track Order Here</span></strong>
6
+ </div>
7
+ <div class = "block-content">
8
+
9
+ <label for = "widget"><a target="_blank" href="<?php echo Mage::getBaseUrl() . 'trackorder/index'; ?>"> Track Order</a></label>
10
+
11
+ </div>
12
+ </div>
13
+
14
+
15
+ <?php } ?>
app/design/frontend/default/default/template/trackorder/view.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="order-items order-details">
2
+ <?php if ($this->helper('giftmessage/message')->getIsMessagesAvailable('items', $this->getOrder())): ?>
3
+ <script type="text/javascript">
4
+ //<![CDATA[
5
+ function giftMessageToogle(giftMessageIdentifier)
6
+ {
7
+ var link = $('order-item-gift-message-link-'+giftMessageIdentifier);
8
+ var container = $('order-item-gift-message-'+giftMessageIdentifier);
9
+ var row = $('order-item-row-'+giftMessageIdentifier);
10
+ if(link.expanded) {
11
+ link.expanded = false;
12
+ link.removeClassName('expanded');
13
+ if(container.hasClassName('last')) {
14
+ row.addClassName('last');
15
+ }
16
+ container.hide();
17
+ } else {
18
+ link.expanded = true;
19
+ link.addClassName('expanded');
20
+ if(container.hasClassName('last')) {
21
+ row.removeClassName('last');
22
+ }
23
+ container.show();
24
+ }
25
+
26
+ return false;
27
+ }
28
+ //]]>
29
+ </script>
30
+ <?php endif; ?>
31
+ <?php $_order = $this->getOrder() ?>
32
+ <h2 class="table-caption"><?php echo $this->__('Items Ordered') ?>
33
+ </h2>
34
+
35
+ <?php echo $this->getChildHtml('order_items') ?>
36
+
37
+ <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order', $_order) && $_order->getGiftMessageId()): ?>
38
+ <div class="order-additional order-gift-message">
39
+ <h2 class="sub-title"><?php echo $this->__('Gift Message for This Order') ?></h2>
40
+ <?php $_giftMessage=$this->helper('giftmessage/message')->getGiftMessageForEntity($_order); ?>
41
+ <dl class="gift-message">
42
+ <dt><strong><?php echo $this->__('From:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?></dt>
43
+ <dt><strong><?php echo $this->__('To:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?></dt>
44
+ <dd><?php echo $this->helper('giftmessage/message')->getEscapedGiftMessage($_order) ?></dd>
45
+ </dl>
46
+ </div>
47
+ <?php endif; ?>
48
+ <?php $_history = $this->getOrder()->getVisibleStatusHistory() ?>
49
+ <?php if (count($_history)): ?>
50
+ <div class="order-additional order-comments">
51
+ <h2 class="sub-title"><?php echo $this->__('About Your Order') ?></h2>
52
+ <dl class="order-about">
53
+ <?php foreach ($_history as $_historyItem): ?>
54
+ <dt><?php echo $this->formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?></dt>
55
+ <dd><?php echo $this->escapeHtml($_historyItem->getComment()) ?></dd>
56
+ <?php endforeach; ?>
57
+ </dl>
58
+ </div>
59
+ <?php endif; ?>
60
+ </div>
app/etc/modules/Biztech_All.xml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Biztech
5
+ * @package Biztech_All
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Biztech_All>
13
+ <active>true</active>
14
+ <codePool>local</codePool>
15
+ </Biztech_All>
16
+ </modules>
17
+ <adminhtml>
18
+ <acl>
19
+ <resources>
20
+ <all>
21
+ <title>Allow Everything</title>
22
+ </all>
23
+ <admin>
24
+ <children>
25
+ <Biztech_All>
26
+ <title>All</title>
27
+ <sort_order>10</sort_order>
28
+ </Biztech_All>
29
+ <system>
30
+ <children>
31
+ <config>
32
+ <children>
33
+ <all>
34
+ <title>All</title>
35
+ </all>
36
+ </children>
37
+ </config>
38
+ </children>
39
+ </system>
40
+ </children>
41
+ </admin>
42
+ </resources>
43
+ </acl>
44
+ <layout>
45
+ <updates>
46
+ <all>
47
+ <file>all.xml</file>
48
+ </all>
49
+ </updates>
50
+ </layout>
51
+ </adminhtml>
52
+ </config>
app/etc/modules/Biztech_Trackorder.xml CHANGED
@@ -1,20 +1,20 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * @category Biztech
5
- * @package Biztech_Trackorder
6
- * @author ModuleCreator
7
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
- */
9
- -->
10
- <config>
11
- <modules>
12
- <Biztech_Trackorder>
13
- <active>true</active>
14
- <codePool>local</codePool>
15
- <depends>
16
- <Mage_Sales/>
17
- </depends>
18
- </Biztech_Trackorder>
19
- </modules>
20
  </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Biztech
5
+ * @package Biztech_Trackorder
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Biztech_Trackorder>
13
+ <active>true</active>
14
+ <codePool>local</codePool>
15
+ <depends>
16
+ <Mage_Sales/>
17
+ </depends>
18
+ </Biztech_Trackorder>
19
+ </modules>
20
  </config>
package.xml CHANGED
@@ -1,25 +1,65 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>trackorder_module</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Track Order Extension allows the buyers to check the status of their orders without logging in to their account. </summary>
10
- <description>Our &#x201C;Track Order&#x201D; Extension allows the buyers to check the status of their orders without logging in to their account. Customer can also check the tracking information of shipment using this extension. &#xD;
11
- A link called &#x201C;Track Order&#x201D; will be automatically inserted in the header part and footer menu of the site. The customer (buyer) will simply have to fill the order number and email address, and they will be shown the order status with all its details including the shipment tracking information. The details will include links to shipment provider&#x2019;s site to track order directly.&#xD;
12
- Key Features of the Extension&#xD;
13
- &#x2022; Customer allowed to track order without login&#xD;
14
- &#x2022; Show Order status&#xD;
15
- &#x2022; Show Order Shipment Tracking&#xD;
16
- &#x2022; Show Links to Shipment Provider&#x2019;s site&#xD;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  </description>
18
- <notes>-New Release</notes>
 
 
19
  <authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
20
- <date>2014-01-07</date>
21
- <time>10:43:17</time>
22
- <contents><target name="mageetc"><dir name="modules"><file name="Biztech_Trackorder.xml" hash="2dc128b849316f8f053e2d482ab2ec04"/></dir></target><target name="magelocal"><dir name="Biztech"><dir name="Trackorder"><dir name="Block"><file name="Trackorder.php" hash="07689f6dca91b08cf48e9d73edab159d"/></dir><dir name="Helper"><file name="Data.php" hash="66c8dcb0194732d45383e99cd7403e3a"/></dir><dir name="controllers"><file name="IndexController.php" hash="82a4234b51982a8cec2f8c4bb5f72537"/></dir><dir name="etc"><file name="config.xml" hash="c51229574a50dc3a444d35ca37082521"/><file name="system.xml" hash="10f6fc3bf3604e1ac384d71f3992f260"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="trackorder.xml" hash="0d6b3c2976c965a8ccc4fb673f404d30"/></dir><dir name="template"><dir name="trackorder"><file name="trackdetail.phtml" hash="6ba0cbb0c33bab8ad7aa4845c931994a"/><file name="trackorder.phtml" hash="9c79ce025d46e9640ddaa614ff8f8032"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="trackorder"><dir name="css"><file name="trackorder.css" hash="0881bdff2e8cc79c4fbc127e7d62283e"/></dir><dir name="images"><file name="Thumbs.db" hash="2e44a69c8cd5d418657605eeaef20c08"/><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="ajax-loader.gif" hash="57ca1a2085d82f0574e3ef740b9a5ead"/><file name="main-bg.png" hash="615e539beac7fc4ad7b6aa7e519ca2ee"/></dir></dir></dir></dir></dir></target></contents>
23
  <compatible/>
24
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>trackorder_module</name>
4
+ <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Add more value and usability to your e-store! You can do it now by integrating track order extension and enabling your customers&#x2019; track their consignments easily and accurately that too without signing in!</summary>
10
+ <description>Add more value and usability to your e-store! You can do it now by integrating track order extension and enabling your customers&#x2019; track their consignments easily and accurately that too without signing in!&#xD;
11
+ Once the buyer fills out the order number and the relevant email address, the system will display all the details of the said order with latest status, including the shipment tracking data also. It will also have the link to the shipment website, through which the order has been sent, to enable the customers track the status of the order directly going to the shipment site.&#xD;
12
+ Make your customers least worried about the shipment of products as a real-time access is available to track their order now! They can sit back and relax, as tracking shipment is now possible with the extension. &#xD;
13
+ Core Features for Customers&#xD;
14
+ &#x27A2; Track Order Without Login&#xD;
15
+ No need to log in to account for tracking order status&#xD;
16
+ &#xD;
17
+ &#x27A2; View Order Status&#xD;
18
+ Complete order status can be viewed now &#xD;
19
+ &#xD;
20
+ &#x27A2; Link to Shipment Tracking Order&#xD;
21
+ Link to order shipment tracking with the website is also visible&#xD;
22
+ &#xD;
23
+ &#x27A2; Link Available in Main Menu&#xD;
24
+ Tracking order link will be available in main-menu or top link for the customers for easy accessibility&#xD;
25
+ &#xD;
26
+ &#x27A2; Widget for Tracking Order&#xD;
27
+ Tracking order widget can be visible at right side or left side of webpage, as defined by the admin&#xD;
28
+ &#xD;
29
+ &#x27A2; Real Time Tracking&#xD;
30
+ Customers can have real-time access to track orders and shipments of their products&#xD;
31
+ &#xD;
32
+ &#xD;
33
+ Core Features for Admin&#xD;
34
+ &#xD;
35
+ &#xD;
36
+ &#x27A2; Admin Places Link to Track Order&#xD;
37
+ Admin can place the separate link to &#x2018;track order&#x2019; in the top link or the top menu&#xD;
38
+ &#xD;
39
+ &#x27A2; Admin Decides the Placement of Widget &#xD;
40
+ Admin can place the track order widget to either left or right side of the webpage&#xD;
41
+ &#xD;
42
+ &#x27A2; Link to Track Order in Email &#xD;
43
+ A track order link can be sent in the order confirmation and shipment notification&#xD;
44
+ &#xD;
45
+ &#x27A2; Easily Install Extension&#xD;
46
+ Admin can easily install the extension and it is simple to be configured&#xD;
47
+ &#xD;
48
+ &#xD;
49
+ Your Gain&#xD;
50
+ &#xD;
51
+ &#x25CF; Happy Customer &#xD;
52
+ &#x25CF; More Feature-equipped e-store&#xD;
53
+ &#x25CF; Increased Customer Satisfaction&#xD;
54
+ &#x25CF; More Loyal Customers&#xD;
55
  </description>
56
+ <notes>-Enhancements&#xD;
57
+ - Widget Support&#xD;
58
+ - Order tracking link in email</notes>
59
  <authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
60
+ <date>2014-09-30</date>
61
+ <time>11:59:21</time>
62
+ <contents><target name="mageetc"><dir name="modules"><file name="Biztech_All.xml" hash="f4c3b9c029e56da8f09d7d71336c00f7"/><file name="Biztech_Trackorder.xml" hash="81109016b93cfc219ed6a3187a4e6e59"/></dir></target><target name="magelocal"><dir name="Biztech"><dir name="All"><dir name="Helper"><file name="Data.php" hash="e856726fd089e7f73ca7de450b696419"/></dir><dir name="Model"><file name="All.php" hash="a9aeeb9c6d7be9cf20414f405efc878d"/><dir name="Mysql4"><dir name="All"><file name="Collection.php" hash="a1909236183d126f38e628b85bb57e81"/></dir><file name="All.php" hash="f02542393eb26eadfb9b92d901d2ac12"/></dir><dir name="Source"><dir name="Updates"><file name="Type.php" hash="fa695bf4764c2d93c7436ed54bde89ba"/></dir></dir><file name="Status.php" hash="30a6f0da7d9d45e1082da532d5f8dabc"/><file name="Update.php" hash="83ceddbab4d621545b9c7c4bccdec7c0"/></dir><dir name="etc"><file name="config.xml" hash="27e403cedb861da03753d28527d9c664"/><file name="system.xml" hash="17262087dc933d934e09ac04cafb4c51"/></dir></dir><dir name="Trackorder"><dir name="Block"><file name="Trackorder.php" hash="08382b052af00bc0b82bb8a66f4aaaef"/><file name="Trackwidget.php" hash="2c0acfa5b09c216ef4907a88afba4050"/><file name="View.php" hash="0c65f7bd839db3f2588f05466c61f279"/></dir><dir name="Helper"><file name="Data.php" hash="ca4d65b28c67e74f8bdf05bb58a47a73"/></dir><dir name="Model"><file name="Observer.php" hash="97f07667598ad3b83d1670ba14b859ac"/><dir name="System"><dir name="Config"><dir name="Frontend"><file name="Widgetsettings.php" hash="30f5a6e8fc3a8856e289890fa11247c1"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="81f8391c0c6aeab5789ae002b9803e4b"/></dir><dir name="etc"><file name="config.xml" hash="9741d4aff6491bdeccd969ae5cb4c5b8"/><file name="system.xml" hash="4d6c933b47575ed0ff7ffed6c6bd7608"/><file name="widget.xml" hash="ff61595a908d0ce4c846f5b330ce5dd7"/></dir><dir name="sql"><dir name="trackorder_setup"><file name="mysql4-install-0.1.0.php" hash="480470f480e8714312eed76f073a183b"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="trackorder.xml" hash="7d81b1e199c97dff44d9502917d49514"/></dir><dir name="template"><dir name="trackorder"><file name="info.phtml" hash="592dd505f0bb03cb19017d55120b51a2"/><dir name="order"><file name="items.phtml" hash="1953cc2fb3cad9c24af8f2238c1454fb"/></dir><dir name="shipment"><file name="items.phtml" hash="bf1301921046e9416adc8968c6a0609e"/></dir><file name="trackdetail.phtml" hash="d6dd4d8e80e175897011f89588f2381d"/><file name="trackorder.phtml" hash="2939541a8537a23c78cbe5f1ed49f824"/><file name="trackorderlink.phtml" hash="55338259c837d10814a56ed3d6cc1d02"/><file name="trackwidget.phtml" hash="78d940b9765d109236c24ed6d95fdb22"/><file name="view.phtml" hash="71f72f80ecf948a65cba97cbd7ce7e26"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="trackorder"><dir name="css"><file name="trackorder.css" hash="9bfecdaa1cf87a42f67f642dc865bea6"/></dir><dir name="images"><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="ajax-loader.gif" hash="57ca1a2085d82f0574e3ef740b9a5ead"/><file name="i-trackorder.png" hash="65f5d4dbeafa21878e487859e29b0453"/><file name="main-bg.png" hash="615e539beac7fc4ad7b6aa7e519ca2ee"/></dir></dir></dir></dir></dir></target></contents>
63
  <compatible/>
64
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
65
  </package>
skin/frontend/default/default/trackorder/css/trackorder.css CHANGED
@@ -1,8 +1,13 @@
1
- .loading-details { background: url("../images/main-bg.png") repeat scroll 0 0 transparent; height: 100%; left: 0; position: fixed; top: 0; width: 100%; z-index: 99; }
2
- #loading-details .update-popup { position:fixed; top:45%; left:45%; width:300px; margin-left:-105px; padding:15px 30px; background:#fff; color:#d85909; font-weight:bold; text-align:center; z-index:400;webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px;}
3
- #loading-mask { background: none repeat scroll 0 0 #F5F5F5; border: 1px solid #F18200; margin: 20% auto; padding: 15px; text-align: center; width: 200px;}
4
- #loading-mask p{ margin-bottom:0;}
5
-
6
- .track-data-table{ margin-bottom:20px;}
7
-
8
- .order-info-message{ padding-top: 15px;}
 
 
 
 
 
1
+ .loading-details { background: url("../images/main-bg.png") repeat scroll 0 0 transparent; height: 100%; left: 0; position: fixed; top: 0; width: 100%; z-index: 99; }
2
+ #loading-details .update-popup { position:fixed; top:45%; left:45%; width:300px; margin-left:-105px; padding:15px 30px; background:#fff; color:#d85909; font-weight:bold; text-align:center; z-index:400;webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px;}
3
+ #loading-mask { background: none repeat scroll 0 0 #F5F5F5; border: 1px solid #F18200; margin: 20% auto; padding: 15px; text-align: center; width: 200px;}
4
+ #loading-mask p{ margin-bottom:0;}
5
+
6
+ .track-data-table{ margin-bottom:20px;}
7
+
8
+ .order-info-message{ padding-top: 15px;}
9
+
10
+ .block-trackorder .block-content{ padding: 5px 10px;}
11
+
12
+ .block-trackorder .block-title strong { background-image: url("../images/i-trackorder.png"); background-position: 0 0;
13
+ background-repeat: no-repeat; padding-left: 21px;}
skin/frontend/default/default/trackorder/images/Thumbs.db DELETED
Binary file
skin/frontend/default/default/trackorder/images/i-trackorder.png ADDED
Binary file