Version Notes
fix the issues in template and layout file
Download this release
Release Info
Developer | SSTech |
Extension | SSTech_Ordertracking |
Version | 0.1.1 |
Comparing to | |
See all releases |
Code changes from version 0.1.0 to 0.1.1
- app/code/community/SSTech/Ordertracking/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/ordertracking.xml +27 -0
- app/design/frontend/base/default/template/ordertracking/ordertracking.phtml +78 -0
- app/design/frontend/base/default/template/ordertracking/trackdetail.phtml +170 -0
- package.xml +6 -6
app/code/community/SSTech/Ordertracking/etc/config.xml
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<config>
|
11 |
<modules>
|
12 |
<SSTech_Ordertracking>
|
13 |
-
<version>0.1.
|
14 |
</SSTech_Ordertracking>
|
15 |
</modules>
|
16 |
<frontend>
|
10 |
<config>
|
11 |
<modules>
|
12 |
<SSTech_Ordertracking>
|
13 |
+
<version>0.1.1</version>
|
14 |
</SSTech_Ordertracking>
|
15 |
</modules>
|
16 |
<frontend>
|
app/design/frontend/base/default/layout/ordertracking.xml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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="ordertracking" ifconfig="ordertracking/ordertracking_general/enabled" ><label>Track Order</label><url helper="ordertracking/getOrdertrackingUrl"/><title>Track Order</title><prepare/><urlParams/><position>20</position></action>
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
<ordertracking_index_index>
|
9 |
+
<reference name="head">
|
10 |
+
<action method="addCss" ><stylesheet>ordertracking/css/ordertracking.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="ordertracking"><title>Track Your Order</title></action>
|
15 |
+
</reference>
|
16 |
+
<reference name="content">
|
17 |
+
<block type="ordertracking/ordertracking" name="ordertracking" template="ordertracking/ordertracking.phtml" />
|
18 |
+
</reference>
|
19 |
+
</ordertracking_index_index>
|
20 |
+
<ordertracking_index_track>
|
21 |
+
<reference name="content">
|
22 |
+
<block type="ordertracking/ordertracking" name="root" output="toHtml" template="ordertracking/trackdetail.phtml">
|
23 |
+
|
24 |
+
</block>
|
25 |
+
</reference>
|
26 |
+
</ordertracking_index_track>
|
27 |
+
</layout>
|
app/design/frontend/base/default/template/ordertracking/ordertracking.phtml
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(Mage::getStoreConfig('ordertracking/ordertracking_general/enabled')):
|
3 |
+
?>
|
4 |
+
<div class="form-list">
|
5 |
+
<form name="track_order" id="track_order" action="" method="post" onsubmit="sendAjax('track_order','<?php echo Mage::getUrl('*/*/track');?>'); return false;">
|
6 |
+
<div class="fieldset">
|
7 |
+
<h2 class="legend"><?php echo $this->__('Track Your Order ') ?></h2>
|
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"><span><span><?php echo $this->__('Track Order') ?></span></span></button>
|
24 |
+
</div>
|
25 |
+
|
26 |
+
</form>
|
27 |
+
</div>
|
28 |
+
<div id="loading" class="loading" style="display:none">
|
29 |
+
<div id="loading-track" >
|
30 |
+
<p class="loader" id="loading_track_loader"><img src="<?php echo $this->getSkinUrl('ordertracking/images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('adminhtml')->__('Loading...') ?>"/><br/><?php echo $this->__('Please wait...') ?></p>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
<div id="oderinfo" class="order-info-message"></div>
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
<script type="text/javascript">
|
42 |
+
var validateForm = new VarienForm('track_order', true);
|
43 |
+
</script>
|
44 |
+
<script type="text/javascript">
|
45 |
+
|
46 |
+
function sendAjax(frmId,url){
|
47 |
+
if (!validateForm.validator.validate()) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
var data = $(frmId).serialize(this);
|
51 |
+
$("loading").show();
|
52 |
+
new Ajax.Updater(
|
53 |
+
{
|
54 |
+
success:"oderinfo"
|
55 |
+
},
|
56 |
+
url,
|
57 |
+
{
|
58 |
+
asynchronous:true,
|
59 |
+
evalScripts:false,
|
60 |
+
onComplete:function(request, json){
|
61 |
+
$("loading").hide();
|
62 |
+
return false;
|
63 |
+
},
|
64 |
+
onLoading:function(request, json){},
|
65 |
+
parameters:data
|
66 |
+
}
|
67 |
+
);
|
68 |
+
return false;
|
69 |
+
}
|
70 |
+
|
71 |
+
</script>
|
72 |
+
<?php else: ?>
|
73 |
+
<?php
|
74 |
+
$url = Mage::getBaseUrl();
|
75 |
+
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
|
76 |
+
?>
|
77 |
+
<?php endif; ?>
|
78 |
+
|
app/design/frontend/base/default/template/ordertracking/trackdetail.phtml
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$order = $this->getOrderTracking();
|
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 |
+
|
20 |
+
<div class="fieldset">
|
21 |
+
<h2 class="legend"><?php echo Mage::helper('contacts')->__('Tracking Information') ?></h2>
|
22 |
+
<p><?php echo $this->__("Your Order Status is :")?> <strong><?php echo $order->getStatusLabel() ?></strong></p>
|
23 |
+
|
24 |
+
<?php if(sizeof($_results)>0): ?>
|
25 |
+
<?php foreach($_results as $shipid => $_result): ?>
|
26 |
+
<?php if($shipid): ?>
|
27 |
+
<h4><?php echo $this->__('Shipment #').$shipid; ?></h4>
|
28 |
+
<?php endif; ?>
|
29 |
+
<?php if(sizeof($_result)>0): ?>
|
30 |
+
<?php $rowCount = sizeof($_result); $counter = 1; ?>
|
31 |
+
<?php foreach($_result as $track): ?>
|
32 |
+
<table class="data-table track-data-table">
|
33 |
+
<col width="15%" />
|
34 |
+
<col />
|
35 |
+
<tbody>
|
36 |
+
<?php if(is_object($track)): ?>
|
37 |
+
<tr>
|
38 |
+
<th><?php echo $this->__('Tracking Number:'); ?></th>
|
39 |
+
<td><?php echo $track->getTracking(); ?></td>
|
40 |
+
</tr>
|
41 |
+
<?php if ($track->getCarrierTitle()): ?>
|
42 |
+
<tr>
|
43 |
+
<th><?php echo $this->__('Carrier:'); ?></th>
|
44 |
+
<td><?php echo $track->getCarrierTitle(); ?></td>
|
45 |
+
</tr>
|
46 |
+
<?php endif; ?>
|
47 |
+
<?php if($track->getErrorMessage()): ?>
|
48 |
+
<tr>
|
49 |
+
<th><?php echo $this->__('Error:'); ?></th>
|
50 |
+
<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>
|
51 |
+
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
<?php elseif($track->getTrackSummary()): ?>
|
55 |
+
<tr>
|
56 |
+
<th><?php echo $this->__('Info:'); ?></th>
|
57 |
+
<td><?php echo $track->getTrackSummary(); ?></td>
|
58 |
+
</tr>
|
59 |
+
<?php elseif($track->getUrl()): ?>
|
60 |
+
<tr>
|
61 |
+
<th><?php echo $this->__('Track:'); ?></th>
|
62 |
+
<td><a href="<?php echo $track->getUrl(); ?>" onclick="this.target='_blank'"><?php echo $this->__('Click here to get details'); ?></a></td>
|
63 |
+
</tr>
|
64 |
+
<?php else: ?>
|
65 |
+
<?php if ($track->getStatus()): ?>
|
66 |
+
<tr>
|
67 |
+
<th><?php echo $this->__('Status:'); ?></th>
|
68 |
+
<td><?php echo $track->getStatus(); ?></td>
|
69 |
+
</tr>
|
70 |
+
<?php endif; ?>
|
71 |
+
|
72 |
+
<?php if ($track->getDeliverydate()): ?>
|
73 |
+
<tr>
|
74 |
+
<th><?php echo $this->__('Delivered on:'); ?></th>
|
75 |
+
<td><?php echo $this->formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?></td>
|
76 |
+
</tr>
|
77 |
+
<?php endif; ?>
|
78 |
+
|
79 |
+
<?php if ($track->getSignedby()): ?>
|
80 |
+
<tr>
|
81 |
+
<th><?php echo $this->__('Signed by:'); ?></th>
|
82 |
+
<td><?php echo $track->getSignedby(); ?></td>
|
83 |
+
</tr>
|
84 |
+
<?php endif; ?>
|
85 |
+
|
86 |
+
<?php if ($track->getDeliveryLocation()): ?>
|
87 |
+
<tr>
|
88 |
+
<th><?php echo $this->__('Delivered to:'); ?></th>
|
89 |
+
<td><?php echo $track->getDeliveryLocation(); ?></td>
|
90 |
+
</tr>
|
91 |
+
<?php endif; ?>
|
92 |
+
|
93 |
+
<?php if ($track->getShippedDate()): ?>
|
94 |
+
<tr>
|
95 |
+
<th><?php echo $this->__('Shipped or billed on:'); ?></th>
|
96 |
+
<td><?php echo $track->getShippedDate(); ?></td>
|
97 |
+
</tr>
|
98 |
+
<?php endif; ?>
|
99 |
+
|
100 |
+
<?php if ($track->getService()): ?>
|
101 |
+
<tr>
|
102 |
+
<th><?php echo $this->__('Service Type:'); ?></th>
|
103 |
+
<td><?php echo $track->getService(); ?></td>
|
104 |
+
</tr>
|
105 |
+
<?php endif; ?>
|
106 |
+
|
107 |
+
<?php if ($track->getWeight()): ?>
|
108 |
+
<tr>
|
109 |
+
<th><?php echo $this->__('Weight:'); ?></th>
|
110 |
+
<td><?php echo $track->getWeight(); ?></td>
|
111 |
+
</tr>
|
112 |
+
<?php endif; ?>
|
113 |
+
|
114 |
+
<?php endif; ?>
|
115 |
+
<?php elseif(isset($track['title']) && isset($track['number']) && $track['number']): ?>
|
116 |
+
<!--if the tracking is custom value-->
|
117 |
+
<tr>
|
118 |
+
<th><?php echo ($track['title'] ? $this->escapeHtml($track['title']) : $this->__('N/A')); ?>:</th>
|
119 |
+
<td><?php echo (isset($track['number']) ? $this->escapeHtml($track['number']) : ''); ?></td>
|
120 |
+
</tr>
|
121 |
+
<?php endif; ?>
|
122 |
+
</tbody>
|
123 |
+
</table>
|
124 |
+
|
125 |
+
<?php if (is_object($track) && sizeof($track->getProgressdetail())>0): ?>
|
126 |
+
<table class="data-table" id="track-history-table-<?php echo $track->getTracking(); ?>">
|
127 |
+
<col />
|
128 |
+
<col width="1" />
|
129 |
+
<col width="1" />
|
130 |
+
<col />
|
131 |
+
<thead>
|
132 |
+
<tr>
|
133 |
+
<th><?php echo $this->__('Location') ?></th>
|
134 |
+
<th><?php echo $this->__('Date') ?></th>
|
135 |
+
<th><?php echo $this->__('Local Time') ?></th>
|
136 |
+
<th><?php echo $this->__('Description') ?></th>
|
137 |
+
</tr>
|
138 |
+
</thead>
|
139 |
+
<tbody>
|
140 |
+
<?php foreach($track->getProgressdetail() as $_detail): ?>
|
141 |
+
<?php $_detailDate = (isset($_detail['deliverydate']) ? $this->formatDeliveryDate($_detail['deliverydate']) : '') ?>
|
142 |
+
<?php $_detailTime = (isset($_detail['deliverytime']) ? $this->formatDeliveryTime($_detail['deliverytime'], $_detailDate) : '') ?>
|
143 |
+
<tr>
|
144 |
+
<td><?php echo (isset($_detail['deliverylocation']) ? $_detail['deliverylocation'] : ''); ?></td>
|
145 |
+
<td><?php echo $_detailDate ?></td>
|
146 |
+
<td><?php echo $_detailTime ?></td>
|
147 |
+
<td><?php echo (isset($_detail['activity']) ? $_detail['activity'] : '') ?></td>
|
148 |
+
</tr>
|
149 |
+
<?php endforeach; ?>
|
150 |
+
</tbody>
|
151 |
+
</table>
|
152 |
+
|
153 |
+
<script type="text/javascript">decorateTable('track-history-table-<?php echo $track->getTracking(); ?>');</script>
|
154 |
+
<?php endif; ?>
|
155 |
+
<?php if($counter!=$rowCount): ?>
|
156 |
+
<?php endif; ?>
|
157 |
+
<?php $counter++; ?>
|
158 |
+
|
159 |
+
<?php endforeach; ?>
|
160 |
+
<!--end for each tracking information-->
|
161 |
+
<?php else: ?>
|
162 |
+
<p><?php echo $this->__('There is no tracking available for this shipment.'); ?></p>
|
163 |
+
<?php endif; ?>
|
164 |
+
|
165 |
+
<?php endforeach; ?>
|
166 |
+
<?php else: ?>
|
167 |
+
<div><?php echo $this->__('There is no tracking available.'); ?></div>
|
168 |
+
<?php endif; ?>
|
169 |
+
|
170 |
+
</div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SSTech_Ordertracking</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -17,11 +17,11 @@ Customer have to just enter the order number and Email which will allow to show
|
|
17 |
<strong>Features<strong> 
|
18 |
<p>Without login Customer can track the order Status</p>
|
19 |
<p>Shipment status belong of Provide sites</p></description>
|
20 |
-
<notes>
|
21 |
-
<authors><author><name>
|
22 |
-
<date>2014-
|
23 |
-
<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="
|
25 |
<compatible/>
|
26 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
27 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SSTech_Ordertracking</name>
|
4 |
+
<version>0.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
17 |
<strong>Features<strong> 
|
18 |
<p>Without login Customer can track the order Status</p>
|
19 |
<p>Shipment status belong of Provide sites</p></description>
|
20 |
+
<notes>fix the issues in template and layout file </notes>
|
21 |
+
<authors><author><name>SSTech</name><user>sandy</user><email>sandynareshg@gmail.com</email></author></authors>
|
22 |
+
<date>2014-05-29</date>
|
23 |
+
<time>15:43:01</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="969d63f099bf54036589207fee2762fe"/><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="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ordertracking.xml" hash="3f4da0c8d1d49d6cf674dcef781cebd5"/></dir><dir name="template"><dir name="ordertracking"><file name="ordertracking.phtml" hash="8162c63d9dd8f16e63e9d9f286b274d0"/><file name="trackdetail.phtml" hash="92b37e5f48a3d0102a8bb2a708ceba49"/></dir></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>
|