SSTech_Ordertracking - Version 0.1.0

Version Notes

Stable version 0.1.0

Download this release

Release Info

Developer SSTech
Extension SSTech_Ordertracking
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/community/SSTech/Ordertracking/Block/Ordertracking.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class SSTech_Ordertracking_Block_Ordertracking extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getOrdertracking()
10
+ {
11
+ if (!$this->hasData('ordertracking')) {
12
+ $this->setData('ordertracking', Mage::registry('current_order'));
13
+ }
14
+ return $this->getData('ordertracking');
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/community/SSTech/Ordertracking/Helper/Data.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SSTech_Ordertracking_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+ public function getOrdertrackingUrl()
6
+ {
7
+ return $this->_getUrl('ordertracking/index');
8
+ }
9
+ }
app/code/community/SSTech/Ordertracking/controllers/IndexController.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class SSTech_Ordertracking_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('ordertracking')->__('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("ordertracking_index_track");
75
+ $layout->generateXml();
76
+ $layout->generateBlocks();
77
+ $output = $layout->getOutput();
78
+ return $output;
79
+ }
80
+ }
app/code/community/SSTech/Ordertracking/etc/config.xml ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category SSTech
5
+ * @package SSTech_Ordertracking
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
+ <SSTech_Ordertracking>
13
+ <version>0.1.0</version>
14
+ </SSTech_Ordertracking>
15
+ </modules>
16
+ <frontend>
17
+ <routers>
18
+ <ordertracking>
19
+ <use>standard</use>
20
+ <args>
21
+ <module>SSTech_Ordertracking</module>
22
+ <frontName>ordertracking</frontName>
23
+ </args>
24
+ </ordertracking>
25
+ </routers>
26
+ <layout>
27
+ <updates>
28
+ <ordertracking>
29
+ <file>ordertracking.xml</file>
30
+ </ordertracking>
31
+ </updates>
32
+ </layout>
33
+ </frontend>
34
+ <admin>
35
+ <routers>
36
+ <ordertracking>
37
+ <use>admin</use>
38
+ <args>
39
+ <module>SSTech_Ordertracking</module>
40
+ <frontName>ordertracking</frontName>
41
+ </args>
42
+ </ordertracking>
43
+ </routers>
44
+ </admin>
45
+ <adminhtml>
46
+ <acl>
47
+ <resources>
48
+ <all>
49
+ <title>Allow Everything</title>
50
+ </all>
51
+ <admin>
52
+ <children>
53
+ <SSTech_Ordertracking>
54
+ <title>Ordertracking Module</title>
55
+ <sort_order>10</sort_order>
56
+ </SSTech_Ordertracking>
57
+ <system>
58
+ <children>
59
+ <config>
60
+ <children>
61
+ <ordertracking>
62
+ <title>Order Tracking</title>
63
+ </ordertracking>
64
+ </children>
65
+ </config>
66
+ </children>
67
+ </system>
68
+ </children>
69
+ </admin>
70
+ </resources>
71
+ </acl>
72
+ <layout>
73
+ <updates>
74
+ <ordertracking>
75
+ <file>ordertracking.xml</file>
76
+ </ordertracking>
77
+ </updates>
78
+ </layout>
79
+ </adminhtml>
80
+ <global>
81
+ <models>
82
+ <ordertracking>
83
+ <class>SSTech_Ordertracking_Model</class>
84
+ <resourceModel>ordertracking_mysql4</resourceModel>
85
+ </ordertracking>
86
+ <ordertracking_mysql4>
87
+ <class>SSTech_Ordertracking_Model_Mysql4</class>
88
+ <entities>
89
+ <ordertracking>
90
+ <table>ordertracking</table>
91
+ </ordertracking>
92
+ </entities>
93
+ </ordertracking_mysql4>
94
+ </models>
95
+ <resources>
96
+ <ordertracking_setup>
97
+ <setup>
98
+ <module>SSTech_Ordertracking</module>
99
+ </setup>
100
+ <connection>
101
+ <use>core_setup</use>
102
+ </connection>
103
+ </ordertracking_setup>
104
+ <ordertracking_write>
105
+ <connection>
106
+ <use>core_write</use>
107
+ </connection>
108
+ </ordertracking_write>
109
+ <ordertracking_read>
110
+ <connection>
111
+ <use>core_read</use>
112
+ </connection>
113
+ </ordertracking_read>
114
+ </resources>
115
+ <blocks>
116
+ <ordertracking>
117
+ <class>SSTech_Ordertracking_Block</class>
118
+ </ordertracking>
119
+ </blocks>
120
+ <helpers>
121
+ <ordertracking>
122
+ <class>SSTech_Ordertracking_Helper</class>
123
+ </ordertracking>
124
+ </helpers>
125
+ </global>
126
+ </config>
app/code/community/SSTech/Ordertracking/etc/system.xml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <config>
3
+ <tabs>
4
+ <biztech translate="label" module="ordertracking">
5
+ <label>SSTech Extensions</label>
6
+ <sort_order>400</sort_order>
7
+ </biztech>
8
+ </tabs>
9
+ <sections>
10
+ <ordertracking translate="label" module="ordertracking">
11
+ <label>Order Tracking</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
+ <ordertracking_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
+ </ordertracking_general>
39
+ </groups>
40
+ </ordertracking>
41
+ </sections>
42
+ </config>
app/etc/modules/SSTech_Ordertracking.xml ADDED
@@ -0,0 +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
+ <SSTech_Ordertracking>
13
+ <active>true</active>
14
+ <codePool>community</codePool>
15
+ <depends>
16
+ <Mage_Sales/>
17
+ </depends>
18
+ </SSTech_Ordertracking>
19
+ </modules>
20
+ </config>
package.xml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>SSTech_Ordertracking</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Order Tracking Module which will allow customer to track the Status of Order without logging in to their account&#xD;
10
+ Customer Can also track the information of shipment too.</summary>
11
+ <description>Order Tracking Module which will allow customer to track the Status of Order without logging in to their account&#xD;
12
+ Customer Can also track the information of shipment too.&#xD;
13
+ &lt;br/&gt;&#xD;
14
+ Magento Default Theme will add the "Track Order" in the Top links&#xD;
15
+ Customer have to just enter the order number and Email which will allow to show the status of the Order ad they track the order Easily &#xD;
16
+ &lt;br/&gt;&#xD;
17
+ &lt;strong&gt;Features&lt;strong&gt; &#xD;
18
+ &lt;p&gt;Without login Customer can track the order Status&lt;/p&gt;&#xD;
19
+ &lt;p&gt;Shipment status belong of Provide sites&lt;/p&gt;</description>
20
+ <notes>Stable version 0.1.0</notes>
21
+ <authors><author><name>Sandeep Gulati</name><user>sandy</user><email>sandynareshg@gmail.com</email></author></authors>
22
+ <date>2014-04-27</date>
23
+ <time>14:42:40</time>
24
+ <contents><target name="magecommunity"><dir name="SSTech"><dir name="Ordertracking"><dir name="Block"><file name="Ordertracking.php" hash="96c59a9b979173fa81c615ff3bbbd016"/></dir><dir name="Helper"><file name="Data.php" hash="716c6268a4b9372f34b010adba4d7cd9"/></dir><dir name="controllers"><file name="IndexController.php" hash="6e114a6acabcfdb98b0a670a9457c682"/></dir><dir name="etc"><file name="config.xml" hash="5af4f92d7b0062d59c5140c61c9d20e0"/><file name="system.xml" hash="a716ab127f67b296a18a899bd13d6861"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SSTech_Ordertracking.xml" hash="426f3665451600519a44ebbc50370f41"/></dir></target><target name="magelocal"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ordertracking.xml" hash=""/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="ordertracking"><dir name="css"><file name="ordertracking.css" hash="12ed78e6f25752e6e0449213007af635"/></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>
25
+ <compatible/>
26
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
27
+ </package>
skin/frontend/base/default/ordertracking/css/ordertracking.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ .loading { 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 .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-track { background: none repeat scroll 0 0 #F5F5F5; border: 1px solid #F18200; margin: 20% auto; padding: 15px; text-align: center; width: 200px;}
4
+ #loading-track p{ margin-bottom:0;}
5
+
6
+ .track-data-table{ margin-bottom:20px;}
7
+
8
+ .order-info-message{ padding-top: 15px;}
skin/frontend/base/default/ordertracking/images/Thumbs.db ADDED
Binary file
skin/frontend/base/default/ordertracking/images/ajax-loader-tr.gif ADDED
Binary file
skin/frontend/base/default/ordertracking/images/ajax-loader.gif ADDED
Binary file
skin/frontend/base/default/ordertracking/images/main-bg.png ADDED
Binary file