iparcel_connect - Version 3.2.3

Version Notes

Notes

Download this release

Release Info

Developer Bobby Burden
Extension iparcel_connect
Version 3.2.3
Comparing to
See all releases


Code changes from version 3.2.2 to 3.2.3

app/code/community/Iparcel/All/.DS_Store ADDED
Binary file
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
 
@@ -86,7 +100,15 @@ class Iparcel_All_Helper_Api
86
  if ($attribute->getData()) {
87
  $code = $attribute->getAttributeCode();
88
  }
89
- $val = strip_tags(($product->getData($code) && $product->getAttributeText($code)) ? $product->getAttributeText($code) : $product->getData($code));
 
 
 
 
 
 
 
 
90
  return $val;
91
  }
92
 
@@ -474,8 +496,6 @@ class Iparcel_All_Helper_Api
474
  $items = array();
475
  $items['key'] = Mage::helper('iparcel')->getGuid();
476
 
477
- $skus = $items['SKUs'] = array();
478
-
479
  foreach ($products as $product) {
480
  /** @var Mage_Catalog_Model_Product $product */
481
  $product = Mage::getModel('catalog/product')->load($product->getId());
@@ -508,6 +528,21 @@ class Iparcel_All_Helper_Api
508
  }
509
 
510
  $price = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
  // if it's simple product and config is to get parent's price
512
  if ($product->getTypeId() == 'simple' && Mage::getStoreConfig('catalog_mapping/attributes/price_type') == Iparcel_All_Model_System_Config_Source_Catalog_Mapping_Configurable_Price::CONFIGURABLE) {
513
  // get parentIds
@@ -518,7 +553,15 @@ class Iparcel_All_Helper_Api
518
  // if there's no price
519
  if (!$price) {
520
  //get current product's price
521
- $price = $this->_getProductAttribute($product, 'price');
 
 
 
 
 
 
 
 
522
  }
523
 
524
  $item['CountryOfOrigin'] = (string)$product->getCountryOfManufacture();
@@ -856,6 +899,12 @@ class Iparcel_All_Helper_Api
856
  $itemPrice = (float)$this->_getProductAttribute($itemProduct, 'price');
857
  }
858
 
 
 
 
 
 
 
859
  $lineItem = array();
860
  $lineItem['SKU'] = $item->getSku();
861
  $lineItem['ValueUSD'] = $itemPrice;
@@ -891,4 +940,54 @@ class Iparcel_All_Helper_Api
891
 
892
  return true;
893
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
894
  }
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
 
100
  if ($attribute->getData()) {
101
  $code = $attribute->getAttributeCode();
102
  }
103
+
104
+ // Special case for `special_price` code
105
+ if ($code == 'special_price') {
106
+ // Grabs the special price if we are in the applicable date range
107
+ $val = $product->getFinalPrice();
108
+ } else {
109
+ $val = strip_tags(($product->getData($code) && $product->getAttributeText($code)) ? $product->getAttributeText($code) : $product->getData($code));
110
+ }
111
+
112
  return $val;
113
  }
114
 
496
  $items = array();
497
  $items['key'] = Mage::helper('iparcel')->getGuid();
498
 
 
 
499
  foreach ($products as $product) {
500
  /** @var Mage_Catalog_Model_Product $product */
501
  $product = Mage::getModel('catalog/product')->load($product->getId());
528
  }
529
 
530
  $price = null;
531
+
532
+ // Finds the price for simple products with configurable parents
533
+ $configurableParent = Mage::getModel('catalog/product_type_configurable')
534
+ ->getParentIdsByChild($product->getId());
535
+ if (count($configurableParent)) {
536
+ $configurableParent = Mage::getModel('catalog/product')->load(
537
+ $configurableParent[0]
538
+ );
539
+
540
+ $price = $this->_getConfigurableProductPrice(
541
+ $configurableParent,
542
+ $product
543
+ );
544
+ }
545
+
546
  // if it's simple product and config is to get parent's price
547
  if ($product->getTypeId() == 'simple' && Mage::getStoreConfig('catalog_mapping/attributes/price_type') == Iparcel_All_Model_System_Config_Source_Catalog_Mapping_Configurable_Price::CONFIGURABLE) {
548
  // get parentIds
553
  // if there's no price
554
  if (!$price) {
555
  //get current product's price
556
+ if (is_null($price)) {
557
+ $price = $this->_getProductAttribute($product, 'price');
558
+ }
559
+ }
560
+
561
+ // If all attempts to gather a price based on configuration fail,
562
+ // call getPrice() on the product
563
+ if (!$price) {
564
+ $price = $product->getPrice();
565
  }
566
 
567
  $item['CountryOfOrigin'] = (string)$product->getCountryOfManufacture();
899
  $itemPrice = (float)$this->_getProductAttribute($itemProduct, 'price');
900
  }
901
 
902
+ // If all attempts to gather a price based on configuration fail,
903
+ // call getPrice() on the product
904
+ if (!$itemPrice) {
905
+ $itemPrice = $itemProduct->getPrice();
906
+ }
907
+
908
  $lineItem = array();
909
  $lineItem['SKU'] = $item->getSku();
910
  $lineItem['ValueUSD'] = $itemPrice;
940
 
941
  return true;
942
  }
943
+
944
+ /**
945
+ * Find the price for a simple product based on the configurable
946
+ *
947
+ * @param $configurable
948
+ * @param $simple
949
+ * @return null|float
950
+ */
951
+ protected function _getConfigurableProductPrice($configurable, $simple)
952
+ {
953
+ $price = null;
954
+
955
+ $productAttributeOptions = $configurable->getTypeInstance(true)
956
+ ->getConfigurableAttributesAsArray($configurable);
957
+
958
+ $options = array();
959
+ // Builds the $options array to match the attribute configuration for
960
+ // this particular simple -> configurable relationship
961
+ foreach ($productAttributeOptions as $productAttribute) {
962
+ $allValues = array_column(
963
+ $productAttribute['values'],
964
+ 'value_index'
965
+ );
966
+
967
+ $currentProductValue = $simple->getData(
968
+ $productAttribute['attribute_code']
969
+ );
970
+
971
+ if (in_array($currentProductValue, $allValues)) {
972
+ $options[$productAttribute['attribute_id']] = $currentProductValue;
973
+ }
974
+ }
975
+
976
+ if (!count($options)) {
977
+ return null;
978
+ }
979
+
980
+ $params = array(
981
+ 'product' => $configurable->getId(),
982
+ 'super_attribute' => $options,
983
+ 'qty' => 1
984
+ );
985
+
986
+ $cart = Mage::getModel('checkout/cart')->init();
987
+ $cart->addProduct($configurable, new Varien_Object($params));
988
+
989
+ $cart->getQuote()->collectTotals();
990
+
991
+ return $cart->getQuote()->getSubtotal();
992
+ }
993
  }
app/code/community/Iparcel/All/Model/Carrier/Iparcel.php CHANGED
@@ -30,6 +30,15 @@ class Iparcel_All_Model_Carrier_Iparcel extends Iparcel_All_Model_Carrier_Abstra
30
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
31
  {
32
  try {
 
 
 
 
 
 
 
 
 
33
  /** @var boolean $internationalOrder */
34
  $internationalOrder = Mage::helper('iparcel')->getIsInternational($request);
35
  if ($internationalOrder && Mage::getStoreConfig('carriers/iparcel/active')) {
@@ -123,4 +132,66 @@ class Iparcel_All_Model_Carrier_Iparcel extends Iparcel_All_Model_Carrier_Abstra
123
  {
124
  return $this->getMethodsNames();
125
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  }
30
  public function collectRates(Mage_Shipping_Model_Rate_Request $request)
31
  {
32
  try {
33
+
34
+ // If this is being used with CartHandoff, we don't return methods
35
+ // for orders with Amazon or PayPal payments
36
+ if (Mage::helper('iparcel')->isCartHandoffInstalled()
37
+ && ($this->_isAmazonPayments() || $this->_isPayPalPayment())
38
+ ) {
39
+ return false;
40
+ }
41
+
42
  /** @var boolean $internationalOrder */
43
  $internationalOrder = Mage::helper('iparcel')->getIsInternational($request);
44
  if ($internationalOrder && Mage::getStoreConfig('carriers/iparcel/active')) {
132
  {
133
  return $this->getMethodsNames();
134
  }
135
+
136
+ /**
137
+ * Determines if the checkout session is an Amazon Payments session
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
+ /**
154
+ * Determines if the checkout session is a PayPal payment
155
+ *
156
+ * @return boolean
157
+ */
158
+ public function _isPayPalPayment()
159
+ {
160
+ return $this->_paymentMethodContains('paypal');
161
+ }
162
+
163
+ /**
164
+ * Check if string exists in payment method name
165
+ *
166
+ * @param string Payment Method name to search for
167
+ * @return boolean
168
+ */
169
+ private function _paymentMethodContains($string)
170
+ {
171
+ $paymentMethod = $this->_getPaymentMethod();
172
+
173
+ if (strpos($paymentMethod, $string) !== false) {
174
+ return true;
175
+ }
176
+
177
+ return false;
178
+ }
179
+
180
+ /**
181
+ * Finds the payment method of the current checkout session
182
+ *
183
+ * @return string
184
+ */
185
+ private function _getPaymentMethod()
186
+ {
187
+ if (is_null($this->_paymentMethod)) {
188
+ $checkoutSession = Mage::getSingleton('checkout/session');
189
+ $this->_paymentMethod = $checkoutSession
190
+ ->getQuote()
191
+ ->getPayment()
192
+ ->getMethod();
193
+ }
194
+
195
+ return $this->_paymentMethod;
196
+ }
197
  }
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/GlobaleCommerce/Model/Api/External/Sales/Order.php CHANGED
@@ -439,6 +439,15 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
439
  ),
440
  );
441
 
 
 
 
 
 
 
 
 
 
442
  /**
443
  * Place the user in the "NOT LOGGED IN GROUP" if they are a guest,
444
  * and set the quote's first/lastname
@@ -477,6 +486,7 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
477
  /* var $_orderCreator Mage_Adminhtml_Sales_Order_Create */
478
 
479
  $subtotal = 0;
 
480
 
481
  // processing order's items, setting prices, totals etc
482
  foreach ($this->getProducts() as $productData) {
@@ -510,7 +520,7 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
510
  }
511
 
512
  // calc grand total
513
- $grandtotal = $subtotal+$tax+$shippingCosts;
514
 
515
  // set currency
516
  if (!$this->getCurrency()) {
@@ -563,15 +573,28 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
563
  $_order->setShippingDescription($ship->getMethodDescription());
564
  $_order->setBaseShippingAmount($ship->getPrice());
565
  $_order->setShippingAmount($ship->getPrice());
566
- $_order->setGlobalCurrencyCode($currency);
567
- $_order->setBaseCurrencyCode($currency);
568
- $_order->setStoreCurrencyCode($currency);
569
  $_order->setOrderCurrencyCode($currency);
570
  $_order->setTaxAmount($tax);
571
  $_order->setBaseTaxAmount($tax);
572
- $_order->setSubtotal($subtotal);
 
573
  $_order->setGrandTotal($grandtotal);
 
574
  $_order->setBaseGrandTotal($grandtotal);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  $_order->save();
576
  $_order->sendNewOrderEmail();
577
 
439
  ),
440
  );
441
 
442
+ // Add comment for promo code
443
+ $promos = $this->getPromos();
444
+ if (count($promos) && !empty($promos[0])) {
445
+ $_orderData['order']['comment']['customer_note'] .= " Promo Codes used: "
446
+ . join(
447
+ ", ", $promos
448
+ );
449
+ }
450
+
451
  /**
452
  * Place the user in the "NOT LOGGED IN GROUP" if they are a guest,
453
  * and set the quote's first/lastname
486
  /* var $_orderCreator Mage_Adminhtml_Sales_Order_Create */
487
 
488
  $subtotal = 0;
489
+ $discount = $this->getDiscount();
490
 
491
  // processing order's items, setting prices, totals etc
492
  foreach ($this->getProducts() as $productData) {
520
  }
521
 
522
  // calc grand total
523
+ $grandtotal = $subtotal+$tax+$shippingCosts-$discount;
524
 
525
  // set currency
526
  if (!$this->getCurrency()) {
573
  $_order->setShippingDescription($ship->getMethodDescription());
574
  $_order->setBaseShippingAmount($ship->getPrice());
575
  $_order->setShippingAmount($ship->getPrice());
 
 
 
576
  $_order->setOrderCurrencyCode($currency);
577
  $_order->setTaxAmount($tax);
578
  $_order->setBaseTaxAmount($tax);
579
+ $_order->setSubtotal($subtotal - $this->getDiscount());
580
+ $_order->setBaseSubtotal($subtotal - $this->getDiscount());
581
  $_order->setGrandTotal($grandtotal);
582
+ $_order->setDiscountAmount($this->getDiscount());
583
  $_order->setBaseGrandTotal($grandtotal);
584
+
585
+ // Set conversion rates
586
+ $globalCurrencyCode = Mage::app()->getBaseCurrencyCode();
587
+ $baseCurrency = Mage::app()->getStore()->getBaseCurrency();
588
+ $_order->setGlobalCurrencyCode($globalCurrencyCode);
589
+ $_order->setBaseCurrencyCode($baseCurrency->getCode());
590
+ $_order->setStoreCurrencyCode($baseCurrency->getCode());
591
+ $_order->setBaseToGlobalRate(
592
+ $baseCurrency->getRate($globalCurrencyCode)
593
+ );
594
+ $_order->setBaseToQuoteRate(
595
+ $baseCurrency->getRate($globalCurrencyCode)
596
+ );
597
+
598
  $_order->save();
599
  $_order->sendNewOrderEmail();
600
 
app/code/community/Iparcel/GlobaleCommerce/controllers/OrderController.php CHANGED
@@ -113,9 +113,11 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
113
  $orders = $this->_addCustomOptionsToOrder($orders);
114
  }
115
 
 
116
  $model->setOrderData($orders);
117
  $model->setShippingCosts($shipping);
118
  $model->setTax($tax);
 
119
  // if tracking specified set tracking number
120
  if ($tracking !== null) {
121
  $model->setTrackingNumber($tracking['number']);
113
  $orders = $this->_addCustomOptionsToOrder($orders);
114
  }
115
 
116
+ $model->setPromos($request->getPost('promo'));
117
  $model->setOrderData($orders);
118
  $model->setShippingCosts($shipping);
119
  $model->setTax($tax);
120
+ $model->setDiscount($request->getPost('discount'));
121
  // if tracking specified set tracking number
122
  if ($tracking !== null) {
123
  $model->setTrackingNumber($tracking['number']);
app/code/community/Iparcel/GlobaleCommerce/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Iparcel_GlobaleCommerce>
5
- <version>3.2.2</version>
6
  </Iparcel_GlobaleCommerce>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Iparcel_GlobaleCommerce>
5
+ <version>3.2.3</version>
6
  </Iparcel_GlobaleCommerce>
7
  </modules>
8
  <frontend>
app/code/community/Iparcel/GlobaleCommerce/etc/system.xml CHANGED
@@ -12,9 +12,9 @@
12
  <iparcel translate="label" module="ipglobalecommerce">
13
  <label>i-parcel</label>
14
  <sort_order>9999</sort_order>
15
- <show_in_default>0</show_in_default>
16
- <show_in_website>0</show_in_website>
17
- <show_in_store>0</show_in_store>
18
  </iparcel>
19
  </groups>
20
  </payment>
@@ -25,7 +25,7 @@
25
  <sort_order>100</sort_order>
26
  <show_in_default>1</show_in_default>
27
  <show_in_website>1</show_in_website>
28
- <show_in_store>0</show_in_store>
29
  <groups>
30
  <scripts>
31
  <show_in_default>1</show_in_default>
@@ -45,8 +45,8 @@
45
  <frontend_type>text</frontend_type>
46
  <sort_order>120</sort_order>
47
  <show_in_default>1</show_in_default>
48
- <show_in_website>0</show_in_website>
49
- <show_in_store>0</show_in_store>
50
  <groups>
51
  <sales translate="label">
52
  <label>Sales</label>
12
  <iparcel translate="label" module="ipglobalecommerce">
13
  <label>i-parcel</label>
14
  <sort_order>9999</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
  </iparcel>
19
  </groups>
20
  </payment>
25
  <sort_order>100</sort_order>
26
  <show_in_default>1</show_in_default>
27
  <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
  <groups>
30
  <scripts>
31
  <show_in_default>1</show_in_default>
45
  <frontend_type>text</frontend_type>
46
  <sort_order>120</sort_order>
47
  <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>1</show_in_store>
50
  <groups>
51
  <sales translate="label">
52
  <label>Sales</label>
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>
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
+ };
js/iparcel/lib.js CHANGED
@@ -1,45 +1,46 @@
1
  var iparcelMage = {
2
- displayEligibility: function(){
3
- try{
4
- $_ipar.fn.iparcel.ux.displayEligibility();
5
- }catch(exception){}
6
- },
7
- ajax: {
8
- post: function(sku, super_attribute, url) {
9
- var $jip = jQuery.noConflict();
10
- var data = super_attribute+'sku='+sku;
11
- $jip('.iparcelsku').attr('finalsku', 'false');
12
- $jip.ajax({
13
- 'url': url,
14
- 'data': data,
15
- type: 'POST',
16
- async: true,
17
- success: function(data){
18
- if (data){
19
- $jip('.iparcelsku').text(data.sku);
20
- $jip('.iparcelsku').attr('finalsku', 'true');
21
-
22
- iparcelPost.setStock('true');
23
 
24
- var $options = $jip('.iparceloptions');
25
- $options.empty();
26
- $jip.each(data.attributes, function(key, value){
27
- var $block = $jip('<div/>');
28
- $block.attr('id',key);
29
- $block.text(value);
30
- $options.append($block);
31
- });
32
 
33
- $jip('.iparcelstockquantity').text(data.stock);
34
- }
35
- iparcelMage.displayEligibility();
36
- }
 
 
 
37
  });
 
 
 
 
38
  }
39
- },
40
- parseHtmlEntities: function(str){
41
- var textArea = document.createElement('textarea');
42
- textArea.innerHTML = str;
43
- return textArea.value;
44
  }
 
 
 
 
 
 
45
  }
1
  var iparcelMage = {
2
+ displayEligibility: function() {
3
+ try{
4
+ $_ipar.fn.iparcel.ux.displayEligibility();
5
+ } catch(exception) {
6
+ }
7
+ },
8
+ ajax: {
9
+ post: function(sku, super_attribute, url) {
10
+ var $jip = jQuery.noConflict();
11
+ var data = super_attribute+'sku='+sku;
12
+ $jip('.' + iparcelPost.iparcelSkuClass).attr('finalsku', 'false');
13
+ $jip.ajax({
14
+ 'url': url,
15
+ 'data': data,
16
+ type: 'POST',
17
+ async: true,
18
+ success: function(data){
19
+ if (data){
20
+ $jip('.' + iparcelPost.iparcelSkuClass).text(data.sku);
21
+ $jip('.' + iparcelPost.iparcelSkuClass).attr('finalsku', 'true');
 
22
 
23
+ iparcelPost.setStock('true');
 
 
 
 
 
 
 
24
 
25
+ var $options = $jip('.' + iparcelPost.iparcelOptionsClass);
26
+ $options.empty();
27
+ $jip.each(data.attributes, function(key, value){
28
+ var $block = $jip('<div/>');
29
+ $block.attr('id',key);
30
+ $block.text(value);
31
+ $options.append($block);
32
  });
33
+
34
+ $jip('.iparcelstockquantity').text(data.stock);
35
+ }
36
+ iparcelMage.displayEligibility();
37
  }
38
+ });
 
 
 
 
39
  }
40
+ },
41
+ parseHtmlEntities: function(str){
42
+ var textArea = document.createElement('textarea');
43
+ textArea.innerHTML = str;
44
+ return textArea.value;
45
+ }
46
  }
js/iparcel/post.js CHANGED
@@ -4,60 +4,98 @@ var iparcelPost = {
4
  url: null,
5
  sku_list_cache: null,
6
  stock_list_cache: null,
7
- textSelectors: '.product-custom-option[type="text"], textarea.product-custom-option',
8
- clear: function () {
9
- $jip('.iparcelsku,.iparcelstock').remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  },
11
- single: function(sku, url){
12
- this.sku = sku;
 
 
13
  if (url.indexOf(':') == 0) {
14
  url = url.substring(1,url.length);
15
  }
16
- this.url = url+'iparcel/ajax/configurable';
 
 
17
  $jip(document).ready(function(){
18
  var $sku = $jip("<div/>");
19
- $sku.css("display","none");
20
- $sku.attr("class","iparcelsku");
21
  $sku.text(sku);
22
- $jip('form#product_addtocart_form').append($sku);
23
 
24
  var $options = $jip("<div/>");
25
- $options.css("display","none");
26
- $options.attr("class","iparceloptions");
27
- $jip('form#product_addtocart_form').append($options);
28
 
29
- $jip('.super-attribute-select').change(function(){
30
  iparcelPost.updateSelect();
31
  });
32
 
33
  // if there are '.super-attribute-select' elements, find the SKU
34
  // for the default configuration
35
- if ($jip('.super-attribute-select.required-entry').length > 0) {
36
- $jip('.super-attribute-select.required-entry').each(function() {
37
- this.validOptions = [];
38
-
39
- var self = this;
40
- $jip(this).children().each(function(){
41
- if ($jip(this).val() != '') {
42
- self.validOptions.push($jip(this).val());
43
  }
44
  });
45
 
46
- if (this.validOptions.length == 1) {
47
- // Only one valid option for this required select
48
- $jip(this).val(this.validOptions[0]);
49
  }
50
  });
 
51
  iparcelPost.updateSelect();
52
  }
 
53
  // Watch for custom option text fields, areas
54
- $jip(iparcelPost.textSelectors).change(function() {
55
  iparcelPost.updateTextfields();
56
  });
57
 
58
  var $iterator = 0;
 
 
59
  $jip(document).bind('DOMNodeInserted', function(e){
60
- if ($jip(e.target).attr('class') == 'swatch-link'){
61
  $jip(e.target).click(iparcelPost.update);
62
  if ($iterator++ == 0){
63
  var target = e.target;
@@ -70,87 +108,105 @@ var iparcelPost = {
70
  }
71
  });
72
 
73
- $jip('.swatch-link').click(iparcelPost.update);
74
  });
75
  },
 
76
  update: function(){
77
  var $this = $jip(this);
78
  var id = $this.parent().attr('id').split('option')[1];
79
  var val = $this.attr('id').split('swatch')[1];
80
  var super_attribute = '';
81
- $jip('.super-attribute-select').each(function(){
 
82
  var $this = $jip(this);
83
  if ($this.attr('name') != 'super_attribute['+id+']'){
84
- super_attribute+=$this.attr('name')+'='+$this.val()+'&';
85
  }
86
  });
87
- iparcelMage.ajax.post(iparcelPost.sku,super_attribute,iparcelPost.url);
 
88
  },
 
89
  updateSelect: function () {
90
  iparcelPost.setStock('false');
91
  var $this = $jip(this);
92
  var super_attribute = '';
93
- $jip('.super-attribute-select, .product-custom-option').each(function () {
 
94
  var $this = $jip(this);
95
  super_attribute += $this.attr('name') + '=' + $this.val() + '&';
96
  });
 
97
  iparcelMage.ajax.post(iparcelPost.sku, super_attribute, iparcelPost.url);
98
  },
 
99
  updateTextfields: function() {
100
  iparcelPost.setStock('false');
101
  var custom_options = '';
102
- $jip(iparcelPost.textSelectors).each(function() {
 
103
  var $this = $jip(this);
104
  custom_options += $this.attr('name') + '=' + $this.val() + '&';
105
  });
 
106
  iparcelMage.ajax.post(iparcelPost.sku, custom_options, iparcelPost.url);
107
  },
 
108
  stock: function(qty){
109
- $jip(document).ready(function(){
110
  var $stock = $jip("<div/>");
111
- $stock.css("display","none");
112
- $stock.attr("class","iparcelstock");
113
  $stock.text(qty > 0 ? 'true' : 'false');
114
- $jip('form#product_addtocart_form').append($stock);
115
  });
116
  },
 
117
  setStock: function(value){
118
- $jip('.iparcelstock').text(value);
119
  },
 
120
  sku_list: function (sku_list) {
121
- this.sku_list_cache = sku_list;
122
- $jip(document).ready(function(){
 
123
  $jip.each(sku_list, function(sku,name){
124
  name = iparcelMage.parseHtmlEntities(name);
125
  var $sku = $jip("<div/>");
126
- $sku.css("display","none");
127
- $sku.attr("class","iparcelsku");
128
  $sku.text(sku);
129
  iparcelPost.append($sku,name);
130
  });
131
  });
132
- $jip(document).ajaxSuccess(function(data){
 
133
  iparcelPost.sku_list(sku_list);
134
  });
135
  },
 
136
  stock_list: function(stock_list){
137
  this.stock_list_cache = stock_list;
138
- $jip(document).ready(function(){
 
139
  $jip.each(stock_list, function(name,qty){
140
  name = iparcelMage.parseHtmlEntities(name);
141
  var $stock = $jip("<div/>");
142
- $stock.css("display","none");
143
- $stock.attr("class","iparcelstock");
144
  $stock.text(qty > 0 ? 'true' : 'false');
145
  iparcelPost.append($stock,name);
146
  });
147
  });
148
  },
 
149
  append: function(item,name){
150
- var $item = $jip('.item .product-name a').filter(function () {
151
  return $jip(this).text() == name;
152
  });
153
- $item.closest('.item').append(item);
 
154
  }
155
  };
156
 
@@ -158,12 +214,12 @@ Ajax.Responders.register({
158
  onComplete: function(args){
159
  iparcelPost.sku_list(iparcelPost.sku_list_cache);
160
  iparcelPost.stock_list(iparcelPost.stock_list_cache);
161
- if( typeof iparcel.session !== "undefined" ) {
162
- if( typeof iparcel.session.content !== "undefined" ) {
163
- if( typeof iparcel.session.content.locale !== "undefined" && iparcel.session.content.locale == "US" ) {
 
164
  $_ipar(iparcel.settings.productListingPriceElement).css("visibility","visible");
165
- }
166
- else{
167
  iparcel.ux.displayEligibility();
168
  }
169
  }
4
  url: null,
5
  sku_list_cache: null,
6
  stock_list_cache: null,
7
+
8
+ // Class names
9
+ iparcelSkuClass: 'iparcelsku',
10
+ iparcelStockClass: 'iparcelstock',
11
+ iparcelOptionsClass: 'iparcelOptions',
12
+ swatchLinkClass: 'swatch-link',
13
+
14
+ // Selectors
15
+ productAddToCartFormSelector: 'form#product_addtocart_form',
16
+ textSelector: '.product-custom-option[type="text"], textarea.product-custom-option',
17
+ superAttributeSelector: '.super-attribute-select',
18
+ requiredSuperAttributeSelector: '.super-attribute-select.required-entry',
19
+ productCustomOptionSelector: '.super-attribute-select, .product-custom-option',
20
+ productNameAnchorSelector: '.item .product-name a',
21
+ itemSelector: '.item',
22
+
23
+ updateProperties: function(sourceObject) {
24
+ for (var propertyName in iparcelPost) {
25
+ if (propertyName.substr(-5) === 'Class'
26
+ || propertyName.substr(-8) === 'Selector')
27
+ {
28
+ // Check for the propertyName to be set in the sourceObject
29
+ if (sourceObject.hasOwnProperty(propertyName)
30
+ && sourceObject[propertyName] !== null)
31
+ {
32
+ iparcelPost[propertyName] = sourceObject[propertyName];
33
+ }
34
+ }
35
+ }
36
+ },
37
+
38
+ clear: function() {
39
+ $jip('.' + iparcelPost.iparcelSkuClass + ', .' + iparcelPost.iparcelStockClass).remove();
40
  },
41
+
42
+ single: function(sku, url) {
43
+ iparcelPost.sku = sku;
44
+
45
  if (url.indexOf(':') == 0) {
46
  url = url.substring(1,url.length);
47
  }
48
+
49
+ iparcelPost.url = url+'iparcel/ajax/configurable';
50
+
51
  $jip(document).ready(function(){
52
  var $sku = $jip("<div/>");
53
+ $sku.css("display", "none");
54
+ $sku.attr("class", iparcelPost.iparcelSkuClass);
55
  $sku.text(sku);
56
+ $jip(iparcelPost.productAddToCartFormSelector).append($sku);
57
 
58
  var $options = $jip("<div/>");
59
+ $options.css("display", "none");
60
+ $options.attr("class", iparcelPost.iparcelOptionsClass);
61
+ $jip(iparcelPost.productAddToCartFormSelector).append($options);
62
 
63
+ $jip(iparcelPost.superAttributeSelector).change(function(){
64
  iparcelPost.updateSelect();
65
  });
66
 
67
  // if there are '.super-attribute-select' elements, find the SKU
68
  // for the default configuration
69
+ if ($jip(iparcelPost.requiredSuperAttributeSelector).length > 0) {
70
+ $jip(iparcelPost.requiredSuperAttributeSelector).each(function() {
71
+ iparcelPost.validOptions = [];
72
+ var self = iparcelPost;
73
+
74
+ $jip(iparcelPost).children().each(function(){
75
+ if ($jip(iparcelPost).val() != '') {
76
+ self.validOptions.push($jip(iparcelPost).val());
77
  }
78
  });
79
 
80
+ if (iparcelPost.validOptions.length == 1) {
81
+ // Only one valid option for iparcelPost required select
82
+ $jip(iparcelPost).val(iparcelPost.validOptions[0]);
83
  }
84
  });
85
+
86
  iparcelPost.updateSelect();
87
  }
88
+
89
  // Watch for custom option text fields, areas
90
+ $jip(iparcelPost.textSelector).change(function() {
91
  iparcelPost.updateTextfields();
92
  });
93
 
94
  var $iterator = 0;
95
+
96
+ // Handle swatch clicks
97
  $jip(document).bind('DOMNodeInserted', function(e){
98
+ if ($jip(e.target).attr('class') == iparcelPost.swatchLinkClass){
99
  $jip(e.target).click(iparcelPost.update);
100
  if ($iterator++ == 0){
101
  var target = e.target;
108
  }
109
  });
110
 
111
+ $jip('.' + iparcelPost.swatchLinkClass).click(iparcelPost.update);
112
  });
113
  },
114
+
115
  update: function(){
116
  var $this = $jip(this);
117
  var id = $this.parent().attr('id').split('option')[1];
118
  var val = $this.attr('id').split('swatch')[1];
119
  var super_attribute = '';
120
+
121
+ $jip(iparcelPost.superAttributeSelector).each(function(){
122
  var $this = $jip(this);
123
  if ($this.attr('name') != 'super_attribute['+id+']'){
124
+ super_attribute += $this.attr('name') + '=' + $this.val() + '&';
125
  }
126
  });
127
+
128
+ iparcelMage.ajax.post(iparcelPost.sku, super_attribute, iparcelPost.url);
129
  },
130
+
131
  updateSelect: function () {
132
  iparcelPost.setStock('false');
133
  var $this = $jip(this);
134
  var super_attribute = '';
135
+
136
+ $jip(iparcelPost.productCustomOptionSelector).each(function () {
137
  var $this = $jip(this);
138
  super_attribute += $this.attr('name') + '=' + $this.val() + '&';
139
  });
140
+
141
  iparcelMage.ajax.post(iparcelPost.sku, super_attribute, iparcelPost.url);
142
  },
143
+
144
  updateTextfields: function() {
145
  iparcelPost.setStock('false');
146
  var custom_options = '';
147
+
148
+ $jip(iparcelPost.textSelector).each(function() {
149
  var $this = $jip(this);
150
  custom_options += $this.attr('name') + '=' + $this.val() + '&';
151
  });
152
+
153
  iparcelMage.ajax.post(iparcelPost.sku, custom_options, iparcelPost.url);
154
  },
155
+
156
  stock: function(qty){
157
+ $jip(document).ready(function() {
158
  var $stock = $jip("<div/>");
159
+ $stock.css("display", "none");
160
+ $stock.attr("class", iparcelPost.iparcelStockClass);
161
  $stock.text(qty > 0 ? 'true' : 'false');
162
+ $jip(iparcelPost.productAddToCartFormSelector).append($stock);
163
  });
164
  },
165
+
166
  setStock: function(value){
167
+ $jip('.' + iparcelPost.iparcelStockClass).text(value);
168
  },
169
+
170
  sku_list: function (sku_list) {
171
+ iparcelPost.sku_list_cache = sku_list;
172
+
173
+ $jip(document).ready(function() {
174
  $jip.each(sku_list, function(sku,name){
175
  name = iparcelMage.parseHtmlEntities(name);
176
  var $sku = $jip("<div/>");
177
+ $sku.css("display", "none");
178
+ $sku.attr("class", iparcelPost.iparcelSkuClass);
179
  $sku.text(sku);
180
  iparcelPost.append($sku,name);
181
  });
182
  });
183
+
184
+ $jip(document).ajaxSuccess(function(data) {
185
  iparcelPost.sku_list(sku_list);
186
  });
187
  },
188
+
189
  stock_list: function(stock_list){
190
  this.stock_list_cache = stock_list;
191
+
192
+ $jip(document).ready(function() {
193
  $jip.each(stock_list, function(name,qty){
194
  name = iparcelMage.parseHtmlEntities(name);
195
  var $stock = $jip("<div/>");
196
+ $stock.css("display", "none");
197
+ $stock.attr("class", iparcelPost.iparcelStockClass);
198
  $stock.text(qty > 0 ? 'true' : 'false');
199
  iparcelPost.append($stock,name);
200
  });
201
  });
202
  },
203
+
204
  append: function(item,name){
205
+ var $item = $jip(iparcelPost.productNameAnchorSelector).filter(function () {
206
  return $jip(this).text() == name;
207
  });
208
+
209
+ $item.closest(iparcelPost.itemSelector).append(item);
210
  }
211
  };
212
 
214
  onComplete: function(args){
215
  iparcelPost.sku_list(iparcelPost.sku_list_cache);
216
  iparcelPost.stock_list(iparcelPost.stock_list_cache);
217
+ p
218
+ if (typeof iparcel.session !== "undefined") {
219
+ if (typeof iparcel.session.content !== "undefined") {
220
+ if (typeof iparcel.session.content.locale !== "undefined" && iparcel.session.content.locale == "US") {
221
  $_ipar(iparcel.settings.productListingPriceElement).css("visibility","visible");
222
+ } else {
 
223
  iparcel.ux.displayEligibility();
224
  }
225
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>iparcel_connect</name>
4
- <version>3.2.2</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-09-30</date>
20
- <time>20:37:26</time>
21
- <contents><target name="mageweb"><dir name="app"><dir name="code"><dir name="community"><dir name="Iparcel"><dir name="GlobaleCommerce"><dir name="Block"><file name="Cpf.php" hash="084f9bd9599539adcfb3684b9b2aca46"/><dir name="Payment"><file name="Info.php" hash="cbc97ba5326777dfc1192409be1de364"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="777136c54e9edaf0a4f218c477439f17"/><file name="DevController.php" hash="c76afd120afb3d23c4176d584c0b4c75"/><file name="OrderController.php" hash="cd1039a98f466f763ee8b3f2abeb725a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="13d82fdb42fad3c9ccf2d474cf287797"/><file name="config.xml" hash="9f9e384ef9384874c5bb4454465d65b8"/><file name="system.xml" hash="be476b5bde0b43e484b7c8b4f0fff18e"/></dir><dir name="Helper"><file name="Api.php" hash="e6ccd2cee450298d71e6514bdf9bdefd"/><file name="Data.php" hash="33cac3c2511b7e3a3bb045db60863a8c"/><file name="String.php" hash="13620129b7a2d8aa3dfaabaa8a17526e"/><dir name="Sales"><file name="Data.php" hash="6f7f15b86012d9e5e6b48cccdbbac7f1"/></dir></dir><dir name="Model"><dir name="Api"><dir name="External"><dir name="Sales"><file name="Order.php" hash="7da6d518749e4751b8844d404c987c09"/></dir></dir></dir><dir name="Carrier"><file name="Iparcel.php" hash="79bdbdbbac238774e519a1ba1ba581eb"/></dir><dir name="Cpf"><file name="Order.php" hash="51bf749b00a9b51e2f6f39a7e9734d86"/><file name="Quote.php" hash="6af90f0a33e0c02ba041bb6ff5882d7d"/></dir><file name="Cpf.php" hash="650bbe60bae37b3e43d8686378a2282b"/><file name="Parcel.php" hash="e9325c49bc67983c075b5bba76bc243a"/><dir name="Payment"><file name="Iparcel.php" hash="9e409ecd268225c713a180abe17c3a94"/></dir><dir name="Resource"><dir name="Api"><file name="Order.php" hash="2daf80f9a3be2c687b1ae3d9561c4305"/></dir><dir name="Cpf"><file name="Collection.php" hash="ac85f294739a7a892f60a63ca9dc8217"/><file name="Order.php" hash="e8391efb37ceecba5c6c73a2ff474b91"/><file name="Quote.php" hash="0a4687a32ebc264888e2eb21e885d938"/><dir name="Order"><file name="Collection.php" hash="7f8406d9e4a901183b36c8d0e85c1b87"/></dir><dir name="Quote"><file name="Collection.php" hash="08f0e8427111a34878ed8b711f13b5cf"/></dir></dir><file name="Cpf.php" hash="8e459e3535510675d9d7a1867d244008"/><file name="Parcel.php" hash="389b267d69b196454fbc97e9287cbca5"/><file name="Setup.php" hash="4752a060c3cf972f30d503b3d7f7ce70"/><dir name="Parcel"><file name="Collection.php" hash="3009eb727415705ae5f83739c007804c"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Observer.php" hash="22e58f9e21b4ca3cd41f611bdd479a57"/></dir><file name="Order.php" hash="3e24b0b9a493a295f70684da3bb8b37e"/><dir name="Quote"><file name="Observer.php" hash="b9ac9f1f2323765b482dd4970ed2c7e8"/></dir></dir></dir><dir name="sql"><dir name="ipglobalecommerce_setup"><file name="mysql4-install-0.2.0.php" hash="a2d77ada0a1ed47fc9983cc3dfbb6c52"/><file name="mysql4-install-0.3.0.php" hash="a2d77ada0a1ed47fc9983cc3dfbb6c52"/><file name="mysql4-install-2.3.4.2.php" hash="deaea497fbb845739102375833116f90"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="d08b88d172a58246d27cfe8b1b25b353"/><file name="mysql4-upgrade-0.3.1-0.3.2.php" hash="55d56591823e441d4f5f8c34c4067922"/><file name="mysql4-upgrade-0.3.2-2.0.0.php" hash="d78bde958b23787eb243a2f0ab3814eb"/><file name="mysql4-upgrade-2.0.0-2.3.4.2.php" hash="caa9c9b26eb98a662e62d28adf1475f4"/><file name="mysql4-upgrade-2.4.0.3-2.4.1.0.php" hash="e67007d6ccc67dbcfb226c5601f8c8f0"/><file name="mysql4-upgrade-2.4.1.17-2.4.3.0.php" hash="aaca3b01138aedeaee8edc1cc231736f"/><file name="mysql4-upgrade-2.4.1.6-2.4.1.7.php" hash="fe16b8c574899d242e8b07889c823605"/><file name="mysql4-upgrade-2.4.6-2.4.7.php" hash="27d32d4c780813ef93de0b3512235af2"/></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="a52b559f0bad602fd329eaa2f9b6a91c"/><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="add977e3b85ae8c08914874f02a288b3"/></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="template"><dir name="ipglobalecommerce"><file name="cpf.phtml" hash="6f7835f5df6f6baabaf6a136a372469a"/></dir><dir name="iparcel"><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 name="layout"><file name="externalshipping.xml" hash="3d6f4472442849cdb356ce9a8c33da65"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="externalsales.xml" hash="990ecce7258a8f6586d41efde1f29e13"/><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="etc"><dir name="modules"><file name="Iparcel_GlobaleCommerce.xml" hash="0dc1ebffdd8d16f0da230acdf7c76901"/><file name="Iparcel_All.xml" hash="89e4b47a6ac9aa0b82f70b1539d587ea"/></dir></dir><dir name="locale"><dir name="en_US"><file name="iparcel.csv" hash="cbcb75a490376ca0b63c8c66622c1656"/></dir></dir></dir><dir name="var"><dir name="connect"><file name="iparcel_connect.xml" hash="d212a8922aadf484676e74a880ad86eb"/></dir></dir><dir name="js"><dir name="iparcel"><dir name="adminhtml"><file name="label.js" hash="39bf27f07ff782dcde65480d4ff04496"/><file name="label.js" hash="39bf27f07ff782dcde65480d4ff04496"/><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><file name="cpf.js" hash="92443ee9633827b535044aebbdaeef87"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="iparcel"><dir name="font"><file name="code128.ttf" hash=""/></dir><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_connect</name>
4
+ <version>3.2.3</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-03-06</date>
20
+ <time>21:46:51</time>
21
+ <contents><target name="mageweb"><dir name="app"><dir name="code"><dir name="community"><dir name="Iparcel"><dir name="GlobaleCommerce"><dir name="Block"><file name="Cpf.php" hash="084f9bd9599539adcfb3684b9b2aca46"/><dir name="Payment"><file name="Info.php" hash="cbc97ba5326777dfc1192409be1de364"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="777136c54e9edaf0a4f218c477439f17"/><file name="DevController.php" hash="c76afd120afb3d23c4176d584c0b4c75"/><file name="OrderController.php" hash="7e5a68e14b6aa8da0e7d35eca26ab48b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="13d82fdb42fad3c9ccf2d474cf287797"/><file name="config.xml" hash="323a5637c80577d72ec9875b6af750e8"/><file name="system.xml" hash="569c2d14d196bfc0d9b10e70842cc570"/></dir><dir name="Helper"><file name="Api.php" hash="e6ccd2cee450298d71e6514bdf9bdefd"/><file name="Data.php" hash="33cac3c2511b7e3a3bb045db60863a8c"/><file name="String.php" hash="13620129b7a2d8aa3dfaabaa8a17526e"/><dir name="Sales"><file name="Data.php" hash="6f7f15b86012d9e5e6b48cccdbbac7f1"/></dir></dir><dir name="Model"><dir name="Api"><dir name="External"><dir name="Sales"><file name="Order.php" hash="ffd4989b4e66de8a84ca9192cfa5b5c0"/></dir></dir></dir><dir name="Carrier"><file name="Iparcel.php" hash="79bdbdbbac238774e519a1ba1ba581eb"/></dir><dir name="Cpf"><file name="Order.php" hash="51bf749b00a9b51e2f6f39a7e9734d86"/><file name="Quote.php" hash="6af90f0a33e0c02ba041bb6ff5882d7d"/></dir><file name="Cpf.php" hash="650bbe60bae37b3e43d8686378a2282b"/><file name="Parcel.php" hash="e9325c49bc67983c075b5bba76bc243a"/><dir name="Payment"><file name="Iparcel.php" hash="9e409ecd268225c713a180abe17c3a94"/></dir><dir name="Resource"><dir name="Api"><file name="Order.php" hash="2daf80f9a3be2c687b1ae3d9561c4305"/></dir><dir name="Cpf"><file name="Collection.php" hash="ac85f294739a7a892f60a63ca9dc8217"/><file name="Order.php" hash="e8391efb37ceecba5c6c73a2ff474b91"/><file name="Quote.php" hash="0a4687a32ebc264888e2eb21e885d938"/><dir name="Order"><file name="Collection.php" hash="7f8406d9e4a901183b36c8d0e85c1b87"/></dir><dir name="Quote"><file name="Collection.php" hash="08f0e8427111a34878ed8b711f13b5cf"/></dir></dir><file name="Cpf.php" hash="8e459e3535510675d9d7a1867d244008"/><file name="Parcel.php" hash="389b267d69b196454fbc97e9287cbca5"/><file name="Setup.php" hash="4752a060c3cf972f30d503b3d7f7ce70"/><dir name="Parcel"><file name="Collection.php" hash="3009eb727415705ae5f83739c007804c"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Observer.php" hash="22e58f9e21b4ca3cd41f611bdd479a57"/></dir><file name="Order.php" hash="3e24b0b9a493a295f70684da3bb8b37e"/><dir name="Quote"><file name="Observer.php" hash="b9ac9f1f2323765b482dd4970ed2c7e8"/></dir></dir></dir><dir name="sql"><dir name="ipglobalecommerce_setup"><file name="mysql4-install-0.2.0.php" hash="a2d77ada0a1ed47fc9983cc3dfbb6c52"/><file name="mysql4-install-0.3.0.php" hash="a2d77ada0a1ed47fc9983cc3dfbb6c52"/><file name="mysql4-install-2.3.4.2.php" hash="deaea497fbb845739102375833116f90"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="d08b88d172a58246d27cfe8b1b25b353"/><file name="mysql4-upgrade-0.3.1-0.3.2.php" hash="55d56591823e441d4f5f8c34c4067922"/><file name="mysql4-upgrade-0.3.2-2.0.0.php" hash="d78bde958b23787eb243a2f0ab3814eb"/><file name="mysql4-upgrade-2.0.0-2.3.4.2.php" hash="caa9c9b26eb98a662e62d28adf1475f4"/><file name="mysql4-upgrade-2.4.0.3-2.4.1.0.php" hash="e67007d6ccc67dbcfb226c5601f8c8f0"/><file name="mysql4-upgrade-2.4.1.17-2.4.3.0.php" hash="aaca3b01138aedeaee8edc1cc231736f"/><file name="mysql4-upgrade-2.4.1.6-2.4.1.7.php" hash="fe16b8c574899d242e8b07889c823605"/><file name="mysql4-upgrade-2.4.6-2.4.7.php" hash="27d32d4c780813ef93de0b3512235af2"/></dir></dir></dir><dir name="All"><file name=".DS_Store" hash="65fe18d18b7cbf3a93481181e55cd396"/><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="9512604a09d94b728aa9a94933edd7a4"/><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="template"><dir name="ipglobalecommerce"><file name="cpf.phtml" hash="6f7835f5df6f6baabaf6a136a372469a"/></dir><dir name="iparcel"><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 name="layout"><file name="externalshipping.xml" hash="3d6f4472442849cdb356ce9a8c33da65"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="externalsales.xml" hash="990ecce7258a8f6586d41efde1f29e13"/><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="etc"><dir name="modules"><file name="Iparcel_GlobaleCommerce.xml" hash="0dc1ebffdd8d16f0da230acdf7c76901"/><file name="Iparcel_All.xml" hash="89e4b47a6ac9aa0b82f70b1539d587ea"/></dir></dir><dir name="locale"><dir name="en_US"><file name="iparcel.csv" hash="cbcb75a490376ca0b63c8c66622c1656"/></dir></dir></dir><dir name="var"><dir name="connect"><file name="iparcel_connect.xml" hash="d212a8922aadf484676e74a880ad86eb"/></dir></dir><dir name="js"><dir name="iparcel"><dir name="adminhtml"><file name="label.js" hash="39bf27f07ff782dcde65480d4ff04496"/><file name="label.js" hash="39bf27f07ff782dcde65480d4ff04496"/><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><file name="cpf.js" hash="92443ee9633827b535044aebbdaeef87"/><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></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="iparcel"><dir name="font"><file name="code128.ttf" hash=""/><file name="code128.ttf" hash=""/></dir><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
+ }