Version Notes
Latest version
Download this release
Release Info
Developer | Netsol |
Extension | Netsolutions_Offlineordertrack |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- app/code/community/Netsolutions/Offlineordertrack/controllers/TrackingController.php +26 -14
- app/code/community/Netsolutions/Offlineordertrack/etc/config.xml +1 -1
- app/code/community/Netsolutions/Offlineordertrack/sql/offlineordertrack_setup/{mysql4-install-1.0.1.php → mysql4-install-1.1.2.php} +1 -1
- app/design/frontend/base/default/template/netsolutions/offlineordertrack/view.phtml +50 -8
- app/etc/modules/Netsolutions_Offlineordertrack.xml +9 -0
- package.xml +5 -5
- skin/frontend/base/default/js/ordertrack/ordertrack.js +34 -33
app/code/community/Netsolutions/Offlineordertrack/controllers/TrackingController.php
CHANGED
@@ -33,15 +33,10 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
33 |
* 2=zipcode
|
34 |
* 3=phonenumber
|
35 |
* */
|
36 |
-
|
37 |
/** store the ordered customer email address***/
|
38 |
-
|
39 |
-
{
|
40 |
-
$errormsg = 'Entered data is incorrect.Please try again.';
|
41 |
-
$response['error_status'] = $errormsg;
|
42 |
-
}
|
43 |
-
|
44 |
-
if(!empty($order->getData())){
|
45 |
$cEmail = $order->getCustomerEmail();
|
46 |
$billing = $order->getBillingAddress();
|
47 |
$zipcode = $billing->getPostcode();
|
@@ -117,6 +112,9 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
117 |
$response['error_status'] = $errormsg;
|
118 |
}
|
119 |
|
|
|
|
|
|
|
120 |
}
|
121 |
|
122 |
if($params['order_number'] == ''){
|
@@ -146,13 +144,14 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
146 |
* 2=zipcode
|
147 |
* 3=phonenumber
|
148 |
* */
|
149 |
-
|
|
|
150 |
{
|
151 |
$errormsg = 'Entered data is incorrect.Please try again.';
|
152 |
$response['error_status'] = $errormsg;
|
153 |
}
|
154 |
|
155 |
-
if(!empty($
|
156 |
/** store the ordered customer email address***/
|
157 |
$cEmail = $order->getCustomerEmail();
|
158 |
$billing = $order->getBillingAddress();
|
@@ -200,14 +199,15 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
200 |
$response['orderdetail_html'] .='</td><td><span><span class="price">'.number_format($item->getPrice(),2).'</span></span></td><td><span>'.number_format($item->getQtyOrdered(),2).'</span></td><td class="dataTotal"><span><span class="price">'.number_format($item->getPrice(),2).'</span></span></td></tr>';
|
201 |
}
|
202 |
$response['orderdetail_header'] .='<th>Price</th><th>Quantity</th><th class="dataTotal">Total</th></tr>';
|
203 |
-
|
204 |
-
|
|
|
205 |
$ship_flag = 0;
|
206 |
} else {
|
207 |
$ship_flag = 1;
|
208 |
$shipping = $order->getShippingAddress()->format('html');
|
209 |
}
|
210 |
-
if (empty($
|
211 |
$bill_flag = 0;
|
212 |
} else {
|
213 |
$bill_flag = 1;
|
@@ -268,6 +268,17 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
268 |
$block->setData('error_status',$errormsg);
|
269 |
$this->renderLayout();
|
270 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
}
|
273 |
/**
|
@@ -358,7 +369,8 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
358 |
->addFieldToSelect('*')
|
359 |
->addFieldToFilter('customer_email',$response['order_email']);
|
360 |
//print_r($ordercollection->getData()); die;
|
361 |
-
|
|
|
362 |
{
|
363 |
/** @var Mage_Core_Model_Template**/
|
364 |
//$response['order_email'] = 'asha.rajputsai@gmail.com';
|
33 |
* 2=zipcode
|
34 |
* 3=phonenumber
|
35 |
* */
|
36 |
+
$getOrderData = $order->getData();
|
37 |
/** store the ordered customer email address***/
|
38 |
+
|
39 |
+
if(!empty($getOrderData)){
|
|
|
|
|
|
|
|
|
|
|
40 |
$cEmail = $order->getCustomerEmail();
|
41 |
$billing = $order->getBillingAddress();
|
42 |
$zipcode = $billing->getPostcode();
|
112 |
$response['error_status'] = $errormsg;
|
113 |
}
|
114 |
|
115 |
+
}else{
|
116 |
+
$errormsg = 'Entered data is incorrect.Please try again.';
|
117 |
+
$response['error_status'] = $errormsg;
|
118 |
}
|
119 |
|
120 |
if($params['order_number'] == ''){
|
144 |
* 2=zipcode
|
145 |
* 3=phonenumber
|
146 |
* */
|
147 |
+
$getOrderData = $order->getData();
|
148 |
+
if(empty($getOrderData))
|
149 |
{
|
150 |
$errormsg = 'Entered data is incorrect.Please try again.';
|
151 |
$response['error_status'] = $errormsg;
|
152 |
}
|
153 |
|
154 |
+
if(!empty($getOrderData)){
|
155 |
/** store the ordered customer email address***/
|
156 |
$cEmail = $order->getCustomerEmail();
|
157 |
$billing = $order->getBillingAddress();
|
199 |
$response['orderdetail_html'] .='</td><td><span><span class="price">'.number_format($item->getPrice(),2).'</span></span></td><td><span>'.number_format($item->getQtyOrdered(),2).'</span></td><td class="dataTotal"><span><span class="price">'.number_format($item->getPrice(),2).'</span></span></td></tr>';
|
200 |
}
|
201 |
$response['orderdetail_header'] .='<th>Price</th><th>Quantity</th><th class="dataTotal">Total</th></tr>';
|
202 |
+
$getShippingAddress = $order->getShippingAddress();
|
203 |
+
$getBillingAddress = $order->getBillingAddress();
|
204 |
+
if (empty($getShippingAddress)) {
|
205 |
$ship_flag = 0;
|
206 |
} else {
|
207 |
$ship_flag = 1;
|
208 |
$shipping = $order->getShippingAddress()->format('html');
|
209 |
}
|
210 |
+
if (empty($getBillingAddress)) {
|
211 |
$bill_flag = 0;
|
212 |
} else {
|
213 |
$bill_flag = 1;
|
268 |
$block->setData('error_status',$errormsg);
|
269 |
$this->renderLayout();
|
270 |
}
|
271 |
+
}else{
|
272 |
+
|
273 |
+
$this->loadLayout();
|
274 |
+
$this->getLayout()
|
275 |
+
->getBlock('offlineorder.tracking.track')
|
276 |
+
->setTemplate('netsolutions/offlineordertrack/track.phtml');
|
277 |
+
$block = $this->getLayout()
|
278 |
+
->getBlock('offlineorder.tracking.track');
|
279 |
+
$errormsg = 'Entered data is incorrect.Please try again.';
|
280 |
+
$block->setData('error_status',$errormsg);
|
281 |
+
$this->renderLayout();
|
282 |
}
|
283 |
}
|
284 |
/**
|
369 |
->addFieldToSelect('*')
|
370 |
->addFieldToFilter('customer_email',$response['order_email']);
|
371 |
//print_r($ordercollection->getData()); die;
|
372 |
+
$orderCollectionData = $ordercollection->getData();
|
373 |
+
if(!empty($orderCollectionData))
|
374 |
{
|
375 |
/** @var Mage_Core_Model_Template**/
|
376 |
//$response['order_email'] = 'asha.rajputsai@gmail.com';
|
app/code/community/Netsolutions/Offlineordertrack/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Netsolutions_Offlineordertrack>
|
5 |
-
<version>1.1.
|
6 |
</Netsolutions_Offlineordertrack>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Netsolutions_Offlineordertrack>
|
5 |
+
<version>1.1.2</version>
|
6 |
</Netsolutions_Offlineordertrack>
|
7 |
</modules>
|
8 |
<global>
|
app/code/community/Netsolutions/Offlineordertrack/sql/offlineordertrack_setup/{mysql4-install-1.0.1.php → mysql4-install-1.1.2.php}
RENAMED
@@ -4,7 +4,7 @@ $installer->run("
|
|
4 |
-- DROP TABLE IF EXISTS {$this->getTable('ordertrack')};
|
5 |
CREATE TABLE IF NOT EXISTS {$this->getTable('ordertrack')} (
|
6 |
`ordertrack_id` int(11) unsigned NOT NULL auto_increment COMMENT 'ordertrack_id',
|
7 |
-
`emailtime`
|
8 |
`email` varchar(255) NOT NULL DEFAULT '',
|
9 |
PRIMARY KEY (`ordertrack_id`)
|
10 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
4 |
-- DROP TABLE IF EXISTS {$this->getTable('ordertrack')};
|
5 |
CREATE TABLE IF NOT EXISTS {$this->getTable('ordertrack')} (
|
6 |
`ordertrack_id` int(11) unsigned NOT NULL auto_increment COMMENT 'ordertrack_id',
|
7 |
+
`emailtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
8 |
`email` varchar(255) NOT NULL DEFAULT '',
|
9 |
PRIMARY KEY (`ordertrack_id`)
|
10 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
app/design/frontend/base/default/template/netsolutions/offlineordertrack/view.phtml
CHANGED
@@ -19,25 +19,25 @@ $fieldmultiselect = explode(",",$fieldmultiselect);
|
|
19 |
<div class="field">
|
20 |
<label class="required" for="order:number">Order Number</label>
|
21 |
<div class="input-box">
|
22 |
-
<input type="text" class="input-text required-entry"
|
23 |
</div>
|
24 |
</div>
|
25 |
<div class="field" style="display:<?php echo (in_array(1,$fieldmultiselect)) ? 'block' : 'none';?>">
|
26 |
<label class="required" for="order:email">Email Address</label>
|
27 |
<div class="input-box">
|
28 |
-
<input type="text" class="input-text validate-email required-entry "
|
29 |
</div>
|
30 |
</div>
|
31 |
<div class="field" style="display:<?php echo (in_array(2,$fieldmultiselect)) ? 'block' : 'none';?>">
|
32 |
<label class="required" for="order:zipcode">Zipcode</label>
|
33 |
<div class="input-box">
|
34 |
-
<input type="text" class="input-text validate-zip-international required-entry"
|
35 |
</div>
|
36 |
</div>
|
37 |
<div class="field" style="display:<?php echo (in_array(3,$fieldmultiselect)) ? 'block' : 'none';?>">
|
38 |
<label class="required" for="order:phonenumber">Phone Number</label>
|
39 |
<div class="input-box">
|
40 |
-
<input type="text" class="input-text required-entry"
|
41 |
</div>
|
42 |
</div>
|
43 |
|
@@ -126,12 +126,12 @@ $fieldmultiselect = explode(",",$fieldmultiselect);
|
|
126 |
</tbody></table>
|
127 |
</div>
|
128 |
<div class="order-info-address">
|
129 |
-
|
130 |
-
|
131 |
<h2>Gift Message</h2>
|
132 |
<div id="gift-html"><span></span></div>
|
133 |
-
</div
|
134 |
-
</div
|
135 |
<div class="order-info-box">
|
136 |
<div class="col-1">
|
137 |
<div class="box">
|
@@ -191,6 +191,7 @@ if ( typeof jQuery == 'undefined')
|
|
191 |
data += '&isAjax=1';
|
192 |
if(ajax == 0)
|
193 |
{
|
|
|
194 |
var orderstatus = '<?php echo $this->status; ?>';
|
195 |
if (this.validator.validate()) {
|
196 |
document.trackorderform.submit();
|
@@ -344,6 +345,47 @@ if ( typeof jQuery == 'undefined')
|
|
344 |
}
|
345 |
return false;
|
346 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
};
|
348 |
script.type='text/javascript';
|
349 |
script.src='<?php echo $this->getSkinUrl('js/ordertrack/jquery-1.10.2.min.js');?>';
|
19 |
<div class="field">
|
20 |
<label class="required" for="order:number">Order Number</label>
|
21 |
<div class="input-box">
|
22 |
+
<input type="text" class="input-text required-entry" id="order:number" name="order_number" title="Order Number">
|
23 |
</div>
|
24 |
</div>
|
25 |
<div class="field" style="display:<?php echo (in_array(1,$fieldmultiselect)) ? 'block' : 'none';?>">
|
26 |
<label class="required" for="order:email">Email Address</label>
|
27 |
<div class="input-box">
|
28 |
+
<input type="text" style="display:<?php echo (in_array(1,$fieldmultiselect)) ? 'block' : 'none';?>" class="input-text validate-email required-entry " id="order:email" name="order_email" title="Email Address">
|
29 |
</div>
|
30 |
</div>
|
31 |
<div class="field" style="display:<?php echo (in_array(2,$fieldmultiselect)) ? 'block' : 'none';?>">
|
32 |
<label class="required" for="order:zipcode">Zipcode</label>
|
33 |
<div class="input-box">
|
34 |
+
<input type="text"style="display:<?php echo (in_array(2,$fieldmultiselect)) ? 'block' : 'none';?>" class="input-text validate-zip-international required-entry" id="order:zipcode" name="order_zipcode" title="Zipcode">
|
35 |
</div>
|
36 |
</div>
|
37 |
<div class="field" style="display:<?php echo (in_array(3,$fieldmultiselect)) ? 'block' : 'none';?>">
|
38 |
<label class="required" for="order:phonenumber">Phone Number</label>
|
39 |
<div class="input-box">
|
40 |
+
<input type="text" style="display:<?php echo (in_array(3,$fieldmultiselect)) ? 'block' : 'none';?>" class="input-text required-entry" id="order:phonenumber" name="order_phonenumber" title="Phone Number">
|
41 |
</div>
|
42 |
</div>
|
43 |
|
126 |
</tbody></table>
|
127 |
</div>
|
128 |
<div class="order-info-address">
|
129 |
+
<!--<div class="order-info-box">
|
130 |
+
<div>
|
131 |
<h2>Gift Message</h2>
|
132 |
<div id="gift-html"><span></span></div>
|
133 |
+
</div>
|
134 |
+
</div>-->
|
135 |
<div class="order-info-box">
|
136 |
<div class="col-1">
|
137 |
<div class="box">
|
191 |
data += '&isAjax=1';
|
192 |
if(ajax == 0)
|
193 |
{
|
194 |
+
jQuery('#div-loading').hide();
|
195 |
var orderstatus = '<?php echo $this->status; ?>';
|
196 |
if (this.validator.validate()) {
|
197 |
document.trackorderform.submit();
|
345 |
}
|
346 |
return false;
|
347 |
});
|
348 |
+
|
349 |
+
/****
|
350 |
+
jQuery ajax for retrieving all order number for specfic email
|
351 |
+
address and sending to customer email***/
|
352 |
+
|
353 |
+
jQuery("#track-order-forgotorder").submit(function(){
|
354 |
+
var url = jQuery("#track-order-forgotorder").attr('action');
|
355 |
+
var data = jQuery('#track-order-forgotorder').serialize();
|
356 |
+
//data += '&isAjax=1';
|
357 |
+
|
358 |
+
jQuery.ajax({
|
359 |
+
url: url,
|
360 |
+
type: "POST",
|
361 |
+
data: data,
|
362 |
+
dataType: 'json',
|
363 |
+
success:function(data){
|
364 |
+
console.log('succes');
|
365 |
+
if(data.error_status){
|
366 |
+
jQuery('#error_status').html(data.error_status);
|
367 |
+
jQuery('#error_status').show();
|
368 |
+
//jQuery('#order-result').hide();
|
369 |
+
}else{
|
370 |
+
//jQuery('#order-result').show('slow');
|
371 |
+
jQuery('#error_status').hide();
|
372 |
+
}
|
373 |
+
|
374 |
+
},
|
375 |
+
statusCode: {
|
376 |
+
404: function() { alert('Could not contact server.');
|
377 |
+
},
|
378 |
+
500: function() { alert('A server-side error has occurred.. 1');
|
379 |
+
}
|
380 |
+
},
|
381 |
+
error: function(error) {
|
382 |
+
console.log(error);
|
383 |
+
return false;
|
384 |
+
},
|
385 |
+
});
|
386 |
+
|
387 |
+
return false;
|
388 |
+
});
|
389 |
};
|
390 |
script.type='text/javascript';
|
391 |
script.src='<?php echo $this->getSkinUrl('js/ordertrack/jquery-1.10.2.min.js');?>';
|
app/etc/modules/Netsolutions_Offlineordertrack.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Netsolutions_Offlineordertrack>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Netsolutions_Offlineordertrack>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Netsolutions_Offlineordertrack</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
<description>This extension will give order details for guest customers.</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>Netsol</name><user>net_solutions</user><email>marketing@netsolutionsindia.com</email></author></authors>
|
13 |
<date>2015-06-29</date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Netsolutions"><dir name="Offlineordertrack"><dir name="Block"><file name="Forgotmail.php" hash="bfa51eb79037a1ecd83fef4ed02694b4"/><file name="Tracking.php" hash="0741cd154e094d4196a6b40785e122c5"/></dir><dir name="Helper"><file name="Data.php" hash="1684c88d1eef1c170b0fcc890def0e39"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Ordertrack"><file name="Collection.php" hash="a828733d247949aefea0e8ef80fb6238"/></dir><file name="Ordertrack.php" hash="4f4f8d8c46e33ff181237a00d0275adf"/></dir><file name="Ordertrack.php" hash="0bad8553772cc8e6def9366e3c41fbd5"/><dir name="System"><dir name="Config"><dir name="Source"><file name="View.php" hash="77b1904426b84b429e344d3701996b49"/></dir></dir></dir></dir><dir name="controllers"><file name="TrackingController.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Netsolutions_Offlineordertrack</name>
|
4 |
+
<version>1.1.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>This extension will give order details for guest customers.</summary>
|
10 |
<description>This extension will give order details for guest customers.</description>
|
11 |
+
<notes>Latest version</notes>
|
12 |
<authors><author><name>Netsol</name><user>net_solutions</user><email>marketing@netsolutionsindia.com</email></author></authors>
|
13 |
<date>2015-06-29</date>
|
14 |
+
<time>12:45:24</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Netsolutions"><dir name="Offlineordertrack"><dir name="Block"><file name="Forgotmail.php" hash="bfa51eb79037a1ecd83fef4ed02694b4"/><file name="Tracking.php" hash="0741cd154e094d4196a6b40785e122c5"/></dir><dir name="Helper"><file name="Data.php" hash="1684c88d1eef1c170b0fcc890def0e39"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Ordertrack"><file name="Collection.php" hash="a828733d247949aefea0e8ef80fb6238"/></dir><file name="Ordertrack.php" hash="4f4f8d8c46e33ff181237a00d0275adf"/></dir><file name="Ordertrack.php" hash="0bad8553772cc8e6def9366e3c41fbd5"/><dir name="System"><dir name="Config"><dir name="Source"><file name="View.php" hash="77b1904426b84b429e344d3701996b49"/></dir></dir></dir></dir><dir name="controllers"><file name="TrackingController.php" hash="6212bcc605f0c6783a16df3966ae3f70"/></dir><dir name="etc"><file name="adminhtml.xml" hash="69edda440ef5de1d8399c6893baa3a0a"/><file name="config.xml" hash="b0cbac0a15fd034bbb17ea8c4ee07d45"/><file name="system.xml" hash="ba1fc4ac8378625410ca7d8622b2e0dd"/></dir><dir name="sql"><dir name="offlineordertrack_setup"><file name="mysql4-install-1.1.2.php" hash="99ecd2fc3073d959897810316da47787"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Netsolutions_Offlineordertrack.xml" hash="1bc70e057c37a9fa2494ee418e759159"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="offlineordertrack.xml" hash="462bc726d57acadab7cd7c50c0302c34"/></dir><dir name="template"><dir name="netsolutions"><dir name="offlineordertrack"><dir name="email"><file name="mail.phtml" hash="3d5360174bd6a95f476599aa1e41f430"/></dir><file name="track.phtml" hash="56311295219a8fee78b23182a3812a73"/><file name="view.phtml" hash="6ad577e0c73109fe11820def9cb50d0b"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="order-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/></dir><dir name="js"><dir name="ordertrack"><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="ordertrack.js" hash="04faccfd435aa58dc45d6f2b29692e9f"/></dir></dir><dir name="css"><file name="ordertrack.css" hash="9e872b1418f5a524b2682b3785652717"/></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/js/ordertrack/ordertrack.js
CHANGED
@@ -10,7 +10,8 @@ function valueChanged(){
|
|
10 |
jQuery('#error_status').hide();
|
11 |
}
|
12 |
}
|
13 |
-
|
|
|
14 |
jQuery.noConflict();
|
15 |
jQuery(document).ready(function() {
|
16 |
/****
|
@@ -21,38 +22,37 @@ jQuery(document).ready(function() {
|
|
21 |
var url = jQuery("#track-order-forgotorder").attr('action');
|
22 |
var data = jQuery('#track-order-forgotorder').serialize();
|
23 |
//data += '&isAjax=1';
|
24 |
-
|
25 |
-
{
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
404: function() { alert('Could not contact server.');
|
45 |
-
},
|
46 |
-
500: function() { alert('A server-side error has occurred.. 1');
|
47 |
-
}
|
48 |
-
},
|
49 |
-
error: function(error) {
|
50 |
-
console.log(error);
|
51 |
-
return false;
|
52 |
},
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
});
|
57 |
/****
|
58 |
Jquery ajax for tracking order detials
|
@@ -71,6 +71,7 @@ jQuery(document).ready(function() {
|
|
71 |
data += '&isAjax=1';
|
72 |
if(ajax == 0)
|
73 |
{
|
|
|
74 |
var orderstatus = '<?php echo $this->status; ?>';
|
75 |
if (this.validator.validate()) {
|
76 |
document.trackorderform.submit();
|
@@ -226,7 +227,7 @@ jQuery(document).ready(function() {
|
|
226 |
return false;
|
227 |
});
|
228 |
});
|
229 |
-
|
230 |
function removeActiveClass() {
|
231 |
jQuery('#status1-pending').removeClass();
|
232 |
jQuery('#status1-processing').removeClass();
|
10 |
jQuery('#error_status').hide();
|
11 |
}
|
12 |
}
|
13 |
+
if ( typeof jQuery !== 'undefined')
|
14 |
+
{
|
15 |
jQuery.noConflict();
|
16 |
jQuery(document).ready(function() {
|
17 |
/****
|
22 |
var url = jQuery("#track-order-forgotorder").attr('action');
|
23 |
var data = jQuery('#track-order-forgotorder').serialize();
|
24 |
//data += '&isAjax=1';
|
25 |
+
|
26 |
+
jQuery.ajax({
|
27 |
+
url: url,
|
28 |
+
type: "POST",
|
29 |
+
data: data,
|
30 |
+
dataType: 'json',
|
31 |
+
success:function(data){
|
32 |
+
console.log('succes');
|
33 |
+
if(data.error_status){
|
34 |
+
jQuery('#error_status').html(data.error_status);
|
35 |
+
jQuery('#error_status').show();
|
36 |
+
//jQuery('#order-result').hide();
|
37 |
+
}else{
|
38 |
+
//jQuery('#order-result').show('slow');
|
39 |
+
jQuery('#error_status').hide();
|
40 |
+
}
|
41 |
+
|
42 |
+
},
|
43 |
+
statusCode: {
|
44 |
+
404: function() { alert('Could not contact server.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
},
|
46 |
+
500: function() { alert('A server-side error has occurred.. 1');
|
47 |
+
}
|
48 |
+
},
|
49 |
+
error: function(error) {
|
50 |
+
console.log(error);
|
51 |
+
return false;
|
52 |
+
},
|
53 |
+
});
|
54 |
+
|
55 |
+
return false;
|
56 |
});
|
57 |
/****
|
58 |
Jquery ajax for tracking order detials
|
71 |
data += '&isAjax=1';
|
72 |
if(ajax == 0)
|
73 |
{
|
74 |
+
jQuery('#div-loading').hide();
|
75 |
var orderstatus = '<?php echo $this->status; ?>';
|
76 |
if (this.validator.validate()) {
|
77 |
document.trackorderform.submit();
|
227 |
return false;
|
228 |
});
|
229 |
});
|
230 |
+
}
|
231 |
function removeActiveClass() {
|
232 |
jQuery('#status1-pending').removeClass();
|
233 |
jQuery('#status1-processing').removeClass();
|