iparcel_carthandoff - Version 1.6.1

Version Notes

Notes

Download this release

Release Info

Developer Bobby Burden
Extension iparcel_carthandoff
Version 1.6.1
Comparing to
See all releases


Code changes from version 1.6.0 to 1.6.1

app/code/community/Iparcel/All/Block/Adminhtml/Iparcel/Sync.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Adminhtml i-parcel Sync Block
4
+ *
5
+ * @category Iparcel
6
+ * @package Iparcel_All
7
+ * @author Bobby Burden <bburden@i-parcel.com>
8
+ */
9
+ class Iparcel_All_Block_Adminhtml_Iparcel_Sync extends Mage_Adminhtml_Block_Template
10
+ {
11
+ /**
12
+ * Initialize factory instance
13
+ */
14
+ public function __construct()
15
+ {
16
+ $this->_blockGroup = 'iparcel';
17
+ $this->_controller = 'adminhtml_iparcel_sync_ajax';
18
+ $this->_headerText = $this->__('i-parcel Catalog Sync');
19
+ parent::__construct();
20
+ }
21
+
22
+ /**
23
+ * Add "Start" Button block
24
+ *
25
+ * @return Iparcel_All_Block_Adminhtml_Iparcel_Sync
26
+ */
27
+ protected function _prepareLayout()
28
+ {
29
+ $this->setChild('start_button', $this->getLayout()->createBlock('adminhtml/widget_button')
30
+ ->setData(array(
31
+ 'label' => 'Start',
32
+ 'class' => 'go',
33
+ 'onclick' => 'window.catalogSync.run()'
34
+ )));
35
+
36
+ return parent::_prepareLayout();
37
+ }
38
+
39
+ /**
40
+ * Return the HTML for the start button
41
+ *
42
+ * @return string
43
+ */
44
+ public function getStartButton()
45
+ {
46
+ return $this->getChildHtml('start_button');
47
+ }
48
+ }
app/code/community/Iparcel/All/Helper/Api.php CHANGED
@@ -23,23 +23,29 @@ class Iparcel_All_Helper_Api
23
  /** @var string URL for the Quote endpoint */
24
  protected $_quote = 'https://webservices.i-parcel.com/api/Quote';
25
 
 
 
 
26
  /**
27
  * Send POST requests to the REST API
28
  *
29
  * @param string $post POST Data to send
30
  * @param string $url REST API URL to send POST data to
31
  * @param array $header Array of headers to attach to the request
 
32
  * @return string Response from the POST request
33
  */
34
- protected function _rest($post, $url, array $header)
35
  {
36
  $curl = curl_init($url);
37
 
38
- $timeout = 15;
39
- if ($timeout) {
40
- curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
 
41
  }
42
 
 
43
  curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
44
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
45
  curl_setopt($curl, CURLOPT_POST, true);
@@ -49,6 +55,12 @@ class Iparcel_All_Helper_Api
49
 
50
  $response = curl_exec($curl);
51
 
 
 
 
 
 
 
52
  curl_close($curl);
53
 
54
  return $response;
@@ -61,14 +73,16 @@ class Iparcel_All_Helper_Api
61
  *
62
  * @param string $json Data to be JSON encoded and sent to the API
63
  * @param string $url REST API URL to send POST data to
 
64
  * @return string Response from the POST request
65
  */
66
- protected function _restJSON($json, $url)
67
  {
68
  return $this->_rest(
69
  json_encode($json),
70
  $url,
71
- array('Content-Type: text/json')
 
72
  );
73
  }
74
 
23
  /** @var string URL for the Quote endpoint */
24
  protected $_quote = 'https://webservices.i-parcel.com/api/Quote';
25
 
26
+ /** @var int Timeout in seconds for REST requests */
27
+ protected $_timeout = 15;
28
+
29
  /**
30
  * Send POST requests to the REST API
31
  *
32
  * @param string $post POST Data to send
33
  * @param string $url REST API URL to send POST data to
34
  * @param array $header Array of headers to attach to the request
35
+ * @param int $timeout Timeout in seconds
36
  * @return string Response from the POST request
37
  */
38
+ protected function _rest($post, $url, array $header, $timeout = 0)
39
  {
40
  $curl = curl_init($url);
41
 
42
+ $throwExceptionOnTimeout = true;
43
+ if (!$timeout || !is_int($timeout) || $timeout == 0) {
44
+ $timeout = $this->_timeout;
45
+ $throwExceptionOnTimeout = false;
46
  }
47
 
48
+ curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
49
  curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
50
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
51
  curl_setopt($curl, CURLOPT_POST, true);
55
 
56
  $response = curl_exec($curl);
57
 
58
+ if (curl_errno($curl) == 28 // CURLE_OPERATION_TIMEDOUT
59
+ && $throwExceptionOnTimeout
60
+ ) {
61
+ throw new Exception;
62
+ }
63
+
64
  curl_close($curl);
65
 
66
  return $response;
73
  *
74
  * @param string $json Data to be JSON encoded and sent to the API
75
  * @param string $url REST API URL to send POST data to
76
+ * @param int Timeout value in seconds
77
  * @return string Response from the POST request
78
  */
79
+ protected function _restJSON($json, $url, $timeout = 0)
80
  {
81
  return $this->_rest(
82
  json_encode($json),
83
  $url,
84
+ array('Content-Type: text/json'),
85
+ $timeout
86
  );
87
  }
88
 
app/code/community/Iparcel/All/Model/Carrier/Iparcel.php CHANGED
@@ -138,9 +138,16 @@ class Iparcel_All_Model_Carrier_Iparcel extends Iparcel_All_Model_Carrier_Abstra
138
  *
139
  * @return boolean
140
  */
141
- private function _isAmazonPayments()
142
  {
143
- return $this->_paymentMethodContains('amazon');
 
 
 
 
 
 
 
144
  }
145
 
146
  /**
@@ -148,7 +155,7 @@ class Iparcel_All_Model_Carrier_Iparcel extends Iparcel_All_Model_Carrier_Abstra
148
  *
149
  * @return boolean
150
  */
151
- private function _isPayPalPayment()
152
  {
153
  return $this->_paymentMethodContains('paypal');
154
  }
138
  *
139
  * @return boolean
140
  */
141
+ public function _isAmazonPayments()
142
  {
143
+ $session = Mage::getSingleton('checkout/session');
144
+
145
+ $amazonReference = $session->getData('amazon_order_reference_id');
146
+ if (!is_null($amazonReference) || $amazonReference != "") {
147
+ return true;
148
+ }
149
+
150
+ return false;
151
  }
152
 
153
  /**
155
  *
156
  * @return boolean
157
  */
158
+ public function _isPayPalPayment()
159
  {
160
  return $this->_paymentMethodContains('paypal');
161
  }
app/code/community/Iparcel/All/Model/Quote/Address/.DS_Store DELETED
Binary file
app/code/community/Iparcel/All/controllers/Adminhtml/Iparcel/Sync/AjaxController.php CHANGED
@@ -15,13 +15,15 @@ class Iparcel_All_Adminhtml_Iparcel_Sync_AjaxController extends Mage_Adminhtml_C
15
  */
16
  protected function catalogJsonInitAction()
17
  {
18
- $step = Mage::getStoreConfig('catalog_mapping/upload/step');
19
  $count = Mage::getModel('catalog/product')
20
- ->getCollection()
21
- ->getSize()
22
- - floor(Mage::getStoreConfig('catalog_mapping/upload/offset')
23
- / $step
24
- ) * $step;
 
 
 
25
 
26
  $response = array(
27
  'count' => $count
@@ -43,25 +45,27 @@ class Iparcel_All_Adminhtml_Iparcel_Sync_AjaxController extends Mage_Adminhtml_C
43
  {
44
  $params = $this->getRequest()->getParams();
45
 
46
- $page = $params['page'];
47
- $step = $params['step'];
48
-
49
- $offset = Mage::getStoreConfig('catalog_mapping/upload/offset');
50
- $page += floor($offset / $step);
51
 
52
  $productCollection = Mage::getModel('catalog/product')
53
  ->getCollection()
54
  ->setPageSize($step)
55
  ->setCurPage($page);
56
- /* var $productCollection Mage_Catalog_Model_Resource_Product_Collection */
57
 
58
  $n = Mage::helper('iparcel/api')->submitCatalog($productCollection);
 
 
 
 
59
 
60
  if ($n != -1) {
61
  $response = array(
62
  'page' => $page,
63
  'step' => $step,
64
- 'uploaded' => $n
 
65
  );
66
  } else {
67
  $response = array(
15
  */
16
  protected function catalogJsonInitAction()
17
  {
 
18
  $count = Mage::getModel('catalog/product')
19
+ ->getCollection()
20
+ ->addAttributeToFilter(
21
+ 'type_id', array('in' =>
22
+ array(
23
+ 'simple',
24
+ 'configurable'
25
+ )))
26
+ ->getSize();
27
 
28
  $response = array(
29
  'count' => $count
45
  {
46
  $params = $this->getRequest()->getParams();
47
 
48
+ $page = (int) $params['page'];
49
+ $step = (int) $params['step'];
 
 
 
50
 
51
  $productCollection = Mage::getModel('catalog/product')
52
  ->getCollection()
53
  ->setPageSize($step)
54
  ->setCurPage($page);
55
+ /** @var $productCollection Mage_Catalog_Model_Resource_Product_Collection */
56
 
57
  $n = Mage::helper('iparcel/api')->submitCatalog($productCollection);
58
+ $skuList = array(
59
+ $productCollection->getFirstItem()->getSku(),
60
+ $productCollection->getLastItem()->getSku()
61
+ );
62
 
63
  if ($n != -1) {
64
  $response = array(
65
  'page' => $page,
66
  'step' => $step,
67
+ 'uploaded' => $n,
68
+ 'SKUs' => $skuList
69
  );
70
  } else {
71
  $response = array(
app/code/community/Iparcel/CartHandoff/.DS_Store DELETED
Binary file
app/code/community/Iparcel/CartHandoff/Helper/Api.php CHANGED
@@ -193,7 +193,18 @@ class Iparcel_CartHandoff_Helper_Api extends Iparcel_All_Helper_Api
193
  }
194
  $request['ItemDetailsList'] = $itemDetailsList;
195
 
196
- $response = $this->_restJSON($request, $this->_setCheckout);
 
 
 
 
 
 
 
 
 
 
 
197
 
198
  // Log request and response
199
  Mage::getModel('iparcel/log')
@@ -225,7 +236,20 @@ class Iparcel_CartHandoff_Helper_Api extends Iparcel_All_Helper_Api
225
  'tx' => $transactionId
226
  );
227
 
228
- $response = $this->_restJSON($request, $this->_getCheckoutDetails);
 
 
 
 
 
 
 
 
 
 
 
 
 
229
 
230
  // Log request and response
231
  Mage::getModel('iparcel/log')
@@ -840,4 +864,24 @@ class Iparcel_CartHandoff_Helper_Api extends Iparcel_All_Helper_Api
840
 
841
  return (int) $chunkSize;
842
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
843
  }
193
  }
194
  $request['ItemDetailsList'] = $itemDetailsList;
195
 
196
+ try {
197
+ $response = $this->_restJSON(
198
+ $request,
199
+ $this->_setCheckout,
200
+ $this->_getTimeout()
201
+ );
202
+ } catch (Exception $e) {
203
+ Mage::getSingleton('checkout/session')
204
+ ->addError($this->_getTimeoutMessage());
205
+
206
+ return false;
207
+ }
208
 
209
  // Log request and response
210
  Mage::getModel('iparcel/log')
236
  'tx' => $transactionId
237
  );
238
 
239
+ try {
240
+ $response = $this->_restJSON(
241
+ $request,
242
+ $this->_getCheckoutDetails,
243
+ $this->_getTimeout()
244
+ );
245
+ } catch (Exception $e) {
246
+ $return = array(
247
+ 'status' => 0,
248
+ 'message' => $this->_getTimeoutMessage()
249
+ );
250
+
251
+ return (object) $return;
252
+ }
253
 
254
  // Log request and response
255
  Mage::getModel('iparcel/log')
864
 
865
  return (int) $chunkSize;
866
  }
867
+
868
+ /**
869
+ * Returns the configured timeout setting
870
+ *
871
+ * @return int
872
+ */
873
+ private function _getTimeout()
874
+ {
875
+ return (int) Mage::getStoreConfig('iparcel/api/timeout');
876
+ }
877
+
878
+ /**
879
+ * Returns configured timeout message
880
+ *
881
+ * @return string
882
+ */
883
+ private function _getTimeoutMessage()
884
+ {
885
+ return (string) Mage::getStoreConfig('iparcel/api/timeout_message');
886
+ }
887
  }
app/code/community/Iparcel/CartHandoff/Model/Checkout/Type/Onepage.php CHANGED
@@ -16,7 +16,6 @@ class Iparcel_CartHandoff_Model_Checkout_Type_Onepage extends Mage_Checkout_Mode
16
  */
17
  public function savePayment($data)
18
  {
19
- $quote = $this->getQuote();
20
  $paymentModel = Mage::getModel('ipcarthandoff/payment_ipcarthandoff');
21
 
22
  if ($paymentModel->canUseCheckout()) {
@@ -26,4 +25,22 @@ class Iparcel_CartHandoff_Model_Checkout_Type_Onepage extends Mage_Checkout_Mode
26
 
27
  return parent::savePayment($data);
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
16
  */
17
  public function savePayment($data)
18
  {
 
19
  $paymentModel = Mage::getModel('ipcarthandoff/payment_ipcarthandoff');
20
 
21
  if ($paymentModel->canUseCheckout()) {
25
 
26
  return parent::savePayment($data);
27
  }
28
+
29
+ /**
30
+ * Remove `amazon_order_reference_id` from the user's session
31
+ *
32
+ * This is necessary so that rates can be returned for non-Amazon Payments
33
+ * checkout methods, but hidden when Amazon sets a reference ID. Amazon will
34
+ * set a reference ID during the address selection step of the Amazon
35
+ * checkout flow.
36
+ *
37
+ * @return this
38
+ */
39
+ public function initCheckout()
40
+ {
41
+ $session = $this->getCheckout();
42
+ $session->unsetData('amazon_order_reference_id');
43
+
44
+ return parent::initCheckout();
45
+ }
46
  }
app/code/community/Iparcel/CartHandoff/Model/Payment/Ipcarthandoff.php CHANGED
@@ -30,6 +30,14 @@ class Iparcel_CartHandoff_Model_Payment_Ipcarthandoff extends Iparcel_All_Model_
30
  $session = Mage::getSingleton('checkout/session');
31
  $quote = $session->getQuote();
32
 
 
 
 
 
 
 
 
 
33
  // If $quote and $shippingAddress are objects
34
  if (is_object($quote)) {
35
  $shippingAddress = $quote->getShippingAddress();
30
  $session = Mage::getSingleton('checkout/session');
31
  $quote = $session->getQuote();
32
 
33
+ // Check to make sure Amazon or PayPal isn't being used for this order
34
+ $carrierModel = Mage::getModel('iparcel/carrier_iparcel');
35
+ if ($carrierModel->_isAmazonPayments()
36
+ || $carrierModel->_isPayPalPayment()
37
+ ) {
38
+ return false;
39
+ }
40
+
41
  // If $quote and $shippingAddress are objects
42
  if (is_object($quote)) {
43
  $shippingAddress = $quote->getShippingAddress();
app/code/community/Iparcel/CartHandoff/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Iparcel_CartHandoff>
5
- <version>1.6.0</version>
6
  </Iparcel_CartHandoff>
7
  </modules>
8
  <global>
@@ -28,7 +28,6 @@
28
  <rewrite>
29
  <product_type_price>Iparcel_CartHandoff_Model_Catalog_Product_Type_Price</product_type_price>
30
  <product_type_configurable_price>Iparcel_CartHandoff_Model_Catalog_Product_Type_Configurable_Price</product_type_configurable_price>
31
- <layer>Iparcel_CartHandoff_Model_Catalog_Layer</layer>
32
  </rewrite>
33
  </catalog>
34
  <payment>
@@ -148,6 +147,10 @@
148
  <checkitems_cache_lifetime>0</checkitems_cache_lifetime>
149
  <checkitems_chunk_size>100</checkitems_chunk_size>
150
  </international_customer>
 
 
 
 
151
  </iparcel>
152
  </default>
153
  </config>
2
  <config>
3
  <modules>
4
  <Iparcel_CartHandoff>
5
+ <version>1.6.1</version>
6
  </Iparcel_CartHandoff>
7
  </modules>
8
  <global>
28
  <rewrite>
29
  <product_type_price>Iparcel_CartHandoff_Model_Catalog_Product_Type_Price</product_type_price>
30
  <product_type_configurable_price>Iparcel_CartHandoff_Model_Catalog_Product_Type_Configurable_Price</product_type_configurable_price>
 
31
  </rewrite>
32
  </catalog>
33
  <payment>
147
  <checkitems_cache_lifetime>0</checkitems_cache_lifetime>
148
  <checkitems_chunk_size>100</checkitems_chunk_size>
149
  </international_customer>
150
+ <api>
151
+ <timeout>10</timeout>
152
+ <timeout_message>Unable to communicate with UPS i-parcel. Please try again later.</timeout_message>
153
+ </api>
154
  </iparcel>
155
  </default>
156
  </config>
app/code/community/Iparcel/CartHandoff/etc/system.xml CHANGED
@@ -1,6 +1,37 @@
1
  <?xml version="1.0"?>
2
  <config>
3
  <sections>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  <carriers>
5
  <groups>
6
  <iparcel>
1
  <?xml version="1.0"?>
2
  <config>
3
  <sections>
4
+ <iparcel>
5
+ <groups>
6
+ <api translate="label" module="ipcarthandoff">
7
+ <label>API Options</label>
8
+ <sort_order>100</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>1</show_in_store>
12
+ <expanded>1</expanded>
13
+ <fields>
14
+ <timeout>
15
+ <label>Timeout (in seconds)</label>
16
+ <frontend_type>text</frontend_type>
17
+ <sort_order>1</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>1</show_in_store>
21
+ </timeout>
22
+ <timeout_message>
23
+ <label>Timeout Message</label>
24
+ <tooltip>This error message will be attached to a user's session in the event of a timeout.</tooltip>
25
+ <frontend_type>text</frontend_type>
26
+ <sort_order>5</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ </timeout_message>
31
+ </fields>
32
+ </api>
33
+ </groups>
34
+ </iparcel>
35
  <carriers>
36
  <groups>
37
  <iparcel>
app/design/adminhtml/default/default/layout/iparcel.xml CHANGED
@@ -32,7 +32,7 @@
32
  <action method="setTitle"><title>i-parcel Catalog Upload</title></action>
33
  </reference>
34
  <reference name="content">
35
- <block type="core/template" name="catalog.sync" template="iparcel/sync/ajax/catalog.phtml"/>
36
  </reference>
37
  </adminhtml_iparcel_sync_ajax_catalog>
38
 
32
  <action method="setTitle"><title>i-parcel Catalog Upload</title></action>
33
  </reference>
34
  <reference name="content">
35
+ <block type="iparcel/adminhtml_iparcel_sync" name="iparcel_catalog_sync" template="iparcel/sync/ajax/catalog.phtml"/>
36
  </reference>
37
  </adminhtml_iparcel_sync_ajax_catalog>
38
 
app/design/adminhtml/default/default/template/iparcel/sync/ajax/catalog.phtml CHANGED
@@ -1,25 +1,21 @@
1
  <?php
2
  /**
3
- * @category design
4
- * @package Iparcel_All
5
- * @author Bobby Burden <bburden@i-parcel.com>
6
- * @class Mage_Core_Block_Template
7
  */
8
  $initUrl = Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalogJsonInit');
9
  $uploadUrl = Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalogJsonUpload');
10
  ?>
11
- <div id="starting">
12
- <p>Starting catalog synchronization</p>
13
- </div>
14
- <div id="sync">
15
- <p><span>0</span> items from <span>0</span> uploaded</p>
16
- </div>
17
- <div id="end">
18
- <p><span>0</span> items from <span>0</span> successfully uploaded</p>
19
- <p>There was <span>0</span> errors when uploading catalog</p>
20
  </div>
 
21
  <script type="text/javascript">
22
- jQuery(document).ready(function() {
23
- var sync = new iparcelSync.sync('<?php echo $initUrl ?>', '<?php echo $uploadUrl ?>', <?php echo Mage::getStoreConfig('catalog_mapping/upload/step'); ?>);
24
- })
25
  </script>
1
  <?php
2
  /**
3
+ * @category design
4
+ * @package Iparcel_All
5
+ * @author Bobby Burden <bburden@i-parcel.com>
6
+ * @class Mage_Core_Block_Template
7
  */
8
  $initUrl = Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalogJsonInit');
9
  $uploadUrl = Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalogJsonUpload');
10
  ?>
11
+ <?php echo $this->getStartButton(); ?>
12
+
13
+ <div id="message">
14
+ <p>Click "Start" to begin the Catalog Sync</p>
 
 
 
 
 
15
  </div>
16
+ <textarea id="log-area" wrap="off"></textarea>
17
  <script type="text/javascript">
18
+ jQuery(document).ready(function() {
19
+ window.catalogSync = new iparcelSync('<?php echo $initUrl ?>', '<?php echo $uploadUrl ?>', <?php echo Mage::getStoreConfig('catalog_mapping/upload/step'); ?>, jQuery('.middle div button')[0]);
20
+ })
21
  </script>
app/design/frontend/base/default/layout/ipcarthandoff.xml CHANGED
@@ -45,4 +45,12 @@
45
  <block type="ipcarthandoff/button" name="cart_sidebar.extra_actions.ipcarthandoff" template="iparcel/carthandoff/button.phtml" />
46
  </reference>
47
  </default>
 
 
 
 
 
 
 
 
48
  </layout>
45
  <block type="ipcarthandoff/button" name="cart_sidebar.extra_actions.ipcarthandoff" template="iparcel/carthandoff/button.phtml" />
46
  </reference>
47
  </default>
48
+
49
+ <!-- Remove product page block to prevent AJAX call to /configurable -->
50
+ <catalog_product_view>
51
+ <reference name="head">
52
+ <action method="unsetChild"><name>iparcel_post</name></action>
53
+ <action method="unsetChild"><name>iparcel_sku</name></action>
54
+ </reference>
55
+ </catalog_product_view>
56
  </layout>
js/iparcel/adminhtml/sync.js CHANGED
@@ -5,82 +5,95 @@
5
  * @package Iparcel_All
6
  * @author Bobby Burden <bburden@i-parcel.com>
7
  */
8
- var iparcelSync = {
9
- item: null,
10
- sync: null,
11
- end: null,
 
12
 
13
- /**
14
- * Initialize sync ajax callback
15
- */
16
- init: function (data) {
17
- iparcelSync.item.count = data.count;
18
- iparcelSync.sync.eq(1).text(iparcelSync.item.count);
19
- iparcelSync.end.eq(1).text(iparcelSync.item.count);
20
- jQuery('#starting').hide();
21
- jQuery('#sync').show();
22
- jQuery.get(iparcelSync.item.uploadUrl, {
23
- page: ++iparcelSync.item.page,
24
- step: iparcelSync.item.step,
25
- }, iparcelSync.refresh);
26
- },
27
 
28
- /**
29
- * Refresh sync ajax callback
30
- */
31
- refresh: function (data) {
32
- if (!data.error) {
33
- iparcelSync.item.progress += data.uploaded;
34
- iparcelSync.item.errors += iparcelSync.item.step - data.uploaded;
35
- iparcelSync.sync.eq(0).text(iparcelSync.item.progress);
36
- iparcelSync.end.eq(0).text(iparcelSync.item.progress);
37
- } else {
38
- if (iparcelSync.item.page * iparcelSync.item.step > iparcelSync.item.count) {
39
- iparcelSync.item.errors += iparcelSync.item.count - iparcelSync.item.progress;
40
- } else {
41
- iparcelSync.item.errors += iparcelSync.item.step;
42
- }
43
- }
44
- if (iparcelSync.item.progress + iparcelSync.item.errors < iparcelSync.item.count) {
45
- jQuery.get(iparcelSync.item.uploadUrl, {
46
- page: ++iparcelSync.item.page,
47
- step: iparcelSync.item.step,
48
- }, iparcelSync.refresh);
49
- } else {
50
- iparcelSync.finish();
51
- }
52
- },
53
 
54
- /**
55
- * Finish sync
56
- */
57
- finish: function () {
58
- iparcelSync.end.eq(2).text(iparcelSync.item.errors);
59
- jQuery('#sync').hide();
60
- jQuery('#end').show();
61
- },
 
 
 
62
 
63
- /**
64
- * Sync object
65
- */
66
- sync: function (initUrl, uploadUrl, step) {
67
- this.initUrl = initUrl;
68
- this.uploadUrl = uploadUrl;
69
- this.step = step;
70
- this.progress = 0;
71
- this.errors = 0;
72
- this.count = 0;
73
- this.page = 0;
74
 
75
- iparcelSync.sync = jQuery('#sync span');
76
- iparcelSync.end = jQuery('#end span');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
- this.run = function () {
79
- jQuery.get(this.initUrl, {type: 'init'}, iparcelSync.init);
80
- }
 
 
 
 
81
 
82
- iparcelSync.item = this;
 
 
 
83
 
84
- this.run();
85
- }
86
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  * @package Iparcel_All
6
  * @author Bobby Burden <bburden@i-parcel.com>
7
  */
8
+ var iparcelSync = function (initUrl, uploadUrl, step, startButton) {
9
+ this.initUrl = initUrl;
10
+ this.uploadUrl = uploadUrl;
11
+ this.step = step;
12
+ this.startButton = startButton;
13
 
14
+ this.progress = 0;
15
+ this.errors = 0;
16
+ this.count = 0;
17
+ this.page = 1;
18
+ this.skus = [];
 
 
 
 
 
 
 
 
 
19
 
20
+ this.message = jQuery('#message');
21
+ this.log = jQuery('#log-area');
22
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ iparcelSync.prototype.run = function () {
25
+ this.message.html('<p>Catalog Sync running...</p>');
26
+ this.addToLog("Starting Catalog Sync...");
27
+ this.addToLog("Generating colleciton of products to sync. This may take a moment...");
28
+ this.startButton.disable();
29
+ var self = this;
30
+ jQuery.get(this.initUrl, function(data) {
31
+ self.setCount(data.count);
32
+ self.count = data.count;
33
+ self.upload();
34
+ });
35
 
36
+ };
 
 
 
 
 
 
 
 
 
 
37
 
38
+ iparcelSync.prototype.upload = function() {
39
+ if (this.page == 0
40
+ || (this.count / this.step) > this.page - 1) {
41
+ var payload = {
42
+ page: this.page,
43
+ step: this.step
44
+ };
45
+ var self = this;
46
+ jQuery.get(this.uploadUrl, payload)
47
+ .done(function(data) {
48
+ // Handle errors from the PHP controller
49
+ if (data.error == 1) {
50
+ self.addToLog('Unable to complete sync.');
51
+ self.errors += 1;
52
+ this.finish();
53
+ } else {
54
+ self.progress = self.progress + data.uploaded;
55
+ self.page = ++data.page;
56
+ self.skus = data.SKUs;
57
+ self.updateProgress();
58
+ self.upload();
59
+ }
60
+ });
61
+ } else {
62
+ this.finish();
63
+ }
64
+ };
65
 
66
+ iparcelSync.prototype.finish = function() {
67
+ this.message.html('<p>Catalog Sync Finished.</p>');
68
+ this.addToLog('Finished uploading a total of '
69
+ + this.progress +
70
+ ' compatible SKUs and variations with '
71
+ + this.errors
72
+ + ' errors. \n');
73
 
74
+ this.progress = 0;
75
+ this.errors = 0;
76
+ this.count = 0;
77
+ this.page = 0;
78
 
79
+ this.message.html('<p>Click "Start" to begin the Catalog Sync</p>');
80
+
81
+ this.startButton.enable();
82
+ };
83
+
84
+ iparcelSync.prototype.updateProgress = function() {
85
+ this.addToLog(
86
+ 'Uploaded ' + this.progress + ' products of ' + this.count + '... Synced SKUS "' +
87
+ this.skus[0] + '" through "' + this.skus[1] + '"'
88
+ );
89
+ };
90
+
91
+ iparcelSync.prototype.setCount = function(count) {
92
+ this.addToLog('Found a total of ' + count + ' products');
93
+ };
94
+
95
+ iparcelSync.prototype.addToLog = function (text) {
96
+ text = new Date().toISOString() + ": " + text + "\n";
97
+ this.log.append(text);
98
+ this.log.scrollTop(this.log[0].scrollHeight - this.log.height());
99
+ };
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>iparcel_carthandoff</name>
4
- <version>1.6.0</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
@@ -16,9 +16,9 @@
16
  <email>bburden@i-parcel.com</email>
17
  </author>
18
  </authors>
19
- <date>2016-11-16</date>
20
- <time>19:56:45</time>
21
- <contents><target name="mageweb"><dir name="app"><dir name="etc"><dir name="modules"><file name="Iparcel_CartHandoff.xml" hash="ffb746b30fb5ff90dd7807211f6a4e9f"/><file name="Iparcel_All.xml" hash="89e4b47a6ac9aa0b82f70b1539d587ea"/></dir></dir><dir name="code"><dir name="community"><dir name="Iparcel"><dir name="CartHandoff"><file name=".DS_Store" hash="dfb9481803d164ba9ec4e857204c243e"/><dir name="Block"><dir name="Adminhtml"><dir name="Checkitems"><file name="Button.php" hash="996c59c0e070bfe0abcfbc75c33d9181"/></dir></dir><file name="Button.php" hash="f0973ed80adca37577c9183d543ffca6"/><file name="Estimate.php" hash="ed76666cb286b1bd36235c7aa23ab098"/><dir name="Form"><file name="Button.php" hash="15c90ba070756ebc2aec36546dd5854b"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Ipcarthandoff"><dir name="Checkitems"><file name="CacheController.php" hash="dc682b48cd1d76cbe5431340ad15d10b"/></dir></dir></dir><file name="HandoffController.php" hash="b2bd0440b4fc8e143791fda85f511efb"/><file name="StatusController.php" hash="511f645fec406059f956aa915c9138b4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e4f3a503dfa55aa0540b87d644cf0631"/><file name="config.xml" hash="19416642acf422722290dc336fef30d9"/><file name="system.xml" hash="84519b9fbfd73d4ca12df63303ae519a"/></dir><dir name="Helper"><file name="Api.php" hash="98fc6905d589e661a5c65a9e6d74fcdb"/><file name="Data.php" hash="784eea529c5eae7652cd2741cc5b9214"/></dir><dir name="Model"><dir name="Catalog"><file name="Layer.php" hash="b7410cb6b76bcf6282d0de45fcfd4214"/><dir name="Product"><dir name="Type"><dir name="Configurable"><file name="Price.php" hash="9757c4a3a06ab09e20f505b83197a864"/></dir><file name="Price.php" hash="0b5b030df7a614b880a07642d9166888"/></dir></dir></dir><file name="Checkitems.php" hash="b86446862f8eb0b48cda130dc8e4b83a"/><file name="Observer.php" hash="f7ab4f37d2732fdd39fc8c0231b64910"/><dir name="Checkout"><dir name="Type"><file name="Onepage.php" hash="cb728cbf897b44cb411cc44ae5be6a3e"/></dir></dir><dir name="Observer"><file name="Storecredit.php" hash="f147548263151fa76944c1aeba53723f"/></dir><dir name="Payment"><file name="Free.php" hash="810c0e8e3a208a88bfbcb447997674ee"/><file name="Ipcarthandoff.php" hash="da308f2dd70aac12912b923441e117c8"/></dir><dir name="Resource"><dir name="Checkitems"><file name="Collection.php" hash="9a488c5a6c0b3d16f63817afd691ae80"/></dir><file name="Checkitems.php" hash="03ba687675e6eef24e6fed32c4767e55"/><dir name="Mysql4"><file name="Setup.php" hash="c7609fb203ba82fa7e1a39457f1edb3b"/></dir></dir><dir name="Sales"><file name="Order.php" hash="93008416ea3552d2adc0ed63016dc7b1"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Buttonplacement.php" hash="7f8a7cfd897ef5a12a082251eb397451"/><file name="Shippingaddress.php" hash="12630442dcf038ee8d7b7bf9b203b0eb"/><dir name="Checkitems"><file name="Cache.php" hash="ea4566851a70fee0473a283a7bfa0a2c"/></dir></dir></dir></dir></dir><dir name="sql"><dir name="ipcarthandoff_setup"><file name="mysql4-upgrade-1.2.0-1.3.0.php" hash="178b64c5cd9aded939a8973d4c0ac3e6"/></dir></dir></dir><dir name="All"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Mapping"><file name="Button.php" hash="dfdaf5a2fbf824a10fccc952fdccf567"/></dir></dir><dir name="Iparcel"><file name="Dashboard.php" hash="ec9dddd10368136f1bdfe79fddd4500c"/><file name="Logs.php" hash="5823bbc2a78666972dd02d5fd3e9d05d"/><dir name="Logs"><file name="Grid.php" hash="9c472c78640c8aecb5de4b638372e6f5"/></dir><dir name="Shipment"><dir name="Split"><file name="Form.php" hash="db44693b1eda47cb1d87b8a69ac9a5a0"/></dir><file name="Split.php" hash="4cb66f91987f842c699bd2d6c42f2249"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Method.php" hash="935a3d4adad09d6c049cd6bb4cefb8db"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="5de6102a56f4a9301f1b81004da39ef8"/></dir><file name="Product.php" hash="71a865c01574fd10ee0ffa7475cee378"/></dir><dir name="Catalogsearch"><dir name="Advanced"><file name="Result.php" hash="ad5a157444b80a284e0f9e7a91187b55"/></dir><file name="Result.php" hash="33e4ab0994bde9ba5dd87ade63869bee"/></dir><dir name="Html"><dir name="Head"><file name="Iparcel.php" hash="dd1737d041e9357269fa35b27dbef0bd"/><file name="Jquery.php" hash="3fd23960111c32d5696cc3de63e41b6e"/><file name="Post.php" hash="793d578cf82fb3ba83e1edc87b79ff95"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><file name="Abstract.php" hash="71cdfdce9a538b2f78b83b7b5eac8b19"/><file name="Duty.php" hash="2ca06e658c24b74d5e3dfa2a6950b010"/><file name="Tax.php" hash="7b630e60c6ff9340bedefdc84e99cef4"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Iparcel"><file name="LogController.php" hash="94e2095979140ad6d7c149080be30d38"/><file name="ShipmentController.php" hash="a9b8896d816b7612e1dc0638a2f8b740"/><dir name="Shipment"><file name="SplitController.php" hash="6a294947cf9399e42e90c890a6da2caa"/></dir><dir name="Sync"><file name="AjaxController.php" hash="224df904979eb90a3f639a8f5c89787a"/></dir></dir></dir><file name="AjaxController.php" hash="9069724f071742b25c83b2d0cc368871"/><file name="InfoController.php" hash="ab1bdf953dac27d87e9c5c8023ed9380"/><file name="InternationalController.php" hash="5250af3266389ddf0f5ea3a806652328"/></dir><dir name="etc"><file name="adminhtml.xml" hash="50bc0bee93b5612763321eae11cfdc51"/><file name="config.xml" hash="3fc0f987d470f83ccb10bd04de9d6abb"/><file name="system.xml" hash="823d3690c187d8c3db42912d83a6303b"/></dir><dir name="Helper"><file name="Api.php" hash="738aef7c3db1b3f17f902849017b39c0"/><file name="Data.php" hash="2e4f16bb0a3f1fe1345b5d21df59dbae"/><file name="International.php" hash="7bba0cd23188eaa3f99ed3d32ffccd14"/></dir><dir name="Model"><dir name="Api"><file name="Quote.php" hash="2e938bda13d007e73f8c2238aff76fa1"/></dir><dir name="Carrier"><file name="Abstract.php" hash="87ebc5b402ea74709a00abcf2a8aa856"/><file name="Iparcel.php" hash="00949d17dbc1ee27d6fd804c8e7778fd"/></dir><dir name="Catalog"><dir name="Product"><file name="Observer.php" hash="2fd0ce66f180cb7d0dfbe752e5227636"/></dir></dir><dir name="Config"><dir name="Script"><file name="Js.php" hash="f29fc9a7535bc886b3ccf8b2e5b7ebfc"/></dir></dir><file name="Cron.php" hash="670d37cd6cdbe60aa69fad8eb0a0759e"/><file name="Log.php" hash="8c87e5f356f8ca77a186430dda106097"/><file name="Observer.php" hash="9d53f374789eaa0b13349843d3e2c7fd"/><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Duty.php" hash="33b91a5b8fa32293bfe0eab4460b04f9"/><file name="Tax.php" hash="7cd4046231eb8cb9031ae160720390da"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Duty.php" hash="5a4010994ea502afe88632ddd2699c63"/><file name="Tax.php" hash="c4c95aaaae9662860dd635238150aa46"/></dir></dir></dir><dir name="Payment"><file name="Iparcel.php" hash="d7881d795edbbd7279888e3a86fff2c8"/></dir><dir name="Quote"><dir name="Address"><file name=".DS_Store" hash="fa72329856eac901102db0ec0b537843"/><dir name="Total"><file name="Abstract.php" hash="c5f5a251d5cf9f6ddb5a6d92efad157b"/><file name="Collector.php" hash="f805c3fc373f931d912b92cf38a15154"/><file name="Duty.php" hash="41adb9e60a5a22e1e552eb12aa83f858"/><file name="Tax.php" hash="262c99bceac487a5849058d6ed88011e"/></dir></dir></dir><dir name="Resource"><dir name="Api"><file name="Quote.php" hash="84d032b89c5df67ef24a112ad7846302"/></dir><dir name="Log"><file name="Collection.php" hash="7cb78be07207a599eff71c1e18ba0b7a"/></dir><file name="Log.php" hash="d14c2eb8314456a18adadbb52856e0b5"/><dir name="Mysql4"><file name="Setup.php" hash="9f9cf4b5934b70bd00b394beacb245f7"/></dir></dir><dir name="System"><dir name="Config"><dir name="Catalog"><file name="Mapping.php" hash="3d44f4b4ee157333556f588d7d8cd25b"/></dir><dir name="Data"><dir name="Date"><file name="Monthday.php" hash="baec5b8a27c5b037529ba935aae0370a"/><file name="Weekday.php" hash="173edc075325d932f8dad6d4674b8153"/></dir><dir name="Time"><file name="Hour.php" hash="ddad98b85290d9b13ec9f65fbe8a10b3"/><file name="Minute.php" hash="4a76af0057d60e8ff0ff7fedc1d50575"/></dir></dir><file name="Guid.php" hash="311c7f8072f02a6be9e25b6411298c5c"/><dir name="Script"><file name="Js.php" hash="3e3f23b38ecdc361bf6ff6cee1871e92"/></dir><dir name="Source"><dir name="Catalog"><dir name="Mapping"><dir name="Configurable"><file name="Price.php" hash="f9116fd446914467e7fb31bed5a6dd0b"/></dir><file name="Mode.php" hash="36140a050ea65ff23d45264fa67e1a2b"/></dir><dir name="Product"><dir name="Attribute"><file name="Boolean.php" hash="ca1883122659f1b48890ecd46a1590ee"/></dir><file name="Attribute.php" hash="8ca9c929cda497400865751ffba991e6"/></dir></dir><dir name="Date"><file name="Weekday.php" hash="143c26f9661e5dc995ff064e333a2018"/></dir><dir name="Sales"><dir name="Order"><file name="Status.php" hash="f1e414c08c43ebb2fcc6ccf5b41a2ff2"/></dir></dir><dir name="Tax"><file name="Mode.php" hash="fb09f17b54ef8ffa22580741cc66ac14"/></dir></dir></dir></dir><dir name="Tax"><dir name="Quote"><file name="Shipping.php" hash="e4b0f82aaef3666be520bc2da28af098"/><file name="Subtotal.php" hash="6824b6e6e86dc423fd493a31b15aa28d"/><file name="Tax.php" hash="7ee0528db7b7f9e89cd00a0b0c74dda9"/></dir></dir></dir><dir name="sql"><dir name="iparcel_setup"><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="4df6e3a3f2adf96eeb6ccdac213e3f1e"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="358045d3bf4a53a477e52b573289fe4c"/><file name="mysql4-upgrade-1.1.1-1.2.0.php" hash="1f04c5c71a6a79aaf74810e87670d998"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="de1c9caa713dd194595aa2dd15a829ac"/><file name="mysql4-upgrade-1.2.1-1.3.0.php" hash="f7a5567470b6a3c98530600b48993889"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ipcarthandoff.xml" hash="ed7faf180d54254f9bd4bfde21cdec1d"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/></dir><dir name="template"><dir name="iparcel"><dir name="carthandoff"><file name="button.phtml" hash="4724ea247d4fb514373bd25290f8ee96"/><file name="estimate.phtml" hash="4613986760ea91bbfe607336008da870"/><dir name="form"><file name="button.phtml" hash="603683fdeb5153c8ce4649f72967180a"/></dir></dir><dir name="html"><dir name="head"><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/></dir></dir><dir name="post"><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/></dir><file name="post.phtml" hash="3827cab2dba981556aeb8ec915ab03cc"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iparcel.xml" hash="b6e4778db9cebc970e1dc58cae12eb85"/></dir><dir name="template"><dir name="iparcel"><dir name="order"><dir name="totals"><file name="duty.phtml" hash="7af41c6d47dafeb890a520d8e6e39910"/><file name="tax.phtml" hash="25bffd2b58554cf28e5f4abe4b4e1e7c"/></dir></dir><dir name="sync"><dir name="ajax"><file name="catalog.phtml" hash="54ad431bc5f9b6d8dc50a1160e6d6ab5"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="iparcel.csv" hash="cbcb75a490376ca0b63c8c66622c1656"/></dir></dir></dir><dir name="js"><dir name="iparcel"><file name="cart-buttons.js" hash="98e45ffd14e94c6c33184fea62fce296"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="ea2e78b3fa40dd2be5e1f8559742ee86"/><file name="post.js" hash="55a14e510b988d893e95860e83e3f16b"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="ea2e78b3fa40dd2be5e1f8559742ee86"/><file name="post.js" hash="55a14e510b988d893e95860e83e3f16b"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="ea2e78b3fa40dd2be5e1f8559742ee86"/><file name="post.js" hash="55a14e510b988d893e95860e83e3f16b"/><dir name="adminhtml"><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="iparcel"><file name="ajaxSync.css" hash="c622b9e4b77589bc0f3c0555124d2751"/></dir></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies>
24
  <required>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>iparcel_carthandoff</name>
4
+ <version>1.6.1</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
16
  <email>bburden@i-parcel.com</email>
17
  </author>
18
  </authors>
19
+ <date>2017-01-03</date>
20
+ <time>19:07:49</time>
21
+ <contents><target name="mageweb"><dir name="app"><dir name="etc"><dir name="modules"><file name="Iparcel_CartHandoff.xml" hash="ffb746b30fb5ff90dd7807211f6a4e9f"/><file name="Iparcel_All.xml" hash="89e4b47a6ac9aa0b82f70b1539d587ea"/></dir></dir><dir name="code"><dir name="community"><dir name="Iparcel"><dir name="CartHandoff"><dir name="Block"><dir name="Adminhtml"><dir name="Checkitems"><file name="Button.php" hash="996c59c0e070bfe0abcfbc75c33d9181"/></dir></dir><file name="Button.php" hash="f0973ed80adca37577c9183d543ffca6"/><file name="Estimate.php" hash="ed76666cb286b1bd36235c7aa23ab098"/><dir name="Form"><file name="Button.php" hash="15c90ba070756ebc2aec36546dd5854b"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Ipcarthandoff"><dir name="Checkitems"><file name="CacheController.php" hash="dc682b48cd1d76cbe5431340ad15d10b"/></dir></dir></dir><file name="HandoffController.php" hash="b2bd0440b4fc8e143791fda85f511efb"/><file name="StatusController.php" hash="511f645fec406059f956aa915c9138b4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e4f3a503dfa55aa0540b87d644cf0631"/><file name="config.xml" hash="54d5343116c47c6db8a5d3405c8a766f"/><file name="system.xml" hash="411e0489405c16fe92b3ceb061842b4a"/></dir><dir name="Helper"><file name="Api.php" hash="9088388500a7d6779dba33a10ec26ece"/><file name="Data.php" hash="784eea529c5eae7652cd2741cc5b9214"/></dir><dir name="Model"><dir name="Catalog"><file name="Layer.php" hash="b7410cb6b76bcf6282d0de45fcfd4214"/><dir name="Product"><dir name="Type"><dir name="Configurable"><file name="Price.php" hash="9757c4a3a06ab09e20f505b83197a864"/></dir><file name="Price.php" hash="0b5b030df7a614b880a07642d9166888"/></dir></dir></dir><file name="Checkitems.php" hash="b86446862f8eb0b48cda130dc8e4b83a"/><file name="Observer.php" hash="f7ab4f37d2732fdd39fc8c0231b64910"/><dir name="Checkout"><dir name="Type"><file name="Onepage.php" hash="53d1efca3648682d95070061cba7beef"/></dir></dir><dir name="Observer"><file name="Storecredit.php" hash="f147548263151fa76944c1aeba53723f"/></dir><dir name="Payment"><file name="Free.php" hash="810c0e8e3a208a88bfbcb447997674ee"/><file name="Ipcarthandoff.php" hash="60c52fc039b371c01815dfca6bec4172"/></dir><dir name="Resource"><dir name="Checkitems"><file name="Collection.php" hash="9a488c5a6c0b3d16f63817afd691ae80"/></dir><file name="Checkitems.php" hash="03ba687675e6eef24e6fed32c4767e55"/><dir name="Mysql4"><file name="Setup.php" hash="c7609fb203ba82fa7e1a39457f1edb3b"/></dir></dir><dir name="Sales"><file name="Order.php" hash="93008416ea3552d2adc0ed63016dc7b1"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Buttonplacement.php" hash="7f8a7cfd897ef5a12a082251eb397451"/><file name="Shippingaddress.php" hash="12630442dcf038ee8d7b7bf9b203b0eb"/><dir name="Checkitems"><file name="Cache.php" hash="ea4566851a70fee0473a283a7bfa0a2c"/></dir></dir></dir></dir></dir><dir name="sql"><dir name="ipcarthandoff_setup"><file name="mysql4-upgrade-1.2.0-1.3.0.php" hash="178b64c5cd9aded939a8973d4c0ac3e6"/></dir></dir></dir><dir name="All"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Mapping"><file name="Button.php" hash="dfdaf5a2fbf824a10fccc952fdccf567"/></dir></dir><dir name="Iparcel"><file name="Dashboard.php" hash="ec9dddd10368136f1bdfe79fddd4500c"/><file name="Logs.php" hash="5823bbc2a78666972dd02d5fd3e9d05d"/><file name="Sync.php" hash="ce239afe604653d4b15c739df965fa06"/><dir name="Logs"><file name="Grid.php" hash="9c472c78640c8aecb5de4b638372e6f5"/></dir><dir name="Shipment"><dir name="Split"><file name="Form.php" hash="db44693b1eda47cb1d87b8a69ac9a5a0"/></dir><file name="Split.php" hash="4cb66f91987f842c699bd2d6c42f2249"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Method.php" hash="935a3d4adad09d6c049cd6bb4cefb8db"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="5de6102a56f4a9301f1b81004da39ef8"/></dir><file name="Product.php" hash="71a865c01574fd10ee0ffa7475cee378"/></dir><dir name="Catalogsearch"><dir name="Advanced"><file name="Result.php" hash="ad5a157444b80a284e0f9e7a91187b55"/></dir><file name="Result.php" hash="33e4ab0994bde9ba5dd87ade63869bee"/></dir><dir name="Html"><dir name="Head"><file name="Iparcel.php" hash="dd1737d041e9357269fa35b27dbef0bd"/><file name="Jquery.php" hash="3fd23960111c32d5696cc3de63e41b6e"/><file name="Post.php" hash="793d578cf82fb3ba83e1edc87b79ff95"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><file name="Abstract.php" hash="71cdfdce9a538b2f78b83b7b5eac8b19"/><file name="Duty.php" hash="2ca06e658c24b74d5e3dfa2a6950b010"/><file name="Tax.php" hash="7b630e60c6ff9340bedefdc84e99cef4"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Iparcel"><file name="LogController.php" hash="94e2095979140ad6d7c149080be30d38"/><file name="ShipmentController.php" hash="a9b8896d816b7612e1dc0638a2f8b740"/><dir name="Shipment"><file name="SplitController.php" hash="6a294947cf9399e42e90c890a6da2caa"/></dir><dir name="Sync"><file name="AjaxController.php" hash="8a7f2440ee161682eba59aeb7706f19a"/></dir></dir></dir><file name="AjaxController.php" hash="9069724f071742b25c83b2d0cc368871"/><file name="InfoController.php" hash="ab1bdf953dac27d87e9c5c8023ed9380"/><file name="InternationalController.php" hash="5250af3266389ddf0f5ea3a806652328"/></dir><dir name="etc"><file name="adminhtml.xml" hash="50bc0bee93b5612763321eae11cfdc51"/><file name="config.xml" hash="3fc0f987d470f83ccb10bd04de9d6abb"/><file name="system.xml" hash="823d3690c187d8c3db42912d83a6303b"/></dir><dir name="Helper"><file name="Api.php" hash="bae9a8435e047e229725e9b94b4b339d"/><file name="Data.php" hash="2e4f16bb0a3f1fe1345b5d21df59dbae"/><file name="International.php" hash="7bba0cd23188eaa3f99ed3d32ffccd14"/></dir><dir name="Model"><dir name="Api"><file name="Quote.php" hash="2e938bda13d007e73f8c2238aff76fa1"/></dir><dir name="Carrier"><file name="Abstract.php" hash="87ebc5b402ea74709a00abcf2a8aa856"/><file name="Iparcel.php" hash="12d9447bf8b1f3ac6e9bd7f7b26fbfcd"/></dir><dir name="Catalog"><dir name="Product"><file name="Observer.php" hash="2fd0ce66f180cb7d0dfbe752e5227636"/></dir></dir><dir name="Config"><dir name="Script"><file name="Js.php" hash="f29fc9a7535bc886b3ccf8b2e5b7ebfc"/></dir></dir><file name="Cron.php" hash="670d37cd6cdbe60aa69fad8eb0a0759e"/><file name="Log.php" hash="8c87e5f356f8ca77a186430dda106097"/><file name="Observer.php" hash="9d53f374789eaa0b13349843d3e2c7fd"/><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Duty.php" hash="33b91a5b8fa32293bfe0eab4460b04f9"/><file name="Tax.php" hash="7cd4046231eb8cb9031ae160720390da"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Duty.php" hash="5a4010994ea502afe88632ddd2699c63"/><file name="Tax.php" hash="c4c95aaaae9662860dd635238150aa46"/></dir></dir></dir><dir name="Payment"><file name="Iparcel.php" hash="d7881d795edbbd7279888e3a86fff2c8"/></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Abstract.php" hash="c5f5a251d5cf9f6ddb5a6d92efad157b"/><file name="Collector.php" hash="f805c3fc373f931d912b92cf38a15154"/><file name="Duty.php" hash="41adb9e60a5a22e1e552eb12aa83f858"/><file name="Tax.php" hash="262c99bceac487a5849058d6ed88011e"/></dir></dir></dir><dir name="Resource"><dir name="Api"><file name="Quote.php" hash="84d032b89c5df67ef24a112ad7846302"/></dir><dir name="Log"><file name="Collection.php" hash="7cb78be07207a599eff71c1e18ba0b7a"/></dir><file name="Log.php" hash="d14c2eb8314456a18adadbb52856e0b5"/><dir name="Mysql4"><file name="Setup.php" hash="9f9cf4b5934b70bd00b394beacb245f7"/></dir></dir><dir name="System"><dir name="Config"><dir name="Catalog"><file name="Mapping.php" hash="3d44f4b4ee157333556f588d7d8cd25b"/></dir><dir name="Data"><dir name="Date"><file name="Monthday.php" hash="baec5b8a27c5b037529ba935aae0370a"/><file name="Weekday.php" hash="173edc075325d932f8dad6d4674b8153"/></dir><dir name="Time"><file name="Hour.php" hash="ddad98b85290d9b13ec9f65fbe8a10b3"/><file name="Minute.php" hash="4a76af0057d60e8ff0ff7fedc1d50575"/></dir></dir><file name="Guid.php" hash="311c7f8072f02a6be9e25b6411298c5c"/><dir name="Script"><file name="Js.php" hash="3e3f23b38ecdc361bf6ff6cee1871e92"/></dir><dir name="Source"><dir name="Catalog"><dir name="Mapping"><dir name="Configurable"><file name="Price.php" hash="f9116fd446914467e7fb31bed5a6dd0b"/></dir><file name="Mode.php" hash="36140a050ea65ff23d45264fa67e1a2b"/></dir><dir name="Product"><dir name="Attribute"><file name="Boolean.php" hash="ca1883122659f1b48890ecd46a1590ee"/></dir><file name="Attribute.php" hash="8ca9c929cda497400865751ffba991e6"/></dir></dir><dir name="Date"><file name="Weekday.php" hash="143c26f9661e5dc995ff064e333a2018"/></dir><dir name="Sales"><dir name="Order"><file name="Status.php" hash="f1e414c08c43ebb2fcc6ccf5b41a2ff2"/></dir></dir><dir name="Tax"><file name="Mode.php" hash="fb09f17b54ef8ffa22580741cc66ac14"/></dir></dir></dir></dir><dir name="Tax"><dir name="Quote"><file name="Shipping.php" hash="e4b0f82aaef3666be520bc2da28af098"/><file name="Subtotal.php" hash="6824b6e6e86dc423fd493a31b15aa28d"/><file name="Tax.php" hash="7ee0528db7b7f9e89cd00a0b0c74dda9"/></dir></dir></dir><dir name="sql"><dir name="iparcel_setup"><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="4df6e3a3f2adf96eeb6ccdac213e3f1e"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="358045d3bf4a53a477e52b573289fe4c"/><file name="mysql4-upgrade-1.1.1-1.2.0.php" hash="1f04c5c71a6a79aaf74810e87670d998"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="de1c9caa713dd194595aa2dd15a829ac"/><file name="mysql4-upgrade-1.2.1-1.3.0.php" hash="f7a5567470b6a3c98530600b48993889"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ipcarthandoff.xml" hash="0c1e5006d796fd7e39f08d836c1cb2ae"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/></dir><dir name="template"><dir name="iparcel"><dir name="carthandoff"><file name="button.phtml" hash="4724ea247d4fb514373bd25290f8ee96"/><file name="estimate.phtml" hash="4613986760ea91bbfe607336008da870"/><dir name="form"><file name="button.phtml" hash="603683fdeb5153c8ce4649f72967180a"/></dir></dir><dir name="html"><dir name="head"><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/></dir></dir><dir name="post"><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/></dir><file name="post.phtml" hash="3827cab2dba981556aeb8ec915ab03cc"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iparcel.xml" hash="f23a0739ab95168725913180ef44fff9"/></dir><dir name="template"><dir name="iparcel"><dir name="order"><dir name="totals"><file name="duty.phtml" hash="7af41c6d47dafeb890a520d8e6e39910"/><file name="tax.phtml" hash="25bffd2b58554cf28e5f4abe4b4e1e7c"/></dir></dir><dir name="sync"><dir name="ajax"><file name="catalog.phtml" hash="b95262967f28618b50f01962047816f2"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="iparcel.csv" hash="cbcb75a490376ca0b63c8c66622c1656"/></dir></dir></dir><dir name="js"><dir name="iparcel"><file name="cart-buttons.js" hash="98e45ffd14e94c6c33184fea62fce296"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="ea2e78b3fa40dd2be5e1f8559742ee86"/><file name="post.js" hash="55a14e510b988d893e95860e83e3f16b"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="ea2e78b3fa40dd2be5e1f8559742ee86"/><file name="post.js" hash="55a14e510b988d893e95860e83e3f16b"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="ea2e78b3fa40dd2be5e1f8559742ee86"/><file name="post.js" hash="55a14e510b988d893e95860e83e3f16b"/><dir name="adminhtml"><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="ec17cf8528736f8aab3dd0ac76e3e7d9"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="ec17cf8528736f8aab3dd0ac76e3e7d9"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="ec17cf8528736f8aab3dd0ac76e3e7d9"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="ec17cf8528736f8aab3dd0ac76e3e7d9"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="ec17cf8528736f8aab3dd0ac76e3e7d9"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="iparcel"><file name="ajaxSync.css" hash="8e9222a567c960ec381f43307fd8d882"/></dir></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies>
24
  <required>
skin/adminhtml/default/default/iparcel/ajaxSync.css CHANGED
@@ -1,4 +1,22 @@
1
- *{margin: 0; padding: 0;}
2
- #starting{display: block;}
3
- #error{background-color: #c33; color: #fff;}
4
- *[id="page:main-container"] div{background-color: #8cd9cd; margin: 5px 0; padding: 5px; font-family: sans-serif; font-size: 12px; display: none;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
5
+
6
+ #message {
7
+ display: block;
8
+ }
9
+
10
+ *[id="page:main-container"] div {
11
+ background-color: #8cd9cd;
12
+ margin: 5px 0;
13
+ padding: 5px;
14
+ font-family: sans-serif;
15
+ font-size: 12px;
16
+ display: none;
17
+ }
18
+
19
+ #log-area {
20
+ width: 100%;
21
+ height: 150px;
22
+ }