Version Notes
Stable release of extension
Download this release
Release Info
| Developer | Netsol |
| Extension | Netsolutions_Offlineordertrack |
| Version | 1.1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.1 to 1.1.1
- app/code/community/Netsolutions/Offlineordertrack/Block/Forgotmail.php +10 -0
- app/code/community/Netsolutions/Offlineordertrack/Block/Tracking.php +16 -0
- app/code/community/Netsolutions/Offlineordertrack/Helper/Data.php +8 -0
- app/code/community/Netsolutions/Offlineordertrack/Model/Mysql4/Ordertrack.php +8 -0
- app/code/community/Netsolutions/Offlineordertrack/Model/Mysql4/Ordertrack/Collection.php +9 -0
- app/code/community/Netsolutions/Offlineordertrack/Model/Ordertrack.php +9 -0
- app/code/community/Netsolutions/Offlineordertrack/Model/System/Config/Source/View.php +17 -0
- app/code/community/Netsolutions/Offlineordertrack/controllers/TrackingController.php +339 -127
- app/code/community/Netsolutions/Offlineordertrack/etc/config.xml +43 -1
- app/code/community/Netsolutions/Offlineordertrack/etc/system.xml +62 -3
- app/code/community/Netsolutions/Offlineordertrack/sql/offlineordertrack_setup/mysql4-install-1.0.1.php +13 -0
- app/design/frontend/base/default/layout/offlineordertrack.xml +1 -0
- app/design/frontend/base/default/template/netsolutions/offlineordertrack/email/mail.phtml +13 -0
- app/design/frontend/base/default/template/netsolutions/offlineordertrack/track.phtml +7 -2
- app/design/frontend/base/default/template/netsolutions/offlineordertrack/view.phtml +54 -187
- app/etc/modules/Netsolutions_Offlineordertrack.xml +0 -9
- package.xml +6 -6
- skin/frontend/base/default/css/ordertrack.css +11 -1
- skin/frontend/base/default/images/order-loader.gif +0 -0
- skin/frontend/base/default/js/ordertrack/ordertrack.js +236 -0
app/code/community/Netsolutions/Offlineordertrack/Block/Forgotmail.php
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Netsolutions_Offlineordertrack_Block_Forgotmail extends Mage_Core_Block_Template{
|
| 3 |
+
|
| 4 |
+
public function _construct()
|
| 5 |
+
{
|
| 6 |
+
$this->setTemplate('netsolutions/offlineordertrack/email/mail.phtml');
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
}
|
| 10 |
+
?>
|
app/code/community/Netsolutions/Offlineordertrack/Block/Tracking.php
CHANGED
|
@@ -9,5 +9,21 @@ class Netsolutions_Offlineordertrack_Block_Tracking extends Mage_Core_Block_Temp
|
|
| 9 |
{
|
| 10 |
return $this->helper('offlineordertrack')->resultUrl();
|
| 11 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
}
|
| 9 |
{
|
| 10 |
return $this->helper('offlineordertrack')->resultUrl();
|
| 11 |
}
|
| 12 |
+
/***
|
| 13 |
+
* Retrieve order track url through helper
|
| 14 |
+
*
|
| 15 |
+
* @return form url
|
| 16 |
+
* */
|
| 17 |
+
public function ordertrackUrl()
|
| 18 |
+
{
|
| 19 |
+
return $this->helper('offlineordertrack')->trackingUrl();
|
| 20 |
+
}
|
| 21 |
+
/***
|
| 22 |
+
* Retrieve form url through helper
|
| 23 |
+
* @return forgot ordernumber form url
|
| 24 |
+
* */
|
| 25 |
+
public function getForgotorderurl(){
|
| 26 |
+
return $this->helper('offlineordertrack')->forgotorderUrl();
|
| 27 |
+
}
|
| 28 |
|
| 29 |
}
|
app/code/community/Netsolutions/Offlineordertrack/Helper/Data.php
CHANGED
|
@@ -28,4 +28,12 @@ class Netsolutions_Offlineordertrack_Helper_Data extends Mage_Core_Helper_Abstra
|
|
| 28 |
{
|
| 29 |
return Mage::getStoreConfigFlag('netsolconfig/netsol_group/netsol_enable');
|
| 30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
}
|
| 28 |
{
|
| 29 |
return Mage::getStoreConfigFlag('netsolconfig/netsol_group/netsol_enable');
|
| 30 |
}
|
| 31 |
+
/***
|
| 32 |
+
*
|
| 33 |
+
*
|
| 34 |
+
* */
|
| 35 |
+
public function forgotorderUrl()
|
| 36 |
+
{
|
| 37 |
+
return Mage::getUrl('offlineordertrack/tracking/forgotajax');
|
| 38 |
+
}
|
| 39 |
}
|
app/code/community/Netsolutions/Offlineordertrack/Model/Mysql4/Ordertrack.php
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Netsolutions_Offlineordertrack_Model_Mysql4_Ordertrack extends Mage_Core_Model_Mysql4_Abstract
|
| 3 |
+
{
|
| 4 |
+
public function _construct()
|
| 5 |
+
{
|
| 6 |
+
$this->_init('offlineordertrack/ordertrack', 'ordertrack_id');
|
| 7 |
+
}
|
| 8 |
+
}
|
app/code/community/Netsolutions/Offlineordertrack/Model/Mysql4/Ordertrack/Collection.php
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Netsolutions_Offlineordertrack_Model_Mysql4_Ordertrack_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
| 3 |
+
{
|
| 4 |
+
public function _construct()
|
| 5 |
+
{
|
| 6 |
+
//parent::__construct();
|
| 7 |
+
$this->_init('offlineordertrack/ordertrack');
|
| 8 |
+
}
|
| 9 |
+
}
|
app/code/community/Netsolutions/Offlineordertrack/Model/Ordertrack.php
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Netsolutions_Offlineordertrack_Model_Ordertrack extends Mage_Core_Model_Abstract{
|
| 3 |
+
|
| 4 |
+
public function _construct()
|
| 5 |
+
{
|
| 6 |
+
$this->_init('offlineordertrack/ordertrack');
|
| 7 |
+
}
|
| 8 |
+
}
|
| 9 |
+
?>
|
app/code/community/Netsolutions/Offlineordertrack/Model/System/Config/Source/View.php
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Netsolutions_Offlineordertrack_Model_System_Config_Source_View
|
| 3 |
+
{
|
| 4 |
+
/**
|
| 5 |
+
* Options getter
|
| 6 |
+
*
|
| 7 |
+
* @return array
|
| 8 |
+
*/
|
| 9 |
+
public function toOptionArray()
|
| 10 |
+
{
|
| 11 |
+
return array(
|
| 12 |
+
array('value' => 1, 'label' => Mage::helper('adminhtml')->__('Email Address')),
|
| 13 |
+
array('value' => 2, 'label' => Mage::helper('adminhtml')->__('Zipcode')),
|
| 14 |
+
array('value' => 3, 'label' => Mage::helper('adminhtml')->__('Phone Number')),
|
| 15 |
+
);
|
| 16 |
+
}
|
| 17 |
+
}
|
app/code/community/Netsolutions/Offlineordertrack/controllers/TrackingController.php
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
<?php
|
| 2 |
class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Controller_Front_Action
|
| 3 |
{
|
|
|
|
|
|
|
|
|
|
| 4 |
/****
|
| 5 |
* render the default layout for track order
|
| 6 |
* **/
|
|
@@ -23,57 +26,104 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
| 23 |
$response = array();
|
| 24 |
$orderId = Mage::getModel('sales/order')->loadByIncrementId($params['order_number'])->getEntityId();
|
| 25 |
$order = Mage::getModel("sales/order")->load($orderId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
/** store the ordered customer email address***/
|
| 27 |
-
$
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
if
|
| 32 |
-
$
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
| 51 |
-
$response['
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
$response['subtotal'] = '<span class="price">'.number_format($order['subtotal'],2).'</span>';
|
| 58 |
-
$response['shipping'] = '<span class="price">'.number_format($order['shipping_amount'],2).'</span>';
|
| 59 |
-
$response['tax'] = '<span class="price">'.number_format($order['tax_amount'],2).'</span>';
|
| 60 |
-
$response['grandtotal'] = '<span class="price">'.number_format($order->getGrandTotal(),2).'</span>';
|
| 61 |
$response['order_number'] =$params['order_number'];
|
| 62 |
-
$response['
|
| 63 |
-
$response['status'] = $order['status'];
|
| 64 |
-
$shipping_method = $order->getShippingDescription();
|
| 65 |
-
$response['payment'] = $order->getPayment()->getMethodInstance()->getTitle();
|
| 66 |
-
$response['carriers'] = $shipping_method;
|
| 67 |
-
|
| 68 |
-
foreach($order->getShipmentsCollection() as $shipment)
|
| 69 |
-
{
|
| 70 |
-
$response['shipped_dates'] = date("M d, Y h:i:s A",strtotime($shipment->getCreatedAt()));
|
| 71 |
-
}
|
| 72 |
-
$response['billed_on'] = date("M d, Y h:i:s A",strtotime($order->getCreatedAt()));
|
| 73 |
-
|
| 74 |
-
}else{
|
| 75 |
-
$response['error_status'] = 'Invalid Order Number or Invalid Email Address';
|
| 76 |
}
|
|
|
|
| 77 |
$this->getResponse()->setBody(Mage::Helper('core')->jsonEncode($response));
|
| 78 |
}
|
| 79 |
/***
|
|
@@ -89,100 +139,262 @@ class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Contro
|
|
| 89 |
$response = array();
|
| 90 |
$orderId = Mage::getModel('sales/order')->loadByIncrementId($params['order_number'])->getEntityId();
|
| 91 |
$order = Mage::getModel("sales/order")->load($orderId);
|
| 92 |
-
|
| 93 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
$block->setItem($item);
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
$
|
| 114 |
-
$
|
| 115 |
-
|
| 116 |
-
|
|
|
|
|
|
|
|
|
|
| 117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
}
|
| 119 |
-
$response['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
}
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
if (empty($order->getShippingAddress())) {
|
| 124 |
-
$ship_flag = 0;
|
| 125 |
-
} else {
|
| 126 |
-
$ship_flag = 1;
|
| 127 |
-
$shipping = $order->getShippingAddress()->format('html');
|
| 128 |
-
}
|
| 129 |
-
if (empty($order->getBillingAddress())) {
|
| 130 |
-
$bill_flag = 0;
|
| 131 |
-
} else {
|
| 132 |
-
$bill_flag = 1;
|
| 133 |
-
$billing = $order->getBillingAddress()->format('html');
|
| 134 |
-
}
|
| 135 |
|
| 136 |
-
$response['billing_info'] = $billing;
|
| 137 |
-
$response['shipping_info'] = $shipping;
|
| 138 |
-
$response['subtotal'] = '<span class="price">'.number_format($order['subtotal'],2).'</span>';
|
| 139 |
-
$response['shipping'] = '<span class="price">'.number_format($order['shipping_amount'],2).'</span>';
|
| 140 |
-
$response['tax'] = '<span class="price">'.number_format($order['tax_amount'],2).'</span>';
|
| 141 |
-
$response['grandtotal'] = '<span class="price">'.number_format($order->getGrandTotal(),2).'</span>';
|
| 142 |
-
$response['order_number'] =$params['order_number'];
|
| 143 |
$response['order_email'] = $params['order_email'];
|
| 144 |
-
$response['status'] = $order['status'];
|
| 145 |
-
$shipping_method = $order->getShippingDescription();
|
| 146 |
-
$response['carriers'] = $shipping_method;
|
| 147 |
-
foreach($order->getShipmentsCollection() as $shipment)
|
| 148 |
-
{
|
| 149 |
-
$response['shipped_dates'] = date("M d, Y h:i:s A",strtotime($shipment->getCreatedAt()));
|
| 150 |
-
}
|
| 151 |
-
$response['billed_on'] = date("M d, Y h:i:s A",strtotime($order->getCreatedAt()));
|
| 152 |
-
|
| 153 |
-
$this->loadLayout();
|
| 154 |
-
$this->getLayout()
|
| 155 |
-
->getBlock('offlineorder.tracking.track')
|
| 156 |
-
->setTemplate('netsolutions/offlineordertrack/track.phtml');
|
| 157 |
-
$block = $this->getLayout()
|
| 158 |
-
->getBlock('offlineorder.tracking.track');
|
| 159 |
-
$block->setData('order_number',$params['order_number']);
|
| 160 |
-
$block->setData('billing_info',$response['billing_info']);
|
| 161 |
-
$block->setData('shipping_info',$response['shipping_info']);
|
| 162 |
-
$block->setData('subtotal',$response['subtotal']);
|
| 163 |
-
$block->setData('shipping',$response['shipping']);
|
| 164 |
-
$block->setData('tax',$response['tax']);
|
| 165 |
-
$block->setData('grandtotal',$response['grandtotal']);
|
| 166 |
-
$block->setData('status',$response['status']);
|
| 167 |
-
$block->setData('billed_on',$response['billed_on']);
|
| 168 |
-
$block->setData('carriers',$response['carriers']);
|
| 169 |
-
$block->setData('shipped_dates',$response['shipped_dates']);
|
| 170 |
-
$block->setData('orderdetail_header',$response['orderdetail_header']);
|
| 171 |
-
$block->setData('orderdetail_html',$response['orderdetail_html']);
|
| 172 |
-
$block->setData('order_number',$params['order_number']);
|
| 173 |
-
$block->setData('payment',$order->getPayment()->getMethodInstance()->getTitle());
|
| 174 |
-
$this->renderLayout();
|
| 175 |
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
}
|
| 187 |
-
|
|
|
|
| 188 |
}
|
| 1 |
<?php
|
| 2 |
class Netsolutions_Offlineordertrack_TrackingController extends Mage_Core_Controller_Front_Action
|
| 3 |
{
|
| 4 |
+
const XML_PATH_FORGOT_ORDERNUMER_EMAIL = 'netsolconfig/netsol_group/custom_template';
|
| 5 |
+
const XML_PATH_FORGOT_ORDERNUMER_EMAIL_IDENTITY = 'netsolconfig/netsol_group/custom_identity';
|
| 6 |
+
|
| 7 |
/****
|
| 8 |
* render the default layout for track order
|
| 9 |
* **/
|
| 26 |
$response = array();
|
| 27 |
$orderId = Mage::getModel('sales/order')->loadByIncrementId($params['order_number'])->getEntityId();
|
| 28 |
$order = Mage::getModel("sales/order")->load($orderId);
|
| 29 |
+
$fieldmultiselect = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_specific_field');
|
| 30 |
+
$fieldmultiselect = explode(",",$fieldmultiselect);
|
| 31 |
+
/**
|
| 32 |
+
* 1=email
|
| 33 |
+
* 2=zipcode
|
| 34 |
+
* 3=phonenumber
|
| 35 |
+
* */
|
| 36 |
+
|
| 37 |
/** store the ordered customer email address***/
|
| 38 |
+
if(empty($order->getData()))
|
| 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();
|
| 48 |
+
$phonenumber = $billing->getTelephone();
|
| 49 |
+
|
| 50 |
+
$fieldTodisplayemail = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_email');
|
| 51 |
+
$fieldTodisplayzipcode = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_zipcode');
|
| 52 |
+
$fieldTodisplayphonenumber = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_phonenumber');
|
| 53 |
+
|
| 54 |
+
if(in_array(2,$fieldmultiselect) && in_array(3,$fieldmultiselect)){
|
| 55 |
+
$condition = ($zipcode == trim($params['order_zipcode']) && $phonenumber === trim($params['order_phonenumber']));
|
| 56 |
+
}elseif(in_array(2,$fieldmultiselect) && in_array(1,$fieldmultiselect)){
|
| 57 |
+
$condition = ($zipcode == trim($params['order_zipcode']) && $cEmail == trim($params['order_email']));
|
| 58 |
+
}elseif(in_array(2,$fieldmultiselect) && in_array(1,$fieldmultiselect) && in_array(3,$fieldmultiselect)){
|
| 59 |
+
$condition = ($cEmail == trim($params['order_email']) && $zipcode == trim($params['order_zipcode']) && $phonenumber === trim($params['order_phonenumber']));
|
| 60 |
+
}elseif(in_array(3,$fieldmultiselect) && in_array(1,$fieldmultiselect)){
|
| 61 |
+
$condition = ($phonenumber === trim($params['order_phonenumber']) && $cEmail == trim($params['order_email']));
|
| 62 |
+
}elseif(in_array(1,$fieldmultiselect) || in_array(2,$fieldmultiselect) || in_array(3,$fieldmultiselect)){
|
| 63 |
+
$condition = ($cEmail == trim($params['order_email']) || $zipcode == trim($params['order_zipcode']) || $phonenumber === trim($params['order_phonenumber']));
|
| 64 |
+
}else{
|
| 65 |
+
$condition = ($params['order_number'] != '');
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
/* get the block of sales order_item_render_default for custom options value and label */
|
| 69 |
+
$block = Mage::app()->getLayout()->createBlock('sales/order_item_renderer_default');
|
| 70 |
+
|
| 71 |
+
if($condition != '') {
|
| 72 |
+
$response['orderdetail_header'] .='<tr><th>Items</th>';
|
| 73 |
+
foreach($order->getAllVisibleItems() as $item)
|
| 74 |
+
{
|
| 75 |
+
$item->getSku();
|
| 76 |
+
$_product = Mage::getModel('catalog/product')->load($item->getProductId());
|
| 77 |
+
$response['orderdetail_html'] .= '<tr><td><img width="55" height="55" src="'.$_product->getSmallImageUrl().'" class="dataImage"><h3 class="dataName">'.$item->getName().'</h3>';
|
| 78 |
+
|
| 79 |
+
$block->setItem($item);
|
| 80 |
+
|
| 81 |
+
/* get the custom options of products */
|
| 82 |
+
if ($options = $block->getItemOptions()){
|
| 83 |
+
$j=0;
|
| 84 |
+
foreach($options as $option){
|
| 85 |
+
$label[$i] = $option['label'];
|
| 86 |
+
$textvalue[$j] = $option['value'];
|
| 87 |
+
$response['orderdetail_html'] .= '<p class="dataStyle">style #:'.$label[$i].':'.$textvalue[$j].'</p>';
|
| 88 |
+
$j++;
|
| 89 |
+
}
|
| 90 |
}
|
| 91 |
+
$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>';
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
$response['orderdetail_header'] .='<th>Price</th><th>Quantity</th><th class="dataTotal">Total</th></tr>';
|
| 95 |
+
$response['billing_info'] = $order->getBillingAddress()->format('html');
|
| 96 |
+
$response['shipping_info'] = $order->getShippingAddress()->format('html');
|
| 97 |
+
$response['subtotal'] = '<span class="price">'.number_format($order['subtotal'],2).'</span>';
|
| 98 |
+
$response['shipping'] = '<span class="price">'.number_format($order['shipping_amount'],2).'</span>';
|
| 99 |
+
$response['tax'] = '<span class="price">'.number_format($order['tax_amount'],2).'</span>';
|
| 100 |
+
$response['discount'] = '<span class="price">'.number_format($order['discount_amount'],2).'</span>';
|
| 101 |
+
$response['grandtotal'] = '<span class="price">'.number_format($order->getGrandTotal(),2).'</span>';
|
| 102 |
+
$response['order_number'] =$params['order_number'];
|
| 103 |
+
$response['order_email'] = $params['order_email'];
|
| 104 |
+
$response['status'] = $order['status'];
|
| 105 |
+
$shipping_method = $order->getShippingDescription();
|
| 106 |
+
$response['payment'] = $order->getPayment()->getMethodInstance()->getTitle();
|
| 107 |
+
$response['carriers'] = $shipping_method;
|
| 108 |
+
|
| 109 |
+
foreach($order->getShipmentsCollection() as $shipment)
|
| 110 |
+
{
|
| 111 |
+
$response['shipped_dates'] = date("M d, Y h:i:s A",strtotime($shipment->getCreatedAt()));
|
| 112 |
}
|
| 113 |
+
$response['billed_on'] = date("M d, Y h:i:s A",strtotime($order->getCreatedAt()));
|
| 114 |
+
|
| 115 |
+
}else{
|
| 116 |
+
$errormsg = 'Entered data is incorrect.Please try again.';
|
| 117 |
+
$response['error_status'] = $errormsg;
|
| 118 |
}
|
| 119 |
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
if($params['order_number'] == ''){
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
$response['order_number'] =$params['order_number'];
|
| 124 |
+
$response['error_status'] = 'Please fill the required field';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
+
|
| 127 |
$this->getResponse()->setBody(Mage::Helper('core')->jsonEncode($response));
|
| 128 |
}
|
| 129 |
/***
|
| 139 |
$response = array();
|
| 140 |
$orderId = Mage::getModel('sales/order')->loadByIncrementId($params['order_number'])->getEntityId();
|
| 141 |
$order = Mage::getModel("sales/order")->load($orderId);
|
| 142 |
+
$fieldmultiselect = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_specific_field');
|
| 143 |
+
$fieldmultiselect = explode(",",$fieldmultiselect);
|
| 144 |
+
/**
|
| 145 |
+
* 1=email
|
| 146 |
+
* 2=zipcode
|
| 147 |
+
* 3=phonenumber
|
| 148 |
+
* */
|
| 149 |
+
if(empty($order->getData()))
|
| 150 |
+
{
|
| 151 |
+
$errormsg = 'Entered data is incorrect.Please try again.';
|
| 152 |
+
$response['error_status'] = $errormsg;
|
| 153 |
+
}
|
| 154 |
|
| 155 |
+
if(!empty($order->getData())){
|
| 156 |
+
/** store the ordered customer email address***/
|
| 157 |
+
$cEmail = $order->getCustomerEmail();
|
| 158 |
+
$billing = $order->getBillingAddress();
|
| 159 |
+
$zipcode = $billing->getPostcode();
|
| 160 |
+
$phonenumber = $billing->getTelephone();
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
if(in_array(2,$fieldmultiselect) && in_array(3,$fieldmultiselect)){
|
| 164 |
+
$condition = ($zipcode == trim($params['order_zipcode']) && $phonenumber === trim($params['order_phonenumber']));
|
| 165 |
+
}elseif(in_array(2,$fieldmultiselect) && in_array(1,$fieldmultiselect)){
|
| 166 |
+
$condition = ($zipcode == trim($params['order_zipcode']) && $cEmail == trim($params['order_email']));
|
| 167 |
+
}elseif(in_array(2,$fieldmultiselect) && in_array(1,$fieldmultiselect) && in_array(3,$fieldmultiselect)){
|
| 168 |
+
$condition = ($cEmail == trim($params['order_email']) && $zipcode == trim($params['order_zipcode']) && $phonenumber === trim($params['order_phonenumber']));
|
| 169 |
+
}elseif(in_array(3,$fieldmultiselect) && in_array(1,$fieldmultiselect)){
|
| 170 |
+
$condition = ($phonenumber === trim($params['order_phonenumber']) && $cEmail == trim($params['order_email']));
|
| 171 |
+
}elseif(in_array(1,$fieldmultiselect) || in_array(2,$fieldmultiselect) || in_array(3,$fieldmultiselect)){
|
| 172 |
+
$condition = ($cEmail == trim($params['order_email']) || $zipcode == trim($params['order_zipcode']) || $phonenumber === trim($params['order_phonenumber']));
|
| 173 |
+
}
|
| 174 |
|
| 175 |
+
/* get the block of sales order_item_render_default for custom options value and label */
|
| 176 |
+
$block = Mage::app()->getLayout()->createBlock('sales/order_item_renderer_default');
|
| 177 |
+
|
| 178 |
|
| 179 |
+
if ($condition != '') {
|
| 180 |
+
$ship_flag = '';
|
| 181 |
+
$response['orderdetail_header'] .='<tr><th>Items</th>';
|
| 182 |
+
foreach($order->getAllVisibleItems() as $item)
|
| 183 |
+
{
|
| 184 |
+
$item->getSku();
|
| 185 |
+
$_product = Mage::getModel('catalog/product')->load($item->getProductId());
|
| 186 |
+
$response['orderdetail_html'] .= '<tr><td><img width="55" height="55" src="'.$_product->getSmallImageUrl().'" class="dataImage"><h3 class="dataName">'.$item->getName().'</h3>';
|
|
|
|
| 187 |
|
| 188 |
+
$block->setItem($item);
|
| 189 |
+
$i = 0;
|
| 190 |
+
/* get the custom options of products */
|
| 191 |
+
if ($options = $block->getItemOptions()){
|
| 192 |
+
$j=0;
|
| 193 |
+
foreach($options as $option){
|
| 194 |
+
$label[$i] = $option['label'];
|
| 195 |
+
$textvalue[$j] = $option['value'];
|
| 196 |
+
$response['orderdetail_html'] .= '<p class="dataStyle">style #:'.$label[$i].':'.$textvalue[$j].'</p>';
|
| 197 |
+
$j++;
|
| 198 |
+
}
|
| 199 |
}
|
| 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 |
+
if (empty($order->getShippingAddress())) {
|
| 205 |
+
$ship_flag = 0;
|
| 206 |
+
} else {
|
| 207 |
+
$ship_flag = 1;
|
| 208 |
+
$shipping = $order->getShippingAddress()->format('html');
|
| 209 |
+
}
|
| 210 |
+
if (empty($order->getBillingAddress())) {
|
| 211 |
+
$bill_flag = 0;
|
| 212 |
+
} else {
|
| 213 |
+
$bill_flag = 1;
|
| 214 |
+
$billing = $order->getBillingAddress()->format('html');
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
$response['billing_info'] = $billing;
|
| 218 |
+
$response['shipping_info'] = $shipping;
|
| 219 |
+
$response['subtotal'] = '<span class="price">'.number_format($order['subtotal'],2).'</span>';
|
| 220 |
+
$response['shipping'] = '<span class="price">'.number_format($order['shipping_amount'],2).'</span>';
|
| 221 |
+
$response['tax'] = '<span class="price">'.number_format($order['tax_amount'],2).'</span>';
|
| 222 |
+
$response['discount'] = '<span class="price">'.number_format($order['discount_amount'],2).'</span>';
|
| 223 |
+
$response['grandtotal'] = '<span class="price">'.number_format($order->getGrandTotal(),2).'</span>';
|
| 224 |
+
$response['order_number'] =$params['order_number'];
|
| 225 |
+
$response['order_email'] = $params['order_email'];
|
| 226 |
+
$response['status'] = $order['status'];
|
| 227 |
+
$shipping_method = $order->getShippingDescription();
|
| 228 |
+
$response['carriers'] = $shipping_method;
|
| 229 |
+
foreach($order->getShipmentsCollection() as $shipment)
|
| 230 |
+
{
|
| 231 |
+
$response['shipped_dates'] = date("M d, Y h:i:s A",strtotime($shipment->getCreatedAt()));
|
| 232 |
}
|
| 233 |
+
$response['billed_on'] = date("M d, Y h:i:s A",strtotime($order->getCreatedAt()));
|
| 234 |
+
|
| 235 |
+
$this->loadLayout();
|
| 236 |
+
$this->getLayout()
|
| 237 |
+
->getBlock('offlineorder.tracking.track')
|
| 238 |
+
->setTemplate('netsolutions/offlineordertrack/track.phtml');
|
| 239 |
+
$block = $this->getLayout()
|
| 240 |
+
->getBlock('offlineorder.tracking.track');
|
| 241 |
+
$block->setData('order_number',$params['order_number']);
|
| 242 |
+
$block->setData('billing_info',$response['billing_info']);
|
| 243 |
+
$block->setData('shipping_info',$response['shipping_info']);
|
| 244 |
+
$block->setData('subtotal',$response['subtotal']);
|
| 245 |
+
$block->setData('shipping',$response['shipping']);
|
| 246 |
+
$block->setData('tax',$response['tax']);
|
| 247 |
+
$block->setData('discount',$response['discount']);
|
| 248 |
+
$block->setData('grandtotal',$response['grandtotal']);
|
| 249 |
+
$block->setData('status',$response['status']);
|
| 250 |
+
$block->setData('billed_on',$response['billed_on']);
|
| 251 |
+
$block->setData('carriers',$response['carriers']);
|
| 252 |
+
$block->setData('shipped_dates',$response['shipped_dates']);
|
| 253 |
+
$block->setData('orderdetail_header',$response['orderdetail_header']);
|
| 254 |
+
$block->setData('orderdetail_html',$response['orderdetail_html']);
|
| 255 |
+
$block->setData('order_number',$params['order_number']);
|
| 256 |
+
$block->setData('payment',$order->getPayment()->getMethodInstance()->getTitle());
|
| 257 |
+
$this->renderLayout();
|
| 258 |
+
|
| 259 |
+
}else{
|
| 260 |
+
|
| 261 |
+
$this->loadLayout();
|
| 262 |
+
$this->getLayout()
|
| 263 |
+
->getBlock('offlineorder.tracking.track')
|
| 264 |
+
->setTemplate('netsolutions/offlineordertrack/track.phtml');
|
| 265 |
+
$block = $this->getLayout()
|
| 266 |
+
->getBlock('offlineorder.tracking.track');
|
| 267 |
+
$errormsg = 'Entered data is incorrect.Please try again.';
|
| 268 |
+
$block->setData('error_status',$errormsg);
|
| 269 |
+
$this->renderLayout();
|
| 270 |
}
|
| 271 |
+
}
|
| 272 |
+
}
|
| 273 |
+
/**
|
| 274 |
+
* Retrieve Order Number or Id from email address
|
| 275 |
+
*
|
| 276 |
+
*
|
| 277 |
+
* @return collection order number
|
| 278 |
+
* */
|
| 279 |
+
public function forgotajaxAction()
|
| 280 |
+
{
|
| 281 |
+
|
| 282 |
+
$params = $this->getRequest()->getParams();
|
| 283 |
+
$params['order_email'];
|
| 284 |
+
$response = array();
|
| 285 |
+
|
| 286 |
+
if($params['order_email']!= ''){
|
| 287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
$response['order_email'] = $params['order_email'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
|
| 291 |
+
$ordercustomername = Mage::getResourceModel('sales/order_collection')
|
| 292 |
+
->addFieldToSelect('customer_firstname')
|
| 293 |
+
->addFieldToSelect('customer_lastname')
|
| 294 |
+
->addFieldToFilter('customer_email',$response['order_email'])
|
| 295 |
+
->getFirstItem();
|
| 296 |
+
if(count($ordercustomername)>0){
|
| 297 |
+
$customername = $ordercustomername->getCustomerFirstname().' '.$ordercustomername->getCustomerLastname();
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
$ordertrack = Mage::getModel('offlineordertrack/ordertrack')->getCollection()
|
| 301 |
+
->addFieldToSelect('ordertrack_id')
|
| 302 |
+
->addFieldToSelect('emailtime')
|
| 303 |
+
->addFieldToSelect('email')
|
| 304 |
+
->addFieldToFilter('email',$response['order_email'])
|
| 305 |
+
->getFirstItem();
|
| 306 |
+
|
| 307 |
+
if($ordertrack['emailtime'] !='' && $ordertrack['email'] == $response['order_email']){
|
| 308 |
+
//$date = Mage::getModel('core/date')->gmtDate();
|
| 309 |
+
$date = Mage::getModel('core/date')->date('Y-m-d H:i:s');
|
| 310 |
+
|
| 311 |
+
$dateA = $ordertrack['emailtime'];
|
| 312 |
+
|
| 313 |
+
$dateB = $date;
|
| 314 |
+
|
| 315 |
+
$timediff = strtotime($dateB) - strtotime($dateA);
|
| 316 |
+
|
| 317 |
+
if($timediff >= 86400){
|
| 318 |
+
|
| 319 |
+
/** @var Mage_Core_Model_Template**/
|
| 320 |
+
//$response['order_email'] = 'asha.rajputsai@gmail.com';
|
| 321 |
+
$translate = Mage::getSingleton('core/translate');
|
| 322 |
+
$translate->setTranslateInline(false);
|
| 323 |
+
$storeId = Mage::app()->getStore()->getId();
|
| 324 |
+
|
| 325 |
+
$mailTemplate = Mage::getModel('core/email_template');
|
| 326 |
+
|
| 327 |
+
$mailTemplate->setDesignConfig(array('area'=>'frontend'))
|
| 328 |
+
->sendTransactional(
|
| 329 |
+
Mage::getStoreConfig(self::XML_PATH_FORGOT_ORDERNUMER_EMAIL),
|
| 330 |
+
Mage::getStoreConfig(self::XML_PATH_FORGOT_ORDERNUMER_EMAIL_IDENTITY),
|
| 331 |
+
$response['order_email'],
|
| 332 |
+
array(
|
| 333 |
+
'name' => ucwords($customername),
|
| 334 |
+
'email' => $response['order_email'],
|
| 335 |
+
)
|
| 336 |
+
);
|
| 337 |
+
$translate->setTranslateInline(true);
|
| 338 |
+
$ordertrack = Mage::getModel('offlineordertrack/ordertrack')->load($ordertrack['ordertrack_id']);
|
| 339 |
+
// ->addFieldToFilter('email',$response['order_email']);
|
| 340 |
+
//$date = Mage::getModel('core/date')->gmtDate();
|
| 341 |
+
|
| 342 |
+
$date = Mage::getModel('core/date')->date('Y-m-d H:i:s');
|
| 343 |
+
$data=array(
|
| 344 |
+
'emailtime'=>$date,
|
| 345 |
+
'email'=>$response['order_email'],
|
| 346 |
+
);
|
| 347 |
+
$ordertrack->setEmailtime($date);
|
| 348 |
+
$ordertrack->save();
|
| 349 |
+
$response['error_status'] = 'Order Numer with respect to email address is sent to your email address.';
|
| 350 |
+
}
|
| 351 |
+
else
|
| 352 |
+
{
|
| 353 |
+
//echo 'less than 24 hours';
|
| 354 |
+
$response['error_status'] = 'Only one email can be send within 24hrs';
|
| 355 |
+
}
|
| 356 |
+
}else{
|
| 357 |
+
$ordercollection = Mage::getResourceModel('sales/order_collection')
|
| 358 |
+
->addFieldToSelect('*')
|
| 359 |
+
->addFieldToFilter('customer_email',$response['order_email']);
|
| 360 |
+
//print_r($ordercollection->getData()); die;
|
| 361 |
+
if(!empty($ordercollection->getData()))
|
| 362 |
+
{
|
| 363 |
+
/** @var Mage_Core_Model_Template**/
|
| 364 |
+
//$response['order_email'] = 'asha.rajputsai@gmail.com';
|
| 365 |
+
|
| 366 |
+
$translate = Mage::getSingleton('core/translate');
|
| 367 |
+
$translate->setTranslateInline(false);
|
| 368 |
+
$storeId = Mage::app()->getStore()->getId();
|
| 369 |
+
|
| 370 |
+
$mailTemplate = Mage::getModel('core/email_template');
|
| 371 |
+
|
| 372 |
+
$mailTemplate->setDesignConfig(array('area'=>'frontend'))
|
| 373 |
+
->sendTransactional(
|
| 374 |
+
Mage::getStoreConfig(self::XML_PATH_FORGOT_ORDERNUMER_EMAIL),
|
| 375 |
+
Mage::getStoreConfig(self::XML_PATH_FORGOT_ORDERNUMER_EMAIL_IDENTITY),
|
| 376 |
+
$response['order_email'],
|
| 377 |
+
array(
|
| 378 |
+
'name' => ucwords($customername),
|
| 379 |
+
'email' => $response['order_email'],
|
| 380 |
+
)
|
| 381 |
+
);
|
| 382 |
+
$translate->setTranslateInline(true);
|
| 383 |
+
|
| 384 |
+
//$date = Mage::getModel('core/date')->gmtDate();
|
| 385 |
+
$date = Mage::getModel('core/date')->date('Y-m-d H:i:s');
|
| 386 |
+
$data=array(
|
| 387 |
+
'emailtime'=>$date,
|
| 388 |
+
'email'=>$response['order_email'],
|
| 389 |
+
);
|
| 390 |
+
$model=Mage::getModel('offlineordertrack/ordertrack')->addData($data);
|
| 391 |
+
$model->save();
|
| 392 |
+
$response['error_status'] = 'Order Numer with respect to email address is sent to your email address.';
|
| 393 |
+
}else{
|
| 394 |
+
$response['error_status'] = 'No order place with this email address';
|
| 395 |
+
}
|
| 396 |
+
}
|
| 397 |
}
|
| 398 |
+
$this->getResponse()->setBody(Mage::Helper('core')->jsonEncode($response));
|
| 399 |
+
}
|
| 400 |
}
|
app/code/community/Netsolutions/Offlineordertrack/etc/config.xml
CHANGED
|
@@ -2,15 +2,44 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Netsolutions_Offlineordertrack>
|
| 5 |
-
<version>1.
|
| 6 |
</Netsolutions_Offlineordertrack>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 9 |
<models>
|
| 10 |
<offlineordertrack>
|
| 11 |
<class>Netsolutions_Offlineordertrack_Model</class>
|
|
|
|
| 12 |
</offlineordertrack>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
</models>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
<blocks>
|
| 15 |
<offlineordertrack>
|
| 16 |
<class>Netsolutions_Offlineordertrack_Block</class>
|
|
@@ -21,6 +50,15 @@
|
|
| 21 |
<class>Netsolutions_Offlineordertrack_Helper</class>
|
| 22 |
</offlineordertrack>
|
| 23 |
</helpers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
</global>
|
| 25 |
<frontend>
|
| 26 |
<routers>
|
|
@@ -54,6 +92,10 @@
|
|
| 54 |
<netsol_suspected_fraud>Suspected Fraud</netsol_suspected_fraud>
|
| 55 |
<netsol_canceled>Canceled</netsol_canceled>
|
| 56 |
</netsol_status_group>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
</netsolconfig>
|
| 58 |
</default>
|
| 59 |
</config>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Netsolutions_Offlineordertrack>
|
| 5 |
+
<version>1.1.1</version>
|
| 6 |
</Netsolutions_Offlineordertrack>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 9 |
<models>
|
| 10 |
<offlineordertrack>
|
| 11 |
<class>Netsolutions_Offlineordertrack_Model</class>
|
| 12 |
+
<resourceModel>offlineordertrack_mysql4</resourceModel>
|
| 13 |
</offlineordertrack>
|
| 14 |
+
<offlineordertrack_mysql4>
|
| 15 |
+
<class>Netsolutions_Offlineordertrack_Model_Mysql4</class>
|
| 16 |
+
<entities>
|
| 17 |
+
<ordertrack>
|
| 18 |
+
<table>ordertrack</table>
|
| 19 |
+
</ordertrack>
|
| 20 |
+
</entities>
|
| 21 |
+
</offlineordertrack_mysql4>
|
| 22 |
</models>
|
| 23 |
+
<resources>
|
| 24 |
+
<offlineordertrack_setup>
|
| 25 |
+
<setup>
|
| 26 |
+
<module>Netsolutions_Offlineordertrack</module>
|
| 27 |
+
</setup>
|
| 28 |
+
<connection>
|
| 29 |
+
<use>core_setup</use>
|
| 30 |
+
</connection>
|
| 31 |
+
</offlineordertrack_setup>
|
| 32 |
+
<offlineordertrack_write>
|
| 33 |
+
<connection>
|
| 34 |
+
<use>core_write</use>
|
| 35 |
+
</connection>
|
| 36 |
+
</offlineordertrack_write>
|
| 37 |
+
<offlineordertrack_read>
|
| 38 |
+
<connection>
|
| 39 |
+
<use>core_read</use>
|
| 40 |
+
</connection>
|
| 41 |
+
</offlineordertrack_read>
|
| 42 |
+
</resources>
|
| 43 |
<blocks>
|
| 44 |
<offlineordertrack>
|
| 45 |
<class>Netsolutions_Offlineordertrack_Block</class>
|
| 50 |
<class>Netsolutions_Offlineordertrack_Helper</class>
|
| 51 |
</offlineordertrack>
|
| 52 |
</helpers>
|
| 53 |
+
<template>
|
| 54 |
+
<email>
|
| 55 |
+
<netsolconfig_netsol_group_custom_template translate="label" module="offlineordertrack">
|
| 56 |
+
<label>Forgot Order Number Notification</label>
|
| 57 |
+
<file>forgotordernumbermail.html</file>
|
| 58 |
+
<type>html</type>
|
| 59 |
+
</netsolconfig_netsol_group_custom_template>
|
| 60 |
+
</email>
|
| 61 |
+
</template>
|
| 62 |
</global>
|
| 63 |
<frontend>
|
| 64 |
<routers>
|
| 92 |
<netsol_suspected_fraud>Suspected Fraud</netsol_suspected_fraud>
|
| 93 |
<netsol_canceled>Canceled</netsol_canceled>
|
| 94 |
</netsol_status_group>
|
| 95 |
+
<netsol_group>
|
| 96 |
+
<custom_identity>general</custom_identity>
|
| 97 |
+
<custom_template>netsolconfig_netsol_group_custom_template</custom_template>
|
| 98 |
+
</netsol_group>
|
| 99 |
</netsolconfig>
|
| 100 |
</default>
|
| 101 |
</config>
|
app/code/community/Netsolutions/Offlineordertrack/etc/system.xml
CHANGED
|
@@ -41,11 +41,70 @@
|
|
| 41 |
<show_in_default>1</show_in_default>
|
| 42 |
<show_in_website>1</show_in_website>
|
| 43 |
<show_in_store>1</show_in_store>
|
| 44 |
-
<comment>Set to Yes
|
| 45 |
</netsol_ajax_enable>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
</fields>
|
| 47 |
</netsol_group>
|
| 48 |
-
|
| 49 |
<label>Status Titles</label>
|
| 50 |
<sort_order>110</sort_order>
|
| 51 |
<show_in_default>1</show_in_default>
|
|
@@ -133,7 +192,7 @@
|
|
| 133 |
<show_in_store>1</show_in_store>
|
| 134 |
</netsol_canceled>
|
| 135 |
</fields>
|
| 136 |
-
</netsol_status_group
|
| 137 |
</groups>
|
| 138 |
</netsolconfig>
|
| 139 |
</sections>
|
| 41 |
<show_in_default>1</show_in_default>
|
| 42 |
<show_in_website>1</show_in_website>
|
| 43 |
<show_in_store>1</show_in_store>
|
| 44 |
+
<comment>Set to Yes if you want ajax loading .</comment>
|
| 45 |
</netsol_ajax_enable>
|
| 46 |
+
<netsol_specific_field>
|
| 47 |
+
<label>Field To be display at frontend</label>
|
| 48 |
+
<frontend_type>multiselect</frontend_type>
|
| 49 |
+
<source_model>offlineordertrack/system_config_source_view</source_model>
|
| 50 |
+
<sort_order>2</sort_order>
|
| 51 |
+
<show_in_default>1</show_in_default>
|
| 52 |
+
<show_in_website>1</show_in_website>
|
| 53 |
+
<show_in_store>1</show_in_store>
|
| 54 |
+
<comment>Field to display at frontend</comment>
|
| 55 |
+
<validate>validate-select</validate>
|
| 56 |
+
</netsol_specific_field>
|
| 57 |
+
<!--<netsol_email translate="label comment">
|
| 58 |
+
<label>Email Address</label>
|
| 59 |
+
<frontend_type>select</frontend_type>
|
| 60 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 61 |
+
<sort_order>2</sort_order>
|
| 62 |
+
<show_in_default>1</show_in_default>
|
| 63 |
+
<show_in_website>1</show_in_website>
|
| 64 |
+
<show_in_store>1</show_in_store>
|
| 65 |
+
<comment>Field to display at frontend</comment>
|
| 66 |
+
</netsol_email>
|
| 67 |
+
<netsol_zipcode translate="label comment">
|
| 68 |
+
<label>Zipcode</label>
|
| 69 |
+
<frontend_type>select</frontend_type>
|
| 70 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 71 |
+
<sort_order>3</sort_order>
|
| 72 |
+
<show_in_default>1</show_in_default>
|
| 73 |
+
<show_in_website>1</show_in_website>
|
| 74 |
+
<show_in_store>1</show_in_store>
|
| 75 |
+
<comment>Field to display at frontend</comment>
|
| 76 |
+
</netsol_zipcode>
|
| 77 |
+
<netsol_phonenumber translate="label comment">
|
| 78 |
+
<label>Phone Number</label>
|
| 79 |
+
<frontend_type>select</frontend_type>
|
| 80 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 81 |
+
<sort_order>4</sort_order>
|
| 82 |
+
<show_in_default>1</show_in_default>
|
| 83 |
+
<show_in_website>1</show_in_website>
|
| 84 |
+
<show_in_store>1</show_in_store>
|
| 85 |
+
<comment>Field to display at frontend</comment>
|
| 86 |
+
</netsol_phonenumber>-->
|
| 87 |
+
<custom_template translate="label">
|
| 88 |
+
<label>Custom Email</label>
|
| 89 |
+
<frontend_type>select</frontend_type>
|
| 90 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
| 91 |
+
<sort_order>5</sort_order>
|
| 92 |
+
<show_in_default>1</show_in_default>
|
| 93 |
+
<show_in_website>1</show_in_website>
|
| 94 |
+
<show_in_store>1</show_in_store>
|
| 95 |
+
</custom_template>
|
| 96 |
+
<custom_identity translate="label">
|
| 97 |
+
<label>Email Sender</label>
|
| 98 |
+
<frontend_type>select</frontend_type>
|
| 99 |
+
<source_model>adminhtml/system_config_source_email_identity</source_model>
|
| 100 |
+
<sort_order>6</sort_order>
|
| 101 |
+
<show_in_default>1</show_in_default>
|
| 102 |
+
<show_in_website>1</show_in_website>
|
| 103 |
+
<show_in_store>1</show_in_store>
|
| 104 |
+
</custom_identity>
|
| 105 |
</fields>
|
| 106 |
</netsol_group>
|
| 107 |
+
<!-- <netsol_status_group translate="label">
|
| 108 |
<label>Status Titles</label>
|
| 109 |
<sort_order>110</sort_order>
|
| 110 |
<show_in_default>1</show_in_default>
|
| 192 |
<show_in_store>1</show_in_store>
|
| 193 |
</netsol_canceled>
|
| 194 |
</fields>
|
| 195 |
+
</netsol_status_group>-->
|
| 196 |
</groups>
|
| 197 |
</netsolconfig>
|
| 198 |
</sections>
|
app/code/community/Netsolutions/Offlineordertrack/sql/offlineordertrack_setup/mysql4-install-1.0.1.php
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$installer = $this;
|
| 3 |
+
$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` datetime DEFAULT CURRENT_TIMESTAMP,
|
| 8 |
+
`email` varchar(255) NOT NULL DEFAULT '',
|
| 9 |
+
PRIMARY KEY (`ordertrack_id`)
|
| 10 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
| 11 |
+
");
|
| 12 |
+
$installer->endSetup();
|
| 13 |
+
?>
|
app/design/frontend/base/default/layout/offlineordertrack.xml
CHANGED
|
@@ -15,6 +15,7 @@
|
|
| 15 |
<offlineordertrack_tracking_index>
|
| 16 |
<reference name="content">
|
| 17 |
<block type="offlineordertrack/tracking" name="offlineorder.tracking" template="netsolutions/offlineordertrack/view.phtml"/>
|
|
|
|
| 18 |
</reference>
|
| 19 |
</offlineordertrack_tracking_index>
|
| 20 |
<offlineordertrack_tracking_ordertrack>
|
| 15 |
<offlineordertrack_tracking_index>
|
| 16 |
<reference name="content">
|
| 17 |
<block type="offlineordertrack/tracking" name="offlineorder.tracking" template="netsolutions/offlineordertrack/view.phtml"/>
|
| 18 |
+
|
| 19 |
</reference>
|
| 20 |
</offlineordertrack_tracking_index>
|
| 21 |
<offlineordertrack_tracking_ordertrack>
|
app/design/frontend/base/default/template/netsolutions/offlineordertrack/email/mail.phtml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
$email = $this->getEmail();
|
| 3 |
+
$ordercollection = Mage::getResourceModel('sales/order_collection')
|
| 4 |
+
->addFieldToSelect('increment_id','order_no')
|
| 5 |
+
->addFieldToFilter('customer_email',$email);
|
| 6 |
+
?>
|
| 7 |
+
<?php foreach($ordercollection as $order): ?>
|
| 8 |
+
<li style="list-style:none inside; padding:0 0 0 10px;">
|
| 9 |
+
<a href="<?php echo Mage::getBaseUrl();?>offlineordertrack/tracking/index/" target="_blank">
|
| 10 |
+
<?php echo $order['order_no']; ?>
|
| 11 |
+
</a>
|
| 12 |
+
</li>
|
| 13 |
+
<?php endforeach; ?>
|
app/design/frontend/base/default/template/netsolutions/offlineordertrack/track.phtml
CHANGED
|
@@ -7,6 +7,7 @@ $helper = $this->helper('offlineordertrack');
|
|
| 7 |
?>
|
| 8 |
<?php if($this->error_status){?>
|
| 9 |
<div id="error_status"><?php echo $this->error_status; ?></div>
|
|
|
|
| 10 |
<?php }else{?>
|
| 11 |
<div id="order-result" class="orderResult">
|
| 12 |
<div class="rsNo"><span class="noText">Order #</span><span id="no-value" class="noNumber"><?php echo $this->order_number; ?></span></div>
|
|
@@ -19,7 +20,7 @@ $helper = $this->helper('offlineordertrack');
|
|
| 19 |
<li id="status1-closed" class="<?php echo ($this->status == 'closed')? 'active' :''?>">Closed</li>
|
| 20 |
</ul>
|
| 21 |
</div>
|
| 22 |
-
<div class="rsStatus2"><span class="status2Text">Order status: </span><span id="status2-value" class="status2Value"><?php echo $this->status; ?></span></div>
|
| 23 |
<div id="rs-carrier" class="rsCarrier" style="display: block;"><span class="carrierText">Carrier: </span><span id="carrier-value" class="carrierValue"><?php echo $this->carriers; ?></span></div>
|
| 24 |
<div class="rsBilled"><span class="billedText">Billed on: </span><span id="billed-value" class="billedValue"><?php echo $this->billed_on; ?></span></div>
|
| 25 |
<div id="rs-shipped" class="rsShipped" style="display: block;"><span class="shippedText">Shipped on: </span><span id="shipped-value" class="shippedValue"><?php echo $this->shipped_dates; ?></span></div>
|
|
@@ -54,12 +55,16 @@ $helper = $this->helper('offlineordertrack');
|
|
| 54 |
<td class="s-text">Tax</td>
|
| 55 |
<td id="s-tax"><?php echo $this->tax;?></td>
|
| 56 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
<tr>
|
| 58 |
<td class="s-text"><strong>Grand Total</strong></td>
|
| 59 |
<td class="sTotal" id="s-total"><?php echo $this->grandtotal; ?></td>
|
| 60 |
</tr>
|
| 61 |
<tr>
|
| 62 |
-
<td class="sPayment" id="s-payment" colspan="2"
|
| 63 |
</tr>
|
| 64 |
</tbody></table>
|
| 65 |
</div>
|
| 7 |
?>
|
| 8 |
<?php if($this->error_status){?>
|
| 9 |
<div id="error_status"><?php echo $this->error_status; ?></div>
|
| 10 |
+
<a href="<?php echo $this->ordertrackUrl(); ?>">Back</a>
|
| 11 |
<?php }else{?>
|
| 12 |
<div id="order-result" class="orderResult">
|
| 13 |
<div class="rsNo"><span class="noText">Order #</span><span id="no-value" class="noNumber"><?php echo $this->order_number; ?></span></div>
|
| 20 |
<li id="status1-closed" class="<?php echo ($this->status == 'closed')? 'active' :''?>">Closed</li>
|
| 21 |
</ul>
|
| 22 |
</div>
|
| 23 |
+
<div class="rsStatus2"><span class="status2Text">Order status: </span><span id="status2-value" class="status2Value"><?php echo ucwords($this->status); ?></span></div>
|
| 24 |
<div id="rs-carrier" class="rsCarrier" style="display: block;"><span class="carrierText">Carrier: </span><span id="carrier-value" class="carrierValue"><?php echo $this->carriers; ?></span></div>
|
| 25 |
<div class="rsBilled"><span class="billedText">Billed on: </span><span id="billed-value" class="billedValue"><?php echo $this->billed_on; ?></span></div>
|
| 26 |
<div id="rs-shipped" class="rsShipped" style="display: block;"><span class="shippedText">Shipped on: </span><span id="shipped-value" class="shippedValue"><?php echo $this->shipped_dates; ?></span></div>
|
| 55 |
<td class="s-text">Tax</td>
|
| 56 |
<td id="s-tax"><?php echo $this->tax;?></td>
|
| 57 |
</tr>
|
| 58 |
+
<tr>
|
| 59 |
+
<td class="s-text">Discount</td>
|
| 60 |
+
<td id="s-tax-discount"><?php echo $this->discount;?></td>
|
| 61 |
+
</tr>
|
| 62 |
<tr>
|
| 63 |
<td class="s-text"><strong>Grand Total</strong></td>
|
| 64 |
<td class="sTotal" id="s-total"><?php echo $this->grandtotal; ?></td>
|
| 65 |
</tr>
|
| 66 |
<tr>
|
| 67 |
+
<td class="sPayment" id="s-payment" colspan="2"><?php echo $this->payment; ?></td>
|
| 68 |
</tr>
|
| 69 |
</tbody></table>
|
| 70 |
</div>
|
app/design/frontend/base/default/template/netsolutions/offlineordertrack/view.phtml
CHANGED
|
@@ -4,9 +4,12 @@
|
|
| 4 |
*
|
| 5 |
* **/
|
| 6 |
$helper = $this->helper('offlineordertrack');
|
|
|
|
|
|
|
| 7 |
?>
|
|
|
|
| 8 |
<?php if(Mage::Helper('offlineordertrack')->getIsEnabled()): ////if my module is enabled?>
|
| 9 |
-
<div>
|
| 10 |
<div class="page-title">
|
| 11 |
<h1><?php echo $this->__('Track Your Order'); ?></h1>
|
| 12 |
</div>
|
|
@@ -16,24 +19,54 @@ $helper = $this->helper('offlineordertrack');
|
|
| 16 |
<div class="field">
|
| 17 |
<label class="required" for="order:number">Order Number</label>
|
| 18 |
<div class="input-box">
|
| 19 |
-
<input type="text" class="input-text required-entry
|
| 20 |
</div>
|
| 21 |
</div>
|
| 22 |
-
<div class="field">
|
| 23 |
<label class="required" for="order:email">Email Address</label>
|
| 24 |
<div class="input-box">
|
| 25 |
-
<input type="text" class="input-text validate-email required-entry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
</div>
|
| 27 |
</div>
|
|
|
|
| 28 |
</div>
|
| 29 |
-
<button class="button track-order
|
| 30 |
<div id="div-loading" class="divLoading" style="display: none;">
|
| 31 |
<span class="loadingAjax">Loading</span>
|
| 32 |
</div>
|
| 33 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
</div>
|
| 35 |
<div id="error_status"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
</div>
|
|
|
|
| 37 |
<div id="order-result" class="orderResult" style="display: none;">
|
| 38 |
<div class="rsNo"><span class="noText">Order #</span><span id="no-value" class="noNumber"></span></div>
|
| 39 |
<div class="rsStatus1">
|
|
@@ -79,6 +112,10 @@ $helper = $this->helper('offlineordertrack');
|
|
| 79 |
<td class="s-text">Tax</td>
|
| 80 |
<td id="s-tax"></td>
|
| 81 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
<tr>
|
| 83 |
<td class="s-text"><strong>Grand Total</strong></td>
|
| 84 |
<td class="sTotal" id="s-total"></td>
|
|
@@ -125,10 +162,14 @@ $helper = $this->helper('offlineordertrack');
|
|
| 125 |
</div>
|
| 126 |
</div>
|
| 127 |
<?php $ajaxEnabled = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_ajax_enable');?>
|
|
|
|
|
|
|
| 128 |
<script type="text/javascript">
|
| 129 |
-
|
| 130 |
var orderForm = new VarienForm('track-order-form', true);
|
| 131 |
-
|
|
|
|
|
|
|
| 132 |
if ( typeof jQuery == 'undefined')
|
| 133 |
{
|
| 134 |
var script=document.createElement('script');
|
|
@@ -183,7 +224,7 @@ if ( typeof jQuery == 'undefined')
|
|
| 183 |
} else if (orderstatus === 'complete') {
|
| 184 |
removeActiveClass();
|
| 185 |
jQuery('#status1-completed').addClass('active');
|
| 186 |
-
} else if (orderstatus === '
|
| 187 |
removeActiveClass();
|
| 188 |
jQuery('#status1-cancel').addClass('active');
|
| 189 |
} else if (orderstatus === 'closed') {
|
|
@@ -200,7 +241,7 @@ if ( typeof jQuery == 'undefined')
|
|
| 200 |
success: function(data)
|
| 201 |
{
|
| 202 |
jQuery('#div-loading').hide();
|
| 203 |
-
if (data.order_number !== ''
|
| 204 |
if(data.error_status){
|
| 205 |
jQuery('#error_status').html(data.error_status);
|
| 206 |
jQuery('#error_status').show();
|
|
@@ -216,6 +257,7 @@ if ( typeof jQuery == 'undefined')
|
|
| 216 |
jQuery('#s-subtotal').html(data.subtotal);
|
| 217 |
jQuery('#s-shipping').html(data.shipping);
|
| 218 |
jQuery('#s-tax').html(data.tax);
|
|
|
|
| 219 |
jQuery('#s-total').html(data.grandtotal);
|
| 220 |
jQuery('#s-payment').text('(' + data.payment + ')');
|
| 221 |
jQuery('#gift-html').html(data.gifthtml);
|
|
@@ -282,7 +324,7 @@ if ( typeof jQuery == 'undefined')
|
|
| 282 |
} else if (data.status === 'complete') {
|
| 283 |
removeActiveClass();
|
| 284 |
jQuery('#status1-completed').addClass('active');
|
| 285 |
-
} else if (data.status === '
|
| 286 |
removeActiveClass();
|
| 287 |
jQuery('#status1-cancel').addClass('active');
|
| 288 |
} else if (data.status === 'closed') {
|
|
@@ -305,184 +347,9 @@ if ( typeof jQuery == 'undefined')
|
|
| 305 |
};
|
| 306 |
script.type='text/javascript';
|
| 307 |
script.src='<?php echo $this->getSkinUrl('js/ordertrack/jquery-1.10.2.min.js');?>';
|
| 308 |
-
document.getElementsByTagName('head')[0].appendChild(script)
|
| 309 |
-
|
| 310 |
-
}else{
|
| 311 |
-
jQuery.noConflict();
|
| 312 |
-
jQuery("#track-order-form").submit(function()
|
| 313 |
-
{
|
| 314 |
-
jQuery('#div-loading').show();
|
| 315 |
-
jQuery('#order-result-false').hide('slow');
|
| 316 |
-
//jQuery('#order-result').hide('slow');
|
| 317 |
-
//jQuery('#rs-carrier').show();
|
| 318 |
-
jQuery('#rs-shipped').show();
|
| 319 |
-
//jQuery('#rs-traking').show();
|
| 320 |
-
var ajax = '<?php echo $ajaxEnabled; ?>';
|
| 321 |
-
var url = '<?php echo Mage::getBaseUrl(). "offlineordertrack/tracking/ajax/"; ?>';
|
| 322 |
-
var data = jQuery('#track-order-form').serialize();
|
| 323 |
-
data += '&isAjax=1';
|
| 324 |
-
if(ajax == 0)
|
| 325 |
-
{
|
| 326 |
-
var orderstatus = '<?php echo $this->status; ?>';
|
| 327 |
-
if (this.validator.validate()) {
|
| 328 |
-
document.trackorderform.submit();
|
| 329 |
-
if (orderstatus === 'canceled') {
|
| 330 |
-
jQuery('#status2-value').text('Canceled');
|
| 331 |
-
} else if (orderstatus === 'closed') {
|
| 332 |
-
jQuery('#status2-value').text('Closed');
|
| 333 |
-
} else if (orderstatus === 'complete') {
|
| 334 |
-
jQuery('#status2-value').text('Complete');
|
| 335 |
-
} else if (orderstatus === 'fraud') {
|
| 336 |
-
jQuery('#status2-value').text('Suspected Fraud');
|
| 337 |
-
} else if (orderstatus === 'holded') {
|
| 338 |
-
jQuery('#status2-value').text('On Hold');
|
| 339 |
-
} else if (orderstatus === 'payment_review') {
|
| 340 |
-
jQuery('#status2-value').text('Payment Review');
|
| 341 |
-
} else if (orderstatus === 'pending') {
|
| 342 |
-
jQuery('#status2-value').text('Pending');
|
| 343 |
-
} else if (orderstatus === 'pending_payment') {
|
| 344 |
-
jQuery('#status2-value').text('Pending Payment');
|
| 345 |
-
} else if (orderstatus === 'pending_paypal') {
|
| 346 |
-
jQuery('#status2-value').text('Pending PayPal');
|
| 347 |
-
} else {
|
| 348 |
-
jQuery('#status2-value').text('Processing');
|
| 349 |
-
}
|
| 350 |
-
if (orderstatus === 'pending' || orderstatus === 'pending_payment' || orderstatus === 'pending_paypal' || orderstatus === 'holded') {
|
| 351 |
-
removeActiveClass();
|
| 352 |
-
jQuery('#status1-pending').addClass('active');
|
| 353 |
-
} else if (orderstatus === 'processing' || orderstatus === 'payment_review' || orderstatus === 'fraud') {
|
| 354 |
-
removeActiveClass();
|
| 355 |
-
jQuery('#status1-processing').addClass('active');
|
| 356 |
-
} else if (orderstatus === 'complete') {
|
| 357 |
-
removeActiveClass();
|
| 358 |
-
jQuery('#status1-completed').addClass('active');
|
| 359 |
-
} else if (orderstatus === 'cancel') {
|
| 360 |
-
removeActiveClass();
|
| 361 |
-
jQuery('#status1-cancel').addClass('active');
|
| 362 |
-
} else if (orderstatus === 'closed') {
|
| 363 |
-
removeActiveClass();
|
| 364 |
-
jQuery('#status1-closed').addClass('active');
|
| 365 |
-
}
|
| 366 |
-
}
|
| 367 |
-
}else{
|
| 368 |
-
jQuery.ajax({
|
| 369 |
-
url: url,
|
| 370 |
-
type: "POST",
|
| 371 |
-
data: data,
|
| 372 |
-
dataType: 'json',
|
| 373 |
-
success: function(data)
|
| 374 |
-
{
|
| 375 |
-
jQuery('#div-loading').hide();
|
| 376 |
-
if (data.order_number !== '' && data.order_email !== '') {
|
| 377 |
-
if(data.error_status){
|
| 378 |
-
jQuery('#error_status').html(data.error_status);
|
| 379 |
-
jQuery('#error_status').show();
|
| 380 |
-
jQuery('#order-result').hide();
|
| 381 |
-
}else{
|
| 382 |
-
jQuery('#order-result').show('slow');
|
| 383 |
-
jQuery('#error_status').hide();
|
| 384 |
-
}
|
| 385 |
-
jQuery('#no-value').text(data.order_number);
|
| 386 |
-
jQuery('#track-order-number').text(data.order_number);
|
| 387 |
-
jQuery('#billed-value').text(data.billed_on);
|
| 388 |
-
jQuery('#status2-value').text(data.status);
|
| 389 |
-
jQuery('#s-subtotal').html(data.subtotal);
|
| 390 |
-
jQuery('#s-shipping').html(data.shipping);
|
| 391 |
-
jQuery('#s-tax').html(data.tax);
|
| 392 |
-
jQuery('#s-total').html(data.grandtotal);
|
| 393 |
-
jQuery('#s-payment').text('(' + data.payment + ')');
|
| 394 |
-
jQuery('#gift-html').html(data.gifthtml);
|
| 395 |
-
jQuery('#billing-info').html(data.billing_info);
|
| 396 |
-
jQuery('#shipping-info').html(data.shipping_info);
|
| 397 |
-
jQuery('#orderdetail-header').html(data.orderdetail_header);
|
| 398 |
-
jQuery('#orderdetail-html').html(data.orderdetail_html);
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
if (data.status === 'canceled') {
|
| 402 |
-
jQuery('#status2-value').text('Canceled');
|
| 403 |
-
} else if (data.status === 'closed') {
|
| 404 |
-
jQuery('#status2-value').text('Closed');
|
| 405 |
-
} else if (data.status === 'complete') {
|
| 406 |
-
jQuery('#status2-value').text('Complete');
|
| 407 |
-
} else if (data.status === 'fraud') {
|
| 408 |
-
jQuery('#status2-value').text('Suspected Fraud');
|
| 409 |
-
} else if (data.status === 'holded') {
|
| 410 |
-
jQuery('#status2-value').text('On Hold');
|
| 411 |
-
} else if (data.status === 'payment_review') {
|
| 412 |
-
jQuery('#status2-value').text('Payment Review');
|
| 413 |
-
} else if (data.status === 'pending') {
|
| 414 |
-
jQuery('#status2-value').text('Pending');
|
| 415 |
-
} else if (data.status === 'pending_payment') {
|
| 416 |
-
jQuery('#status2-value').text('Pending Payment');
|
| 417 |
-
} else if (data.status === 'pending_paypal') {
|
| 418 |
-
jQuery('#status2-value').text('Pending PayPal');
|
| 419 |
-
} else {
|
| 420 |
-
jQuery('#status2-value').text('Processing');
|
| 421 |
-
}
|
| 422 |
-
jQuery('#number-after').val(data.order_number);
|
| 423 |
-
jQuery('#email-after').val(data.order_email);
|
| 424 |
-
|
| 425 |
-
var carrier_string = '';
|
| 426 |
-
if(data.carriers)
|
| 427 |
-
{
|
| 428 |
-
for (var i = 0; i < data.carriers.length; i++)
|
| 429 |
-
{
|
| 430 |
-
if (data.carriers.length - i === 1) {
|
| 431 |
-
carrier_string += data.carriers[i];
|
| 432 |
-
} else {
|
| 433 |
-
carrier_string += data.carriers[i] + ' ';
|
| 434 |
-
}
|
| 435 |
-
}
|
| 436 |
-
}
|
| 437 |
-
if(data.shipped_dates){
|
| 438 |
-
jQuery('#shipped-value').text(data.shipped_dates);
|
| 439 |
-
}else{
|
| 440 |
-
jQuery('#rs-shipped').hide();
|
| 441 |
-
}
|
| 442 |
-
jQuery('#carrier-value').text(carrier_string);
|
| 443 |
-
if (data.shipped_dates === '') {
|
| 444 |
-
jQuery('#rs-carrier').hide();
|
| 445 |
-
jQuery('#rs-shipped').hide();
|
| 446 |
-
jQuery('#rs-traking').hide();
|
| 447 |
-
}
|
| 448 |
-
|
| 449 |
-
if (data.status === 'pending' || data.status === 'pending_payment' || data.status === 'pending_paypal' || data.status === 'holded') {
|
| 450 |
-
removeActiveClass();
|
| 451 |
-
jQuery('#status1-pending').addClass('active');
|
| 452 |
-
} else if (data.status === 'processing' || data.status === 'payment_review' || data.status === 'fraud') {
|
| 453 |
-
removeActiveClass();
|
| 454 |
-
jQuery('#status1-processing').addClass('active');
|
| 455 |
-
} else if (data.status === 'complete') {
|
| 456 |
-
removeActiveClass();
|
| 457 |
-
jQuery('#status1-completed').addClass('active');
|
| 458 |
-
} else if (data.status === 'cancel') {
|
| 459 |
-
removeActiveClass();
|
| 460 |
-
jQuery('#status1-cancel').addClass('active');
|
| 461 |
-
} else if (data.status === 'closed') {
|
| 462 |
-
removeActiveClass();
|
| 463 |
-
jQuery('#status1-closed').addClass('active');
|
| 464 |
-
}
|
| 465 |
-
}else {
|
| 466 |
-
jQuery('#order-result-false').show('slow');
|
| 467 |
-
jQuery('#order-result-false').text('Order Number or Email Adress invaild!');
|
| 468 |
-
}
|
| 469 |
-
},
|
| 470 |
-
error: function(error)
|
| 471 |
-
{
|
| 472 |
-
console.log(error.status);
|
| 473 |
-
}
|
| 474 |
-
});
|
| 475 |
-
}
|
| 476 |
-
return false;
|
| 477 |
-
});
|
| 478 |
}
|
| 479 |
|
| 480 |
-
|
| 481 |
-
jQuery('#status1-pending').removeClass();
|
| 482 |
-
jQuery('#status1-processing').removeClass();
|
| 483 |
-
jQuery('#status1-completed').removeClass();
|
| 484 |
-
jQuery('#status1-cancel').removeClass();
|
| 485 |
-
jQuery('#status1-closed').removeClass();
|
| 486 |
-
}
|
| 487 |
</script>
|
| 488 |
<?php endif; ?>
|
| 4 |
*
|
| 5 |
* **/
|
| 6 |
$helper = $this->helper('offlineordertrack');
|
| 7 |
+
$fieldmultiselect = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_specific_field');
|
| 8 |
+
$fieldmultiselect = explode(",",$fieldmultiselect);
|
| 9 |
?>
|
| 10 |
+
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->toHtml() ?></div>
|
| 11 |
<?php if(Mage::Helper('offlineordertrack')->getIsEnabled()): ////if my module is enabled?>
|
| 12 |
+
<div id="track-order">
|
| 13 |
<div class="page-title">
|
| 14 |
<h1><?php echo $this->__('Track Your Order'); ?></h1>
|
| 15 |
</div>
|
| 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" value="" 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" class="input-text validate-email required-entry " value="" 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" class="input-text validate-zip-international required-entry" value="" 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" class="input-text required-entry" value="" id="order:phonenumber" name="order_phonenumber" title="Phone Number">
|
| 41 |
</div>
|
| 42 |
</div>
|
| 43 |
+
|
| 44 |
</div>
|
| 45 |
+
<button class="button track-order" id="track-order-button" title="Track Order" type="submit"><span><span>Track order</span></span></button>
|
| 46 |
<div id="div-loading" class="divLoading" style="display: none;">
|
| 47 |
<span class="loadingAjax">Loading</span>
|
| 48 |
</div>
|
| 49 |
</form>
|
| 50 |
+
|
| 51 |
+
<form id="track-order-forgotorder" name="trackorderforgotform" method="POST" action="<?php echo $this->getForgotorderurl(); ?>" style="display:none;">
|
| 52 |
+
<div class="field">
|
| 53 |
+
<label class="required" for="order:email">Email Address</label>
|
| 54 |
+
<div class="input-box">
|
| 55 |
+
<input type="text" class="input-text validate-email required-entry" id="order_emailid" name="order_email" title="Email Address">
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
<button class="button forgotOrderNumber" id="track-order-forgot-button" title="Forgot Order Number" type="submit"><span><span>Submit</span></span></button>
|
| 59 |
+
</form>
|
| 60 |
</div>
|
| 61 |
<div id="error_status"></div>
|
| 62 |
+
<div class="field">
|
| 63 |
+
<label for="order:forgotordernumber">Forgot Your Order Number</label>
|
| 64 |
+
<div class="input-box">
|
| 65 |
+
<input type="checkbox" id="order_forgotordernumber" name="order_forgotordernumber" onchange="valueChanged()"/>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
</div>
|
| 69 |
+
|
| 70 |
<div id="order-result" class="orderResult" style="display: none;">
|
| 71 |
<div class="rsNo"><span class="noText">Order #</span><span id="no-value" class="noNumber"></span></div>
|
| 72 |
<div class="rsStatus1">
|
| 112 |
<td class="s-text">Tax</td>
|
| 113 |
<td id="s-tax"></td>
|
| 114 |
</tr>
|
| 115 |
+
<tr>
|
| 116 |
+
<td class="s-text">Discount</td>
|
| 117 |
+
<td id="s-tax-discount"></td>
|
| 118 |
+
</tr>
|
| 119 |
<tr>
|
| 120 |
<td class="s-text"><strong>Grand Total</strong></td>
|
| 121 |
<td class="sTotal" id="s-total"></td>
|
| 162 |
</div>
|
| 163 |
</div>
|
| 164 |
<?php $ajaxEnabled = Mage::getStoreConfig('netsolconfig/netsol_group/netsol_ajax_enable');?>
|
| 165 |
+
<script type="text/javascript">var ajax = "<?php echo $ajaxEnabled; ?>";</script>
|
| 166 |
+
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/ordertrack/ordertrack.js'); ?>"></script>
|
| 167 |
<script type="text/javascript">
|
| 168 |
+
//<![CDATA[
|
| 169 |
var orderForm = new VarienForm('track-order-form', true);
|
| 170 |
+
var orderforgotForm = new VarienForm('track-order-forgotorder', true);
|
| 171 |
+
//]]>
|
| 172 |
+
|
| 173 |
if ( typeof jQuery == 'undefined')
|
| 174 |
{
|
| 175 |
var script=document.createElement('script');
|
| 224 |
} else if (orderstatus === 'complete') {
|
| 225 |
removeActiveClass();
|
| 226 |
jQuery('#status1-completed').addClass('active');
|
| 227 |
+
} else if (orderstatus === 'canceled') {
|
| 228 |
removeActiveClass();
|
| 229 |
jQuery('#status1-cancel').addClass('active');
|
| 230 |
} else if (orderstatus === 'closed') {
|
| 241 |
success: function(data)
|
| 242 |
{
|
| 243 |
jQuery('#div-loading').hide();
|
| 244 |
+
if (data.order_number !== '') {
|
| 245 |
if(data.error_status){
|
| 246 |
jQuery('#error_status').html(data.error_status);
|
| 247 |
jQuery('#error_status').show();
|
| 257 |
jQuery('#s-subtotal').html(data.subtotal);
|
| 258 |
jQuery('#s-shipping').html(data.shipping);
|
| 259 |
jQuery('#s-tax').html(data.tax);
|
| 260 |
+
jQuery('#s-tax-discount').html(data.discount);
|
| 261 |
jQuery('#s-total').html(data.grandtotal);
|
| 262 |
jQuery('#s-payment').text('(' + data.payment + ')');
|
| 263 |
jQuery('#gift-html').html(data.gifthtml);
|
| 324 |
} else if (data.status === 'complete') {
|
| 325 |
removeActiveClass();
|
| 326 |
jQuery('#status1-completed').addClass('active');
|
| 327 |
+
} else if (data.status === 'canceled') {
|
| 328 |
removeActiveClass();
|
| 329 |
jQuery('#status1-cancel').addClass('active');
|
| 330 |
} else if (data.status === 'closed') {
|
| 347 |
};
|
| 348 |
script.type='text/javascript';
|
| 349 |
script.src='<?php echo $this->getSkinUrl('js/ordertrack/jquery-1.10.2.min.js');?>';
|
| 350 |
+
document.getElementsByTagName('head')[0].appendChild(script);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
}
|
| 352 |
|
| 353 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
</script>
|
| 355 |
<?php endif; ?>
|
app/etc/modules/Netsolutions_Offlineordertrack.xml
DELETED
|
@@ -1,9 +0,0 @@
|
|
| 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.
|
| 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-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir name="Netsolutions"><dir name="Offlineordertrack"><dir name="Block"><file name="Tracking.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.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>Latest version</summary>
|
| 10 |
<description>This extension will give order details for guest customers.</description>
|
| 11 |
+
<notes>Stable release of extension</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>07:50:52</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="ad8a7c69cb4efee653774d8403d5d097"/></dir><dir name="etc"><file name="adminhtml.xml" hash="69edda440ef5de1d8399c6893baa3a0a"/><file name="config.xml" hash="74d78edbae9d58a7291287db30dc2d48"/><file name="system.xml" hash="ba1fc4ac8378625410ca7d8622b2e0dd"/></dir><dir name="sql"><dir name="offlineordertrack_setup"><file name="mysql4-install-1.0.1.php" hash="c080c18b990ddbfa34a53a21e71cf5e8"/></dir></dir></dir></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="205effba7d974ba3a6ad96474c386e93"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="ordertrack.css" hash="9e872b1418f5a524b2682b3785652717"/></dir><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="abd24b403a17cf569732c3dd2d8bd699"/></dir></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/css/ordertrack.css
CHANGED
|
@@ -57,12 +57,22 @@ td.td-fixed {padding-top: 5px !important;}
|
|
| 57 |
.orderResult .detailSummary td.sPayment {font-style: italic;}
|
| 58 |
.orderResult .trakingTitle {color: #0A263C; font-size: 20px; margin: 20px 0;}
|
| 59 |
.orderResult .trackCarrier {color: #0000FF; font-size: 14px; font-weight: bold;}
|
| 60 |
-
#track-order-form .field label {
|
|
|
|
|
|
|
| 61 |
.status2Value,.carrierValue,.billedValue,.shippedValue{font-weight:bold;}
|
| 62 |
.trackorder-notajax .orderResult {display: block; margin-top: 0; padding: 0; margin-bottom: 15px;}
|
| 63 |
.trackorder-notajax .orderResult .rsNo {margin-top: 15px;}
|
| 64 |
.orderResult #orderdetail-html .dataStyle{padding:0 0 0 4px;float: left;}
|
| 65 |
.orderResult .dataName{margin:0 0 0 0 !important;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
@media only screen and (max-width: 480px) {
|
| 67 |
.orderResult .rsStatus1 ul li {display: block;}
|
| 68 |
.trackorder-index-index .dv-track-order input {width: 100%;}
|
| 57 |
.orderResult .detailSummary td.sPayment {font-style: italic;}
|
| 58 |
.orderResult .trakingTitle {color: #0A263C; font-size: 20px; margin: 20px 0;}
|
| 59 |
.orderResult .trackCarrier {color: #0000FF; font-size: 14px; font-weight: bold;}
|
| 60 |
+
#track-order-form .field label {float:left; width:150px;padding-top: 6px;}
|
| 61 |
+
#track-order .field label {float:left; width:150px;padding-top: 6px;}
|
| 62 |
+
#track-order-forgotorder .field label {float:left; width:160px;padding-top: 6px;}
|
| 63 |
.status2Value,.carrierValue,.billedValue,.shippedValue{font-weight:bold;}
|
| 64 |
.trackorder-notajax .orderResult {display: block; margin-top: 0; padding: 0; margin-bottom: 15px;}
|
| 65 |
.trackorder-notajax .orderResult .rsNo {margin-top: 15px;}
|
| 66 |
.orderResult #orderdetail-html .dataStyle{padding:0 0 0 4px;float: left;}
|
| 67 |
.orderResult .dataName{margin:0 0 0 0 !important;}
|
| 68 |
+
#error_status{color:#ff0000;font-size: 14px;}
|
| 69 |
+
#track-order-form .input-box{padding-bottom:11px; margin-top:5px;float:left;}
|
| 70 |
+
#track-order .input-box{padding-bottom:11px; margin-top:5px;float:left;}
|
| 71 |
+
#track-order-form .input-text{width:300px;}
|
| 72 |
+
#track-order-forgotorder .input-text{width:300px;}
|
| 73 |
+
.forgotOrderNumber{margin-top:10px !important;/*background-color: #000000 !important; border-color: #000000 !important; border-radius: 14px; color: #FFFFFF !important; height: 25px !important; line-height: 25px !important; width: 100px;*/}
|
| 74 |
+
|
| 75 |
+
|
| 76 |
@media only screen and (max-width: 480px) {
|
| 77 |
.orderResult .rsStatus1 ul li {display: block;}
|
| 78 |
.trackorder-index-index .dv-track-order input {width: 100%;}
|
skin/frontend/base/default/images/order-loader.gif
ADDED
|
Binary file
|
skin/frontend/base/default/js/ordertrack/ordertrack.js
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
function valueChanged(){
|
| 2 |
+
if(jQuery('#order_forgotordernumber').is(":checked")) {
|
| 3 |
+
jQuery('#track-order-form').hide(1000);
|
| 4 |
+
jQuery('#track-order-forgotorder').show(1000);
|
| 5 |
+
jQuery('#order-result').hide(1000);
|
| 6 |
+
jQuery('#error_status').hide();
|
| 7 |
+
}else{
|
| 8 |
+
jQuery('#track-order-form').show(1000);
|
| 9 |
+
jQuery('#track-order-forgotorder').hide(1000);
|
| 10 |
+
jQuery('#error_status').hide();
|
| 11 |
+
}
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
jQuery.noConflict();
|
| 15 |
+
jQuery(document).ready(function() {
|
| 16 |
+
/****
|
| 17 |
+
jQuery ajax for retrieving all order number for specfic email
|
| 18 |
+
address and sending to customer email***/
|
| 19 |
+
|
| 20 |
+
jQuery("#track-order-forgotorder").submit(function(){
|
| 21 |
+
var url = jQuery("#track-order-forgotorder").attr('action');
|
| 22 |
+
var data = jQuery('#track-order-forgotorder').serialize();
|
| 23 |
+
//data += '&isAjax=1';
|
| 24 |
+
if(ajax == 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
|
| 59 |
+
**/
|
| 60 |
+
jQuery("#track-order-form").submit(function()
|
| 61 |
+
{
|
| 62 |
+
jQuery('#div-loading').show();
|
| 63 |
+
jQuery('#order-result-false').hide('slow');
|
| 64 |
+
//jQuery('#order-result').hide('slow');
|
| 65 |
+
//jQuery('#rs-carrier').show();
|
| 66 |
+
jQuery('#rs-shipped').show();
|
| 67 |
+
//jQuery('#rs-traking').show();
|
| 68 |
+
//var ajax = '<?php echo $ajaxEnabled; ?>';
|
| 69 |
+
var url = '/offlineordertrack/tracking/ajax/';
|
| 70 |
+
var data = jQuery('#track-order-form').serialize();
|
| 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();
|
| 77 |
+
if (orderstatus === 'canceled') {
|
| 78 |
+
jQuery('#status2-value').text('Canceled');
|
| 79 |
+
} else if (orderstatus === 'closed') {
|
| 80 |
+
jQuery('#status2-value').text('Closed');
|
| 81 |
+
} else if (orderstatus === 'complete') {
|
| 82 |
+
jQuery('#status2-value').text('Complete');
|
| 83 |
+
} else if (orderstatus === 'fraud') {
|
| 84 |
+
jQuery('#status2-value').text('Suspected Fraud');
|
| 85 |
+
} else if (orderstatus === 'holded') {
|
| 86 |
+
jQuery('#status2-value').text('On Hold');
|
| 87 |
+
} else if (orderstatus === 'payment_review') {
|
| 88 |
+
jQuery('#status2-value').text('Payment Review');
|
| 89 |
+
} else if (orderstatus === 'pending') {
|
| 90 |
+
jQuery('#status2-value').text('Pending');
|
| 91 |
+
} else if (orderstatus === 'pending_payment') {
|
| 92 |
+
jQuery('#status2-value').text('Pending Payment');
|
| 93 |
+
} else if (orderstatus === 'pending_paypal') {
|
| 94 |
+
jQuery('#status2-value').text('Pending PayPal');
|
| 95 |
+
} else {
|
| 96 |
+
jQuery('#status2-value').text('Processing');
|
| 97 |
+
}
|
| 98 |
+
if (orderstatus === 'pending' || orderstatus === 'pending_payment' || orderstatus === 'pending_paypal' || orderstatus === 'holded') {
|
| 99 |
+
removeActiveClass();
|
| 100 |
+
jQuery('#status1-pending').addClass('active');
|
| 101 |
+
} else if (orderstatus === 'processing' || orderstatus === 'payment_review' || orderstatus === 'fraud') {
|
| 102 |
+
removeActiveClass();
|
| 103 |
+
jQuery('#status1-processing').addClass('active');
|
| 104 |
+
} else if (orderstatus === 'complete') {
|
| 105 |
+
removeActiveClass();
|
| 106 |
+
jQuery('#status1-completed').addClass('active');
|
| 107 |
+
} else if (orderstatus === 'canceled') {
|
| 108 |
+
removeActiveClass();
|
| 109 |
+
jQuery('#status1-cancel').addClass('active');
|
| 110 |
+
} else if (orderstatus === 'closed') {
|
| 111 |
+
removeActiveClass();
|
| 112 |
+
jQuery('#status1-closed').addClass('active');
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
}else{
|
| 116 |
+
jQuery.ajax({
|
| 117 |
+
url: url,
|
| 118 |
+
type: "POST",
|
| 119 |
+
data: data,
|
| 120 |
+
dataType: 'json',
|
| 121 |
+
success: function(data)
|
| 122 |
+
{
|
| 123 |
+
jQuery('#div-loading').hide();
|
| 124 |
+
if (data.order_number !== '') {
|
| 125 |
+
if(data.error_status){
|
| 126 |
+
jQuery('#error_status').html(data.error_status);
|
| 127 |
+
jQuery('#error_status').show();
|
| 128 |
+
jQuery('#order-result').hide();
|
| 129 |
+
}else{
|
| 130 |
+
jQuery('#order-result').show('slow');
|
| 131 |
+
jQuery('#error_status').hide();
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
jQuery('#no-value').text(data.order_number);
|
| 135 |
+
jQuery('#track-order-number').text(data.order_number);
|
| 136 |
+
jQuery('#billed-value').text(data.billed_on);
|
| 137 |
+
jQuery('#status2-value').text(data.status);
|
| 138 |
+
jQuery('#s-subtotal').html(data.subtotal);
|
| 139 |
+
jQuery('#s-shipping').html(data.shipping);
|
| 140 |
+
jQuery('#s-tax').html(data.tax);
|
| 141 |
+
jQuery('#s-tax-discount').html(data.discount);
|
| 142 |
+
jQuery('#s-total').html(data.grandtotal);
|
| 143 |
+
jQuery('#s-payment').text('(' + data.payment + ')');
|
| 144 |
+
jQuery('#gift-html').html(data.gifthtml);
|
| 145 |
+
jQuery('#billing-info').html(data.billing_info);
|
| 146 |
+
jQuery('#shipping-info').html(data.shipping_info);
|
| 147 |
+
jQuery('#orderdetail-header').html(data.orderdetail_header);
|
| 148 |
+
jQuery('#orderdetail-html').html(data.orderdetail_html);
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
if (data.status === 'canceled') {
|
| 152 |
+
jQuery('#status2-value').text('Canceled');
|
| 153 |
+
} else if (data.status === 'closed') {
|
| 154 |
+
jQuery('#status2-value').text('Closed');
|
| 155 |
+
} else if (data.status === 'complete') {
|
| 156 |
+
jQuery('#status2-value').text('Complete');
|
| 157 |
+
} else if (data.status === 'fraud') {
|
| 158 |
+
jQuery('#status2-value').text('Suspected Fraud');
|
| 159 |
+
} else if (data.status === 'holded') {
|
| 160 |
+
jQuery('#status2-value').text('On Hold');
|
| 161 |
+
} else if (data.status === 'payment_review') {
|
| 162 |
+
jQuery('#status2-value').text('Payment Review');
|
| 163 |
+
} else if (data.status === 'pending') {
|
| 164 |
+
jQuery('#status2-value').text('Pending');
|
| 165 |
+
} else if (data.status === 'pending_payment') {
|
| 166 |
+
jQuery('#status2-value').text('Pending Payment');
|
| 167 |
+
} else if (data.status === 'pending_paypal') {
|
| 168 |
+
jQuery('#status2-value').text('Pending PayPal');
|
| 169 |
+
} else {
|
| 170 |
+
jQuery('#status2-value').text('Processing');
|
| 171 |
+
}
|
| 172 |
+
jQuery('#number-after').val(data.order_number);
|
| 173 |
+
jQuery('#email-after').val(data.order_email);
|
| 174 |
+
|
| 175 |
+
var carrier_string = '';
|
| 176 |
+
if(data.carriers)
|
| 177 |
+
{
|
| 178 |
+
for (var i = 0; i < data.carriers.length; i++)
|
| 179 |
+
{
|
| 180 |
+
if (data.carriers.length - i === 1) {
|
| 181 |
+
carrier_string += data.carriers[i];
|
| 182 |
+
} else {
|
| 183 |
+
carrier_string += data.carriers[i] + ' ';
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
}
|
| 187 |
+
if(data.shipped_dates){
|
| 188 |
+
jQuery('#shipped-value').text(data.shipped_dates);
|
| 189 |
+
}else{
|
| 190 |
+
jQuery('#rs-shipped').hide();
|
| 191 |
+
}
|
| 192 |
+
jQuery('#carrier-value').text(carrier_string);
|
| 193 |
+
if (data.shipped_dates === '') {
|
| 194 |
+
jQuery('#rs-carrier').hide();
|
| 195 |
+
jQuery('#rs-shipped').hide();
|
| 196 |
+
jQuery('#rs-traking').hide();
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
if (data.status === 'pending' || data.status === 'pending_payment' || data.status === 'pending_paypal' || data.status === 'holded') {
|
| 200 |
+
removeActiveClass();
|
| 201 |
+
jQuery('#status1-pending').addClass('active');
|
| 202 |
+
} else if (data.status === 'processing' || data.status === 'payment_review' || data.status === 'fraud') {
|
| 203 |
+
removeActiveClass();
|
| 204 |
+
jQuery('#status1-processing').addClass('active');
|
| 205 |
+
} else if (data.status === 'complete') {
|
| 206 |
+
removeActiveClass();
|
| 207 |
+
jQuery('#status1-completed').addClass('active');
|
| 208 |
+
} else if (data.status === 'canceled') {
|
| 209 |
+
removeActiveClass();
|
| 210 |
+
jQuery('#status1-cancel').addClass('active');
|
| 211 |
+
} else if (data.status === 'closed') {
|
| 212 |
+
removeActiveClass();
|
| 213 |
+
jQuery('#status1-closed').addClass('active');
|
| 214 |
+
}
|
| 215 |
+
}else {
|
| 216 |
+
jQuery('#order-result-false').show('slow');
|
| 217 |
+
jQuery('#order-result-false').text('Order Number or Email Adress invaild!');
|
| 218 |
+
}
|
| 219 |
+
},
|
| 220 |
+
error: function(error)
|
| 221 |
+
{
|
| 222 |
+
console.log(error.status);
|
| 223 |
+
}
|
| 224 |
+
});
|
| 225 |
+
}
|
| 226 |
+
return false;
|
| 227 |
+
});
|
| 228 |
+
});
|
| 229 |
+
|
| 230 |
+
function removeActiveClass() {
|
| 231 |
+
jQuery('#status1-pending').removeClass();
|
| 232 |
+
jQuery('#status1-processing').removeClass();
|
| 233 |
+
jQuery('#status1-completed').removeClass();
|
| 234 |
+
jQuery('#status1-cancel').removeClass();
|
| 235 |
+
jQuery('#status1-closed').removeClass();
|
| 236 |
+
}
|
