iparcel_connect - Version 3.1.1

Version Notes

Notes

Download this release

Release Info

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


Code changes from version 3.1.0 to 3.1.1

Files changed (37) hide show
  1. app/code/community/Iparcel/All/Block/Catalog/Product/List.php +9 -0
  2. app/code/community/Iparcel/All/Block/Sales/Order/Totals/Duty.php +1 -1
  3. app/code/community/Iparcel/All/Block/Sales/Order/Totals/Tax.php +1 -1
  4. app/code/community/Iparcel/All/Helper/Api.php +154 -131
  5. app/code/community/Iparcel/All/Model/Carrier/Abstract.php +47 -0
  6. app/code/community/Iparcel/All/Model/Carrier/Iparcel.php +1 -38
  7. app/code/community/Iparcel/All/Model/Config/Script/Js.php +0 -5
  8. app/code/community/Iparcel/All/Model/Observer.php +9 -3
  9. app/code/community/Iparcel/All/Model/Payment/Iparcel.php +13 -0
  10. app/code/community/Iparcel/All/Model/Quote/Address/Total/Abstract.php +2 -1
  11. app/code/community/Iparcel/All/Model/Quote/Address/Total/Collector.php +2 -2
  12. app/code/community/Iparcel/All/Model/Quote/Address/Total/Duty.php +1 -1
  13. app/code/community/Iparcel/All/Model/Quote/Address/Total/Tax.php +1 -1
  14. app/code/community/Iparcel/All/Model/System/Config/Catalog/Mapping.php +2 -0
  15. app/code/community/Iparcel/All/controllers/Adminhtml/Iparcel/Sync/AjaxController.php +36 -34
  16. app/code/community/Iparcel/GlobaleCommerce/Helper/Api.php +0 -52
  17. app/code/community/Iparcel/GlobaleCommerce/Helper/Api/External.php +0 -84
  18. app/code/community/Iparcel/GlobaleCommerce/Model/Carrier/Iparcel.php +1 -37
  19. app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Date/Monthday.php +0 -23
  20. app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Date/Weekday.php +0 -23
  21. app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Time/Hour.php +0 -23
  22. app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Time/Minute.php +0 -23
  23. app/code/community/Iparcel/GlobaleCommerce/Model/Observer.php +0 -89
  24. app/code/community/Iparcel/GlobaleCommerce/Model/Payment/Iparcel.php +1 -5
  25. app/code/community/Iparcel/GlobaleCommerce/Model/Sales/Order.php +22 -0
  26. app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Catalog/Product/Attribute.php +0 -31
  27. app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Catalog/Product/Attribute/Boolean.php +0 -33
  28. app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Date/Weekday.php +0 -30
  29. app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Sales/Order/Status.php +0 -24
  30. app/code/community/Iparcel/GlobaleCommerce/controllers/AjaxController.php +12 -0
  31. app/code/community/Iparcel/GlobaleCommerce/controllers/DevController.php +8 -4
  32. app/code/community/Iparcel/GlobaleCommerce/controllers/OrderController.php +10 -9
  33. app/code/community/Iparcel/GlobaleCommerce/etc/config.xml +6 -37
  34. app/code/community/Iparcel/GlobaleCommerce/etc/system.xml +1 -1
  35. app/design/adminhtml/default/default/template/iparcel/sync/ajax/catalog.phtml +1 -1
  36. app/design/adminhtml/default/default/template/iparcel/sync/ajax/checkitems.phtml +1 -1
  37. package.xml +4 -4
app/code/community/Iparcel/All/Block/Catalog/Product/List.php CHANGED
@@ -59,6 +59,15 @@ class Iparcel_All_Block_Catalog_Product_List extends Mage_Catalog_Block_Product_
59
  }
60
  }
61
 
 
 
 
 
 
 
 
 
 
62
  return $this->_productCollection;
63
  }
64
 
59
  }
60
  }
61
 
62
+ // If "checkItems" is enabled, call the CartHandoff API model to
63
+ // check the items in the product collection
64
+ if (Mage::getStoreConfig('iparcel/international_customer/checkitems')) {
65
+ $handoffApi = Mage::helper('ipcarthandoff/api');
66
+ if (is_object($handoffApi)) {
67
+ $handoffApi->checkItems($this->_productCollection);
68
+ }
69
+ }
70
+
71
  return $this->_productCollection;
72
  }
73
 
app/code/community/Iparcel/All/Block/Sales/Order/Totals/Duty.php CHANGED
@@ -20,7 +20,7 @@ class Iparcel_All_Block_Sales_Order_Totals_Duty extends Iparcel_All_Block_Sales_
20
  $value = $source->getIparcelDutyAmount();
21
 
22
  $this->getParentBlock()->addTotal(new Varien_Object(array(
23
- 'code' => 'iparcel_duty',
24
  'strong' => false,
25
  'label' => Mage::helper('iparcel')->getDutyLabel(),
26
  'value' => $value
20
  $value = $source->getIparcelDutyAmount();
21
 
22
  $this->getParentBlock()->addTotal(new Varien_Object(array(
23
+ 'code' => Mage::getModel('iparcel/payment_iparcel')->getDutyCode(),
24
  'strong' => false,
25
  'label' => Mage::helper('iparcel')->getDutyLabel(),
26
  'value' => $value
app/code/community/Iparcel/All/Block/Sales/Order/Totals/Tax.php CHANGED
@@ -20,7 +20,7 @@ class Iparcel_All_Block_Sales_Order_Totals_Tax extends Iparcel_All_Block_Sales_O
20
  $value = $source->getIparcelTaxAmount();
21
 
22
  $this->getParentBlock()->addTotal(new Varien_Object(array(
23
- 'code' => 'iparcel_tax',
24
  'strong' => false,
25
  'label' => Mage::helper('iparcel')->getTaxLabel(),
26
  'value' => $value
20
  $value = $source->getIparcelTaxAmount();
21
 
22
  $this->getParentBlock()->addTotal(new Varien_Object(array(
23
+ 'code' => Mage::getModel('iparcel/payment_iparcel')->getTaxCode(),
24
  'strong' => false,
25
  'label' => Mage::helper('iparcel')->getTaxLabel(),
26
  'value' => $value
app/code/community/Iparcel/All/Helper/Api.php CHANGED
@@ -86,7 +86,15 @@ class Iparcel_All_Helper_Api
86
  );
87
  }
88
 
89
- protected function _getProductAttribute($product, $code) {
 
 
 
 
 
 
 
 
90
  $attribute = Mage::getModel('eav/entity_attribute')
91
  ->load(Mage::getStoreConfig('catalog_mapping/attributes/' . $code));
92
  if ($attribute->getData()) {
@@ -175,81 +183,36 @@ class Iparcel_All_Helper_Api
175
  */
176
  public function quote(Mage_Shipping_Model_Rate_Request $request)
177
  {
178
- // log init
 
 
 
 
179
  $log = Mage::getModel('iparcel/log');
180
- /* var $log Iparcel_All_Model_Api_Log */
 
181
  $log->setController('Quote');
182
- $quote = Mage::getModel('checkout/cart')->getQuote();
183
- /* var $quote Mage_Sales_Model_Quote */
184
- $shippingAddress = $quote->getShippingAddress();
185
- /* var $shippingAddress Mage_Sales_Model_Quote_Address */
186
- $billingAddress = $quote->getBillingAddress();
187
- /* var $billingAddress Mage_Sales_Model_Quote_Address */
188
  $json = array();
189
- $addressInfo = array();
190
- $billingStreet = $billingAddress->getStreet();
191
- $billing = array();
192
- $billing['City'] = $billingAddress->getCity();
193
- $billing['CountryCode'] = $billingAddress->getCountryId();
194
- $billing['Email'] = $quote->getCustomerEmail();
195
- $billing['FirstName'] = $billingAddress->getFirstname();
196
- $billing['LastName'] = $billingAddress->getLastname();
197
- $billing['Phone'] = $billingAddress->getTelephone();
198
- $billing['PostCode'] = $billingAddress->getPostcode();
199
- $billing['Region'] = $billingAddress->getRegion();
200
- for ($i=0; $i<count($billingStreet); $i++) {
201
- $billing['Street'.($i+1)] = $billingStreet[$i];
202
- }
203
- $addressInfo['Billing'] = $billing;
204
- $shippingStreet = explode("\n", $request->getDestStreet());
205
- $shipping = array();
206
- $shipping['City'] = $request->getDestCity();
207
- $shipping['CountryCode'] = $request->getDestCountryId();
208
- $shipping['Email'] = $quote->getCustomerEmail();
209
- $shipping['FirstName'] = $shippingAddress->getFirstname();
210
- $shipping['LastName'] = $shippingAddress->getLastname();
211
- $shipping['Phone'] = $shippingAddress->getTelephone();
212
- $shipping['PostCode'] = $request->getDestPostcode();
213
- $shipping['Region'] = $request->getDestRegionCode();
214
- foreach($shippingStreet as $key => $value) {
215
- $shipping['Street' . ($key + 1)] = $value;
216
- }
217
- $addressInfo['Shipping'] = $shipping;
218
- $addressInfo['ControlNumber'] = $quote->getCpf();
219
  $json['AddressInfo'] = $addressInfo;
220
  $json['CurrencyCode'] = $request->getPackageCurrency()->getCurrencyCode();
221
  $json['DDP'] = true;
 
222
  $itemsList = array();
223
  foreach ($request->getAllItems() as $item) {
224
- /* var $item Mage_Sales_Model_Quote_Item */
 
 
 
225
  $itemProduct = Mage::getModel('catalog/product')->load($item->getProductId());
226
- /* var $itemProduct Mage_Catalog_Model_Product */
227
- //get item price
228
- $itemPrice = (float)$this->_getProductAttribute($item->getProduct(), 'final_price') ?: (float)$this->_getProductAttribute($item->getProduct(), 'price');
229
- // if not price and item has parent (is configurable)
230
- if (!$itemPrice && ($parent=$item->getParentItem())) {
231
- // get parent price
232
- $itemPrice = (float)$this->_getProductAttribute($parent->getProduct(), 'final_price') ?: (float)$this->_getProductAttribute($parent->getProduct(), 'price');
233
- }
234
- // if still not price
235
- if (!$itemPrice) {
236
- // get product price
237
- $itemPrice = (float)$this->_getProductAttribute($item->getProduct(), 'price');
238
- }
239
- // if product isn't virtual and is configurable or downloadable
240
  if ($item["is_virtual"] == false && !in_array($itemProduct->getTypeId(), array('configurable','downloadable'))) {
241
- // add line item node
242
- $lineItem = array();
243
- $lineItem['SKU'] = $item->getSku();
244
- $lineItem['ValueUSD'] = $itemPrice;
245
- $lineItem['CustLengthInches'] = (float)$this->_getProductAttribute($item->getProduct(), 'length');
246
- $lineItem['CustHeightInches'] = (float)$this->_getProductAttribute($item->getProduct(), 'height');
247
- $lineItem['CustWidthInches'] = (float)$this->_getProductAttribute($item->getProduct(), 'width');
248
- $lineItem['CustWeightLbs'] = (float)$this->_getProductAttribute($item->getProduct(), 'weight');
249
- $lineItem['Quantity'] = $item->getTotalQty();
250
- $lineItem['ValueShopperCurrency'] = $itemPrice;
251
- $lineItem['ShopperCurrency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
252
- $itemsList[] = $lineItem;
253
  }
254
  }
255
  $json['ItemDetailsList'] = $itemsList;
@@ -325,57 +288,34 @@ class Iparcel_All_Helper_Api
325
  */
326
  public function submitParcel(Mage_Sales_Model_Order_Shipment $shipment)
327
  {
 
 
 
 
328
  $order = $shipment->getOrder();
329
- // init log
330
  $log = Mage::getModel('iparcel/log');
331
- /* var $log Iparcel_All_Model_Api_Log */
 
332
  $log->setController('Submit Parcel');
333
- $shippingAddress = $order->getShippingAddress();
334
- /* var $shippingAddress Mage_Sales_Model_Quote_Address */
335
- $billingAddress = $order->getBillingAddress();
336
- /* var $billingAddress Mage_Sales_Model_Quote_Address */
 
 
337
  $json = array();
338
- $addressInfo = array();
339
- $billingStreet = $billingAddress->getStreet();
340
- $billing = array();
341
- $billing['City'] = $billingAddress->getCity();
342
- $billing['CountryCode'] = $billingAddress->getCountryId();
343
- $billing['Email'] = $order->getCustomerEmail();
344
- $billing['FirstName'] = $billingAddress->getFirstname();
345
- $billing['LastName'] = $billingAddress->getLastname();
346
- $billing['Phone'] = $billingAddress->getTelephone();
347
- $billing['PostCode'] = $billingAddress->getPostcode();
348
- $billing['Region'] = $billingAddress->getRegion();
349
- $billing['Street1'] = $billingStreet[0];
350
- if (array_key_exists(1, $billingStreet)) {
351
- $billing['Street2'] = $billingStreet[1];
352
- }
353
- $addressInfo['Billing'] = $billing;
354
- $shippingStreet = $shippingAddress->getStreet();
355
- $shipping = array();
356
- $shipping['City'] = $shippingAddress->getCity();
357
- $shipping['CountryCode'] = $shippingAddress->getCountryId();
358
- $shipping['Email'] = $order->getCustomerEmail();
359
- $shipping['FirstName'] = $shippingAddress->getFirstname();
360
- $shipping['LastName'] = $shippingAddress->getLastname();
361
- $shipping['Phone'] = $shippingAddress->getTelephone();
362
- $shipping['PostCode'] = $shippingAddress->getPostcode();
363
- $shipping['Region'] = $shippingAddress->getRegion();
364
- $shipping['Street1'] = $shippingStreet[0];
365
- if (array_key_exists(1, $shippingStreet)) {
366
- $shipping['Street2'] = $shippingStreet[1];
367
- }
368
- $addressInfo['Shipping'] = $shipping;
369
- $addressInfo['ControlNumber'] = $order->getCpf();
370
  $json['AddressInfo'] = $addressInfo;
371
  $json['CurrencyCode'] = $order->getOrderCurrencyCode();
372
  $json['DDP'] = true;
 
373
  $shipmentItems = $shipment->getAllItems();
374
  $itemsList = array();
375
  foreach ($shipmentItems as $item) {
376
- /** @var $item Mage_Sales_Model_Order_Shipment_Item */
377
- // Check for a configurable product -- the simple should be loaded
378
- /** @var $itemProduct Mage_Catalog_Model_Product */
 
 
379
  $orderItem = $item->getOrderItem();
380
  if ($orderItem->getProductType() == "configurable") {
381
  $itemProduct = $orderItem->getChildrenItems();
@@ -383,32 +323,10 @@ class Iparcel_All_Helper_Api
383
  } else {
384
  $itemProduct = Mage::getModel('catalog/product')->load($item->getOrderItem()->getProductId());
385
  }
386
- //get item price
387
- $itemPrice = (float)$this->_getProductAttribute($item->getProduct(), 'final_price') ?: (float)$this->_getProductAttribute($item->getProduct(), 'price');
388
- // if not price and item has parent (is configurable)
389
- if (!$itemPrice && ($parent=$item->getParentItem())) {
390
- // get parent price
391
- $itemPrice = (float)$this->_getProductAttribute($parent->getProduct(), 'final_price') ?: (float)$this->_getProductAttribute($parent->getProduct(), 'price');
392
- }
393
- // if still not price
394
- if (!$itemPrice) {
395
- // get product price
396
- $itemPrice = (float)$this->_getProductAttribute($item->getProduct(), 'price');
397
- }
398
  // if product isn't virtual and is configurable or downloadable
399
  if ($item["is_virtual"] == false && !in_array($itemProduct->getTypeId(), array('configurable','downloadable'))) {
400
- // add line item node
401
- $lineItem = array();
402
- $lineItem['SKU'] = $item->getSku();
403
- $lineItem['ValueUSD'] = $itemPrice;
404
- $lineItem['CustLengthInches'] = (float)$this->_getProductAttribute($item->getProduct(), 'length');
405
- $lineItem['CustHeightInches'] = (float)$this->_getProductAttribute($item->getProduct(), 'height');
406
- $lineItem['CustWidthInches'] = (float)$this->_getProductAttribute($item->getProduct(), 'width');
407
- $lineItem['CustWeightLbs'] = (float)$this->_getProductAttribute($item->getProduct(), 'weight');
408
- $lineItem['Quantity'] = (float)$item->getQty();
409
- $lineItem['ValueShopperCurrency'] = $itemPrice;
410
- $lineItem['ShopperCurrency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
411
- $itemsList[] = $lineItem;
412
  }
413
  }
414
  $json['ItemDetailsList'] = $itemsList;
@@ -824,6 +742,111 @@ class Iparcel_All_Helper_Api
824
  return $result;
825
  }
826
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827
  /**
828
  * Set the URLs for API Calls.
829
  *
86
  );
87
  }
88
 
89
+ /**
90
+ * Finds the value of attribute matching the extension's configuration
91
+ *
92
+ * @param Mage_Catalog_Model_Product $product
93
+ * @param string $code Attribute code
94
+ * @return string
95
+ */
96
+ protected function _getProductAttribute(Mage_Catalog_Model_Product $product, $code)
97
+ {
98
  $attribute = Mage::getModel('eav/entity_attribute')
99
  ->load(Mage::getStoreConfig('catalog_mapping/attributes/' . $code));
100
  if ($attribute->getData()) {
183
  */
184
  public function quote(Mage_Shipping_Model_Rate_Request $request)
185
  {
186
+ /**
187
+ * @var Mage_Sales_Model_Quote $quote
188
+ * @var Iparcel_All_Model_Api_Log $log
189
+ */
190
+ $quote = Mage::getModel('checkout/cart')->getQuote();
191
  $log = Mage::getModel('iparcel/log');
192
+
193
+ // init log
194
  $log->setController('Quote');
195
+
196
+ /**
197
+ * @var array $addressInfo AddressInfo segment of API call
198
+ * @var array $json Array to be sent to the API
199
+ */
200
+ $addressInfo = $this->_prepareAddress($quote, $request);
201
  $json = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  $json['AddressInfo'] = $addressInfo;
203
  $json['CurrencyCode'] = $request->getPackageCurrency()->getCurrencyCode();
204
  $json['DDP'] = true;
205
+
206
  $itemsList = array();
207
  foreach ($request->getAllItems() as $item) {
208
+ /**
209
+ * @var Mage_Sales_Model_Quote_Item $item
210
+ * @var Mage_Catalog_Model_Product $itemProduct
211
+ */
212
  $itemProduct = Mage::getModel('catalog/product')->load($item->getProductId());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  if ($item["is_virtual"] == false && !in_array($itemProduct->getTypeId(), array('configurable','downloadable'))) {
214
+ $itemDetails = $this->_getItemDetails($item);
215
+ $itemsList[] = $itemDetails;
 
 
 
 
 
 
 
 
 
 
216
  }
217
  }
218
  $json['ItemDetailsList'] = $itemsList;
288
  */
289
  public function submitParcel(Mage_Sales_Model_Order_Shipment $shipment)
290
  {
291
+ /**
292
+ * @var Mage_Sales_Model_Order $order
293
+ * @var Iparcel_All_Model_Api_Log $log
294
+ */
295
  $order = $shipment->getOrder();
 
296
  $log = Mage::getModel('iparcel/log');
297
+
298
+ // init log
299
  $log->setController('Submit Parcel');
300
+
301
+ /**
302
+ * @var array $addressInfo AddressInfo segment of API call
303
+ * @var array $json Array to be sent to the API
304
+ */
305
+ $addressInfo = $this->_prepareAddress($order);
306
  $json = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  $json['AddressInfo'] = $addressInfo;
308
  $json['CurrencyCode'] = $order->getOrderCurrencyCode();
309
  $json['DDP'] = true;
310
+
311
  $shipmentItems = $shipment->getAllItems();
312
  $itemsList = array();
313
  foreach ($shipmentItems as $item) {
314
+ /**
315
+ * Check for a configurable product -- the simple should be loaded
316
+ * @var Mage_Sales_Model_Order_Shipment_Item $item
317
+ * @var Mage_Catalog_Model_Product $itemProduct
318
+ */
319
  $orderItem = $item->getOrderItem();
320
  if ($orderItem->getProductType() == "configurable") {
321
  $itemProduct = $orderItem->getChildrenItems();
323
  } else {
324
  $itemProduct = Mage::getModel('catalog/product')->load($item->getOrderItem()->getProductId());
325
  }
 
 
 
 
 
 
 
 
 
 
 
 
326
  // if product isn't virtual and is configurable or downloadable
327
  if ($item["is_virtual"] == false && !in_array($itemProduct->getTypeId(), array('configurable','downloadable'))) {
328
+ $itemDetails = $this->_getItemDetails($item);
329
+ $itemsList[] = $itemDetails;
 
 
 
 
 
 
 
 
 
 
330
  }
331
  }
332
  $json['ItemDetailsList'] = $itemsList;
742
  return $result;
743
  }
744
 
745
+ /**
746
+ * Accepts a Magento quote or order, then returns an address formatted for
747
+ * the API
748
+ *
749
+ * @param object $object Object to extract address information from
750
+ * @param bool $request If provided, this shipping rate request is used
751
+ * @return array Address information formatted for API requests
752
+ */
753
+ private function _prepareAddress($object, $request = false)
754
+ {
755
+ /**
756
+ * @var Mage_Sales_Model_Quote_Address $shippingAddress
757
+ * @var Mage_Sales_Model_Quote_Address $billingAddress
758
+ * @var array $formattedAddress
759
+ */
760
+ $shippingAddress = $object->getShippingAddress();
761
+ $billingAddress = $object->getBillingAddress();
762
+ $formattedAddress = array();
763
+
764
+ $formattedAddress['Billing'] = $this->_getAddressArray(
765
+ $billingAddress,
766
+ $object->getCustomerEmail()
767
+ );
768
+
769
+ $formattedAddress['Shipping'] = $this->_getAddressArray(
770
+ $shippingAddress,
771
+ $object->getCustomerEmail(),
772
+ $request
773
+ );
774
+
775
+ $formattedAddress['ControlNumber'] = $object->getCpf();
776
+
777
+ return $formattedAddress;
778
+ }
779
+
780
+ /**
781
+ * Used by _prepareAddress() to generate an array of Address information
782
+ *
783
+ * @param object $address Address to act on
784
+ * @param string $emailAddress Email address of the user
785
+ * @param object|bool $request If provided, this shipping rate request is used
786
+ * @return array Formatted address array
787
+ */
788
+ private function _getAddressArray($address, $emailAddress, $request = false)
789
+ {
790
+ $formattedAddress = array();
791
+ $formattedAddress['City'] = $request ? $request->getDestCity() : $address->getCity();
792
+ $formattedAddress['CountryCode'] = $request ? $request->getDestCountryId() : $address->getCountryId();
793
+ $formattedAddress['Email'] = $emailAddress;
794
+ $formattedAddress['FirstName'] = $address->getFirstname();
795
+ $formattedAddress['LastName'] = $address->getLastname();
796
+ $formattedAddress['Phone'] = $address->getTelephone();
797
+ $formattedAddress['PostCode'] = $request ? $request->getDestPostcode() : $address->getPostcode();
798
+ $formattedAddress['Region'] = $request ? $request->getDestRegionCode() : $address->getRegion();
799
+
800
+ $street = $request ? explode('\n', $request->getDestStreet()) : $address->getStreet();
801
+ for ($i=0; $i<count($street); $i++) {
802
+ $formattedAddress['Street'.($i+1)] = $street[$i];
803
+ }
804
+
805
+ return $formattedAddress;
806
+ }
807
+
808
+ /**
809
+ * Prepares an item for API requests
810
+ *
811
+ * @param $item
812
+ * @return array
813
+ */
814
+ private function _getItemDetails($item)
815
+ {
816
+ // Find the corresponding product for the item
817
+ $itemProduct = $item->getProduct();
818
+ if (!$itemProduct) {
819
+ $itemProduct = Mage::getModel('catalog/product')
820
+ ->loadByAttribute('sku', $item->getSku());
821
+ }
822
+
823
+ // Find the price of the product
824
+ $itemPrice = (float)$this->_getProductAttribute($itemProduct, 'final_price') ?: (float)$this->_getProductAttribute($itemProduct, 'price');
825
+ // if no price and item has parent (is configurable)
826
+ if (!$itemPrice && ($parent = $item->getParentItem())) {
827
+ // get parent price
828
+ $itemPrice = (float)$this->_getProductAttribute($parent->getProduct(), 'final_price') ?: (float)$this->_getProductAttribute($parent->getProduct(), 'price');
829
+ }
830
+ // if still no price
831
+ if (!$itemPrice) {
832
+ // get product price
833
+ $itemPrice = (float)$this->_getProductAttribute($itemProduct, 'price');
834
+ }
835
+
836
+ $lineItem = array();
837
+ $lineItem['SKU'] = $item->getSku();
838
+ $lineItem['ValueUSD'] = $itemPrice;
839
+ $lineItem['CustLengthInches'] = (float)$this->_getProductAttribute($itemProduct, 'length');
840
+ $lineItem['CustHeightInches'] = (float)$this->_getProductAttribute($itemProduct, 'height');
841
+ $lineItem['CustWidthInches'] = (float)$this->_getProductAttribute($itemProduct, 'width');
842
+ $lineItem['CustWeightLbs'] = (float)$this->_getProductAttribute($itemProduct, 'weight');
843
+ $lineItem['Quantity'] = $item->getTotalQty() ?: $item->getQty();
844
+ $lineItem['ValueShopperCurrency'] = $itemPrice;
845
+ $lineItem['ShopperCurrency'] = Mage::app()->getStore()->getCurrentCurrencyCode();
846
+
847
+ return $lineItem;
848
+ }
849
+
850
  /**
851
  * Set the URLs for API Calls.
852
  *
app/code/community/Iparcel/All/Model/Carrier/Abstract.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * i-parcel shipping method model
4
+ *
5
+ * @category Iparcel
6
+ * @package Iparcel_All
7
+ * @author Bobby Burden <bburden@i-parcel.com>
8
+ */
9
+ abstract class Iparcel_All_Model_Carrier_Abstract extends Mage_Shipping_Model_Carrier_Abstract
10
+ {
11
+ protected $_trackingUrl = 'https://tracking.i-parcel.com/secure/track.aspx?track=';
12
+
13
+ /**
14
+ * Check if carrier has shipping label option available
15
+ *
16
+ * @return bool
17
+ */
18
+ public function isShippingLabelsAvailable()
19
+ {
20
+ return true;
21
+ }
22
+
23
+ /**
24
+ * Check if carrier has shipping tracking option available
25
+ *
26
+ * @return bool
27
+ */
28
+ public function isTrackingAvailable()
29
+ {
30
+ return true;
31
+ }
32
+
33
+ /**
34
+ * Get info for track order page
35
+ *
36
+ * @param string $number Tracking Number
37
+ * @return Varien_Object
38
+ */
39
+ public function getTrackingInfo($number)
40
+ {
41
+ return new Varien_Object(array(
42
+ 'tracking' => $number,
43
+ 'carrier_title' => $this->getConfigData('title'),
44
+ 'url' => $this->_trackingUrl.$number
45
+ ));
46
+ }
47
+ }
app/code/community/Iparcel/All/Model/Carrier/Iparcel.php CHANGED
@@ -6,47 +6,10 @@
6
  * @package Iparcel_All
7
  * @author Bobby Burden <bburden@i-parcel.com>
8
  */
9
- class Iparcel_All_Model_Carrier_Iparcel extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
10
  {
11
  protected $_code = 'iparcel';
12
 
13
- protected $_trackingUrl = 'https://tracking.i-parcel.com/secure/track.aspx?track=';
14
-
15
- /**
16
- * Check if carrier has shipping label option available
17
- *
18
- * @return bool
19
- */
20
- public function isShippingLabelsAvailable()
21
- {
22
- return true;
23
- }
24
-
25
- /**
26
- * Check if carrier has shipping tracking option available
27
- *
28
- * @return bool
29
- */
30
- public function isTrackingAvailable()
31
- {
32
- return true;
33
- }
34
-
35
- /**
36
- * Get info for track order page
37
- *
38
- * @param string $number Tracking Number
39
- * @return Varien_Object
40
- */
41
- public function getTrackingInfo($number)
42
- {
43
- return new Varien_Object(array(
44
- 'tracking' => $number,
45
- 'carrier_title' => $this->getConfigData('title'),
46
- 'url' => $this->_trackingUrl.$number
47
- ));
48
- }
49
-
50
  /**
51
  * Return container types of carrier
52
  *
6
  * @package Iparcel_All
7
  * @author Bobby Burden <bburden@i-parcel.com>
8
  */
9
+ class Iparcel_All_Model_Carrier_Iparcel extends Iparcel_All_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
10
  {
11
  protected $_code = 'iparcel';
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  /**
14
  * Return container types of carrier
15
  *
app/code/community/Iparcel/All/Model/Config/Script/Js.php CHANGED
@@ -21,11 +21,6 @@ class Iparcel_All_Model_Config_Script_Js extends Mage_Adminhtml_Model_System_Con
21
 
22
  $file = $uploadDir.'/'.$this->getValue();
23
 
24
- // if it's delete action and file exists
25
- if ($delete && file_exists($file)) {
26
- unlink($file);
27
- }
28
-
29
  // if it's set new action and old file exists
30
  $file = $uploadDir.'/'. $_FILES['groups']['name'][$this->getGroupId()]['fields'][$this->getField()]['value'];
31
  if (file_exists($file)) {
21
 
22
  $file = $uploadDir.'/'.$this->getValue();
23
 
 
 
 
 
 
24
  // if it's set new action and old file exists
25
  $file = $uploadDir.'/'. $_FILES['groups']['name'][$this->getGroupId()]['fields'][$this->getField()]['value'];
26
  if (file_exists($file)) {
app/code/community/Iparcel/All/Model/Observer.php CHANGED
@@ -33,8 +33,10 @@ class Iparcel_All_Model_Observer
33
  return;
34
  }
35
 
 
 
36
  $order = $observer->getShipment()->getOrder();
37
- if ($order->getShippingCarrier() && $order->getShippingCarrier()->getCarrierCode() == 'iparcel') {
38
  $api = Mage::helper('iparcel/api');
39
  $response = $api->submitParcel($shipment);
40
 
@@ -74,8 +76,11 @@ class Iparcel_All_Model_Observer
74
  if (!$order->getQuote()) {
75
  return;
76
  }
 
 
 
77
  // if it's i-parcel shipping method
78
- if ($order->getShippingCarrier() && $order->getShippingCarrier()->getCarrierCode() != 'iparcel') {
79
  return;
80
  }
81
 
@@ -189,8 +194,9 @@ class Iparcel_All_Model_Observer
189
  $iparcelDuty = $shippingAddress->getIparcelDutyAmount();
190
  } else {
191
  $carrier = $cart->getSalesEntity()->getShippingCarrier();
 
192
 
193
- if (is_object($carrier) && $carrier->getCarrierCode() == 'iparcel') {
194
  $iparcelTax = $cart->getSalesEntity()->getIparcelTaxAmount();
195
  $iparcelDuty = $cart->getSalesEntity()->getIparcelDutyAmount();
196
  }
33
  return;
34
  }
35
 
36
+ $iparcelCarrierCode = Mage::getModel('iparcel/payment_iparcel')->getCode();
37
+
38
  $order = $observer->getShipment()->getOrder();
39
+ if ($order->getShippingCarrier() && $order->getShippingCarrier()->getCarrierCode() == $iparcelCarrierCode) {
40
  $api = Mage::helper('iparcel/api');
41
  $response = $api->submitParcel($shipment);
42
 
76
  if (!$order->getQuote()) {
77
  return;
78
  }
79
+
80
+ $iparcelCarrierCode = Mage::getModel('iparcel/payment_iparcel')->getCode();
81
+
82
  // if it's i-parcel shipping method
83
+ if ($order->getShippingCarrier() && $order->getShippingCarrier()->getCarrierCode() != $iparcelCarrierCode) {
84
  return;
85
  }
86
 
194
  $iparcelDuty = $shippingAddress->getIparcelDutyAmount();
195
  } else {
196
  $carrier = $cart->getSalesEntity()->getShippingCarrier();
197
+ $iparcelCarrierCode = Mage::getModel('iparcel/payment_iparcel')->getCode();
198
 
199
+ if (is_object($carrier) && $carrier->getCarrierCode() == $iparcelCarrierCode) {
200
  $iparcelTax = $cart->getSalesEntity()->getIparcelTaxAmount();
201
  $iparcelDuty = $cart->getSalesEntity()->getIparcelDutyAmount();
202
  }
app/code/community/Iparcel/All/Model/Payment/Iparcel.php CHANGED
@@ -13,4 +13,17 @@ class Iparcel_All_Model_Payment_Iparcel extends Mage_Payment_Model_Method_Abstra
13
  protected $_canUseForMultishipping = false;
14
  protected $_canUseInternal = false;
15
  protected $_canCapture = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
13
  protected $_canUseForMultishipping = false;
14
  protected $_canUseInternal = false;
15
  protected $_canCapture = true;
16
+
17
+ protected $_taxCode = 'iparcel_tax';
18
+ protected $_dutyCode = 'iparcel_duty';
19
+
20
+ public function getTaxCode()
21
+ {
22
+ return $this->_taxCode;
23
+ }
24
+
25
+ public function getDutyCode()
26
+ {
27
+ return $this->_dutyCode;
28
+ }
29
  }
app/code/community/Iparcel/All/Model/Quote/Address/Total/Abstract.php CHANGED
@@ -16,9 +16,10 @@ class Iparcel_All_Model_Quote_Address_Total_Abstract extends Mage_Sales_Model_Qu
16
  */
17
  public function isIparcelShipping($address)
18
  {
 
19
  $shippingMethod = $address->getShippingMethod();
20
  $shippingMethod = explode('_', $shippingMethod);
21
- if ($shippingMethod[0] == 'iparcel') {
22
  return true;
23
  }
24
  return false;
16
  */
17
  public function isIparcelShipping($address)
18
  {
19
+ $iparcelCarrierCode = Mage::getModel('iparcel/payment_iparcel')->getCode();
20
  $shippingMethod = $address->getShippingMethod();
21
  $shippingMethod = explode('_', $shippingMethod);
22
+ if ($shippingMethod[0] == $iparcelCarrierCode) {
23
  return true;
24
  }
25
  return false;
app/code/community/Iparcel/All/Model/Quote/Address/Total/Collector.php CHANGED
@@ -17,8 +17,8 @@ class Iparcel_All_Model_Quote_Address_Total_Collector extends Mage_Sales_Model_Q
17
  $collectors = parent::getCollectors();
18
 
19
  $totals = array(
20
- 'iparcel_tax',
21
- 'iparcel_duty',
22
  'grand_total',
23
  'reward',
24
  'giftcardaccount',
17
  $collectors = parent::getCollectors();
18
 
19
  $totals = array(
20
+ Mage::getModel('iparcel/payment_iparcel')->getTaxCode(),
21
+ Mage::getModel('iparcel/payment_iparcel')->getDutyCode(),
22
  'grand_total',
23
  'reward',
24
  'giftcardaccount',
app/code/community/Iparcel/All/Model/Quote/Address/Total/Duty.php CHANGED
@@ -10,7 +10,7 @@ class Iparcel_All_Model_Quote_Address_Total_Duty extends Iparcel_All_Model_Quote
10
  {
11
  public function __construct()
12
  {
13
- $this->setCode('iparcel_duty');
14
  }
15
 
16
  /**
10
  {
11
  public function __construct()
12
  {
13
+ $this->setCode(Mage::getModel('iparcel/payment_iparcel')->getDutyCode());
14
  }
15
 
16
  /**
app/code/community/Iparcel/All/Model/Quote/Address/Total/Tax.php CHANGED
@@ -10,7 +10,7 @@ class Iparcel_All_Model_Quote_Address_Total_Tax extends Iparcel_All_Model_Quote_
10
  {
11
  public function __construct()
12
  {
13
- $this->setCode('iparcel_tax');
14
  }
15
 
16
  /**
10
  {
11
  public function __construct()
12
  {
13
+ $this->setCode(Mage::getModel('iparcel/payment_iparcel')->getTaxCode());
14
  }
15
 
16
  /**
app/code/community/Iparcel/All/Model/System/Config/Catalog/Mapping.php CHANGED
@@ -66,5 +66,7 @@ class Iparcel_All_Model_System_Config_Catalog_Mapping extends Mage_Core_Model_Co
66
  throw new Exception(Mage::helper('cron')->__('Unable to remove the cron expression'));
67
  }
68
  }
 
 
69
  }
70
  }
66
  throw new Exception(Mage::helper('cron')->__('Unable to remove the cron expression'));
67
  }
68
  }
69
+
70
+ return parent::_afterSave();
71
  }
72
  }
app/code/community/Iparcel/All/controllers/Adminhtml/Iparcel/Sync/AjaxController.php CHANGED
@@ -108,51 +108,53 @@ class Iparcel_All_Adminhtml_Iparcel_Sync_AjaxController extends Mage_Adminhtml_C
108
  }
109
  }
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  /**
112
  * Submit Catalog request action
113
  */
114
  public function catalogAction()
115
  {
116
- // if is xmlHttp Request
117
- if ($this->getRequest()->isXmlHttpRequest()) {
118
- // proceed it
119
- $params = $this->getRequest()->getParams();
120
- $params['type'] = '_'.$params['type'].'CatalogResponse';
121
- if (method_exists($this, $params['type'])) {
122
- $_response = $this->$params['type']($params);
123
- $this->getResponse()
124
- ->setHeader('Content-type', 'application/json', true)
125
- ->setBody(json_encode($_response));
126
- return;
127
- }
128
- } else {
129
- // show layout if not
130
- $this->loadLayout();
131
- $this->renderLayout();
132
- }
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  /**
136
  * Check Items request action
137
  */
138
  public function checkitemsAction()
139
  {
140
- // if is xmlHttp Request
141
- if ($this->getRequest()->isXmlHttpRequest()) {
142
- // proceed it
143
- $params = $this->getRequest()->getParams();
144
- $params['type'] = '_'.$params['type'].'CheckItemsResponse';
145
- if (method_exists($this, $params['type'])) {
146
- $_response = $this->$params['type']($params);
147
- $this->getResponse()
148
- ->setHeader('Content-type', 'application/json', true)
149
- ->setBody(json_encode($_response));
150
- return;
151
- }
152
- } else {
153
- // show layout if not
154
- $this->loadLayout();
155
- $this->renderLayout();
156
- }
157
  }
158
  }
108
  }
109
  }
110
 
111
+ /**
112
+ * Submit Catalog request json action
113
+ */
114
+ public function catalogJsonAction()
115
+ {
116
+ $params = $this->getRequest()->getParams();
117
+ $params['type'] = '_'.$params['type'].'CatalogResponse';
118
+ if (method_exists($this, $params['type'])) {
119
+ $_response = $this->$params['type']($params);
120
+ $this->getResponse()
121
+ ->setHeader('Content-type', 'application/json', true)
122
+ ->setBody(json_encode($_response));
123
+ return;
124
+ }
125
+ }
126
+
127
  /**
128
  * Submit Catalog request action
129
  */
130
  public function catalogAction()
131
  {
132
+ $this->loadLayout();
133
+ $this->renderLayout();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
135
 
136
+ /**
137
+ * Check Items request json action
138
+ */
139
+ public function checkitemsJsonAction()
140
+ {
141
+ $params = $this->getRequest()->getParams();
142
+ $params['type'] = '_'.$params['type'].'CheckItemsResponse';
143
+ if (method_exists($this, $params['type'])) {
144
+ $_response = $this->$params['type']($params);
145
+ $this->getResponse()
146
+ ->setHeader('Content-type', 'application/json', true)
147
+ ->setBody(json_encode($_response));
148
+ return;
149
+ }
150
+ }
151
+
152
  /**
153
  * Check Items request action
154
  */
155
  public function checkitemsAction()
156
  {
157
+ $this->loadLayout();
158
+ $this->renderLayout();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
160
  }
app/code/community/Iparcel/GlobaleCommerce/Helper/Api.php CHANGED
@@ -11,56 +11,4 @@
11
  */
12
  class Iparcel_GlobaleCommerce_Helper_Api extends Iparcel_All_Helper_Api
13
  {
14
- /**
15
- * Send Sales Rule request
16
- *
17
- * Takes the passed SalesRules and transforms it into data that can be
18
- * passed to the API. It then submits the request as JSON to the
19
- * SalesRule API endpoint.
20
- *
21
- * @param Mage_SalesRule_Model_Resource_Rule_Collection Collection of SalesRules to submit
22
- * @return string Response from the SalesRule request
23
- */
24
- public function salesRule(Mage_SalesRule_Model_Resource_Rule_Collection $_collection)
25
- {
26
- $log = Mage::getModel('iparcel/log');
27
- $log->setController('Sales Rule');
28
-
29
- $json = array();
30
- $json['key'] = Mage::helper('ipglobalecommerce')->getGuid();
31
- $json['ItemDetailsList'] = array();
32
-
33
- foreach ($_collection as $_rule) {
34
- /* var $_rule Mage_SalesRule_Model_Rule */
35
- $item = array();
36
- $item['Name'] = $_rule->getName();
37
- $item['FormDate'] = $_rule->getFromDate();
38
- $item['ToDate'] = $_rule->getToDate();
39
- $item['IsActive'] = $_rule->getIsActive();
40
- $item['StopRulesProcessing'] = $_rule->getStopRulesProcessing();
41
- $item['SimpleAction'] = $_rule->getSimpleAction();
42
- $item['DiscountAmount'] = $_rule->getDiscountAmount();
43
- $item['DiscountQty'] = $_rule->getDiscountQty();
44
- $item['DiscountStep'] = $_rule->getDiscountStep();
45
- $item['SimpleFreeShipping'] = $_rule->getSimpleFreeShipping();
46
- $item['ApplyToShipping'] = $_rule->getApplyToShipping();
47
- $item['TimesUsed'] = $_rule->getTimesUsed();
48
- $item['CouponType'] = $_rule->getCouponType();
49
-
50
- $item['Conditions'] = unserialize($_rule->getConditionsSerialized());
51
- $item['Actions'] = unserialize($_rule->getActionsSerialized());
52
-
53
- $json['ItemDetailsList'][] = $item;
54
- }
55
-
56
- $log->setRequest(json_encode($json));
57
-
58
- // FIXME: This API Call is no longer used. Should it be removed?
59
- $response = $this->_restJSON($json, null);
60
-
61
- $log->setResponse($response);
62
- $log->save();
63
-
64
- return json_decode($response);
65
- }
66
  }
11
  */
12
  class Iparcel_GlobaleCommerce_Helper_Api extends Iparcel_All_Helper_Api
13
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  }
app/code/community/Iparcel/GlobaleCommerce/Helper/Api/External.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
- /**
3
- * External API Helper
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Helper_Api_External
10
- {
11
- /*
12
- * var $_allowedAddr array
13
- *
14
- * List of allowed addresses and subnets
15
- */
16
- protected $_allowedAddr = array(
17
- '47.19.112.64/27',
18
- '23.96.0.0/18',
19
- '23.96.64.0/28',
20
- '23.96.64.64/26',
21
- '23.96.64.128/27',
22
- '23.96.64.160/28',
23
- '23.96.80.0/20',
24
- '23.96.96.0/19',
25
- '23.100.16.0/20',
26
- '137.116.112.0/20',
27
- '137.117.32.0/19',
28
- '137.117.64.0/18',
29
- '137.135.64.0/18',
30
- '157.56.176.0/21',
31
- '168.61.32.0/20',
32
- '168.61.48.0/21',
33
- '168.62.32.0/19',
34
- '168.62.160.0/19',
35
- '138.91.96.0/25',
36
- '138.91.96.128/26',
37
- '138.91.96.192/28',
38
- '138.91.112.0/20',
39
- '191.234.32.0/19',
40
- '191.236.0.0/19',
41
- '191.238.0.0/25',
42
- '191.238.0.128/26',
43
- '191.238.0.192/23',
44
- '191.238.1.0/24',
45
- '191.238.2.0/23',
46
- '191.238.4.0/24',
47
- '191.238.8.0/21',
48
- '191.238.16.0/20',
49
- '191.238.32.0/19',
50
- );
51
-
52
- /**
53
- * Checking if ip address matches range
54
- *
55
- * @param string $ip, string $range
56
- * @return bool
57
- */
58
- protected function _cidrMatch($ip, $range)
59
- {
60
- list ($subnet, $bits) = explode('/', $range);
61
- $ip = ip2long($ip);
62
- $subnet = ip2long($subnet);
63
- $mask = -1 << (32 - $bits);
64
- $subnet &= $mask;
65
- return ($ip & $mask) == $subnet;
66
- }
67
-
68
- /**
69
- * Checking if request ip address is allowed
70
- *
71
- * @return bool
72
- */
73
- public function isAllowed()
74
- {
75
- return true;
76
- $ip = Mage::helper('core/http')->getRemoteAddr();
77
- foreach ($this->_allowedAddr as $range) {
78
- if ($this->_cidrMatch($ip, $range)) {
79
- return true;
80
- }
81
- }
82
- return false;
83
- }
84
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/Carrier/Iparcel.php CHANGED
@@ -6,47 +6,11 @@
6
  * @package Iparcel_GlobaleCommerce
7
  * @author Bobby Burden <bburden@i-parcel.com>
8
  */
9
- class Iparcel_GlobaleCommerce_Model_Carrier_Iparcel extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
10
  {
11
  protected $_code = 'i-parcel-globalecommerce';
12
  protected $_carrier = 'i-parcel-globalecommerce';
13
  protected $_isFixed = true;
14
- protected $_trackingUrl = 'https://tracking.i-parcel.com/secure/track.aspx?track=';
15
-
16
- /**
17
- * Check if carrier has shipping label option available
18
- *
19
- * @return bool
20
- */
21
- public function isShippingLabelsAvailable()
22
- {
23
- return true;
24
- }
25
-
26
- /**
27
- * Check if carrier has shipping tracking option available
28
- *
29
- * @return bool
30
- */
31
- public function isTrackingAvailable()
32
- {
33
- return true;
34
- }
35
-
36
- /**
37
- * Get info for track order page
38
- *
39
- * @param string $number
40
- * @return Varien_Object
41
- */
42
- public function getTrackingInfo($number)
43
- {
44
- return new Varien_Object(array(
45
- 'tracking' => $number,
46
- 'carrier_title' => $this->_carrier,
47
- 'url' => $this->_trackingUrl.$number
48
- ));
49
- }
50
 
51
  /**
52
  * Do request to shipment
6
  * @package Iparcel_GlobaleCommerce
7
  * @author Bobby Burden <bburden@i-parcel.com>
8
  */
9
+ class Iparcel_GlobaleCommerce_Model_Carrier_Iparcel extends Iparcel_All_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface
10
  {
11
  protected $_code = 'i-parcel-globalecommerce';
12
  protected $_carrier = 'i-parcel-globalecommerce';
13
  protected $_isFixed = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  /**
16
  * Do request to shipment
app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Date/Monthday.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
- /**
3
- * Backend model for monthday config field
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_Config_Data_Date_Monthday extends Mage_Core_Model_Config_Data
10
- {
11
- /**
12
- * Saving monthday if proper value
13
- */
14
- public function save()
15
- {
16
- $_monthday = $this->getValue();
17
- if (Mage::helper('ipglobalecommerce/string')->isInteger($_monthday) && $_monthday<=31 && $_monthday>0) {
18
- return parent::save();
19
- } else {
20
- Mage::throwException(Mage::helper('ipglobalecommerce')->__('Wrong day of month'));
21
- }
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Date/Weekday.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
- /**
3
- * Backend model for weekday config field
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_Config_Data_Date_Weekday extends Mage_Core_Model_Config_Data
10
- {
11
- /**
12
- * Saving weekday if proper value
13
- */
14
- public function save()
15
- {
16
- $_weekday = $this->getValue();
17
- if (Mage::helper('ipglobalecommerce/string')->isInteger($_weekday) && $_weekday<=7 && $_weekday>0) {
18
- return parent::save();
19
- } else {
20
- Mage::throwException(Mage::helper('ipglobalecommerce')->__('Wrong day of week'));
21
- }
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Time/Hour.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
- /**
3
- * Backend model for time hour config field
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_Config_Data_Time_Hour extends Mage_Core_Model_Config_Data
10
- {
11
- /**
12
- * Saving hour if proper value
13
- */
14
- public function save()
15
- {
16
- $_hour = $this->getValue();
17
- if (Mage::helper('ipglobalecommerce/string')->isInteger($_hour) && $_hour<24 && $_hour>=0) {
18
- return parent::save();
19
- } else {
20
- Mage::throwException(Mage::helper('ipglobalecommerce')->__('Wrong hour'));
21
- }
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/Config/Data/Time/Minute.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
- /**
3
- * Backend model for time minute config field
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_Config_Data_Time_Minute extends Mage_Core_Model_Config_Data
10
- {
11
- /**
12
- * Saving minute if proper value
13
- */
14
- public function save()
15
- {
16
- $_minute = $this->getValue();
17
- if (Mage::helper('ipglobalecommerce/string')->isInteger($_minute) && $_minute<60 && $_minute>=0) {
18
- return parent::save();
19
- } else {
20
- Mage::throwException(Mage::helper('ipglobalecommerce')->__('Wrong minute'));
21
- }
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/Observer.php DELETED
@@ -1,89 +0,0 @@
1
- <?php
2
- /**
3
- * @category Iparcel
4
- * @package Iparcel_GlobaleCommerce
5
- * @author Bobby Burden <bburden@i-parcel.com>
6
- */
7
- class Iparcel_GlobaleCommerce_Model_Observer
8
- {
9
- const MAGE_ORDER_MODEL = 'Mage_Sales_Model_Order';
10
- const IPARCEL_ORDER_MODEL = 'Iparcel_GlobaleCommerce_Model_Sales_Order';
11
-
12
- protected $_eventFlag = true;
13
- protected $_filePath = null;
14
-
15
- public function __construct()
16
- {
17
- $this->_filePath = Mage::getBaseDir('cache') . DS . self::IPARCEL_ORDER_MODEL . '.php';
18
- }
19
-
20
- /**
21
- * Create a class dynamically and apply _checkState() function by i-parcel extension
22
- */
23
- public function createCheckState($observer)
24
- {
25
- if ($this->_isOrderCreatedByExtension() && $this->_eventFlag) {
26
- $orderClass = self::MAGE_ORDER_MODEL;
27
- $iparcelOrderClass = self::IPARCEL_ORDER_MODEL;
28
- //Get class which overrides Mage_Sales_Model_Order
29
- $orderRewriteClass = Mage::getConfig()->getNode('global/models/sales/rewrite/order');
30
-
31
- //If there is any class, use it. Otherwise, use Magento default class
32
- if ($orderRewriteClass) {
33
- $orderClass = $orderRewriteClass[0];
34
- }
35
-
36
- //Create a class dynamically and apply _checkState() function by i-parcel extension
37
- $dynamicOrderString = "<?php
38
- class $iparcelOrderClass extends $orderClass
39
- {
40
- protected function _checkState()
41
- {
42
- if (Mage::registry('isExternalSale') && Mage::getStoreConfig('external_api/sales/order_status') != Mage_Sales_Model_Order::STATE_COMPLETE) {
43
- return \$this;
44
- } else {
45
- return parent::_checkState();
46
- }
47
- }
48
- }
49
- ";
50
-
51
- $cacheStatus = Mage::app()->getCacheInstance()->canUse('config');
52
-
53
- //if cache is disabled or file does not exist, write $dynamicOrderString to file
54
- if (!$cacheStatus || !file_exists($this->_filePath)) {
55
- file_put_contents($this->_filePath, $dynamicOrderString);
56
- }
57
-
58
- $fileContent = file_get_contents($this->_filePath);
59
- if ($fileContent != $dynamicOrderString) {
60
- file_put_contents($this->_filePath, $dynamicOrderString);
61
- }
62
-
63
- include $this->_filePath;
64
-
65
- Mage::getConfig()->setNode('global/models/sales/rewrite/order', $iparcelOrderClass);
66
- $this->_eventFlag = false;
67
- }
68
- }
69
-
70
- /**
71
- * Check to ensure that event model_load_before occurs when order is created by i-parcel extension
72
- *
73
- * @return boolean
74
- */
75
- protected function _isOrderCreatedByExtension()
76
- {
77
- return Mage::registry('isExternalSale') == true;
78
- }
79
-
80
- /**
81
- * Remove Iparcel_GlobaleCommerce_Model_Sales_Order_Extend file when flush or refresh cache
82
- */
83
- public function removeExtendFile($observer)
84
- {
85
- if (file_exists($this->_filePath)) {
86
- unlink($this->_filePath);
87
- }
88
- }
89
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/Payment/Iparcel.php CHANGED
@@ -6,11 +6,7 @@
6
  * @package Iparcel_GlobaleCommerce
7
  * @author Bobby Burden <bburden@i-parcel.com>
8
  */
9
- class Iparcel_GlobaleCommerce_Model_Payment_Iparcel extends Mage_Payment_Model_Method_Abstract
10
  {
11
- protected $_code = 'iparcel';
12
  protected $_infoBlockType = 'ipglobalecommerce/payment_info';
13
- protected $_canUseCheckout = false;
14
- protected $_canUseForMultishipping = false;
15
- protected $_canUseInternal = false;
16
  }
6
  * @package Iparcel_GlobaleCommerce
7
  * @author Bobby Burden <bburden@i-parcel.com>
8
  */
9
+ class Iparcel_GlobaleCommerce_Model_Payment_Iparcel extends Iparcel_All_Model_Payment_Iparcel
10
  {
 
11
  protected $_infoBlockType = 'ipglobalecommerce/payment_info';
 
 
 
12
  }
app/code/community/Iparcel/GlobaleCommerce/Model/Sales/Order.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Provides override for completed order's state
4
+ *
5
+ * @category Iparcel
6
+ * @package Iparcel_GlobaleCommerce
7
+ * @author Derek Loevenstein <dloevenstein@i-parcel.com>
8
+ */
9
+ class Iparcel_GlobaleCommerce_Model_Sales_Order extends Mage_Sales_Model_Order
10
+ {
11
+ /**
12
+ * @return Iparcel_GlobaleCommerce_Model_Sales_Order
13
+ */
14
+ protected function _checkState()
15
+ {
16
+ if (Mage::registry('isExternalSale') && Mage::getStoreConfig('external_api/sales/order_status') != Mage_Sales_Model_Order::STATE_COMPLETE) {
17
+ return $this;
18
+ } else {
19
+ return parent::_checkState();
20
+ }
21
+ }
22
+ }
app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Catalog/Product/Attribute.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /**
3
- * Source model class for backend config fields with product atributes list
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_System_Config_Source_Catalog_Product_Attribute
10
- {
11
- /**
12
- * Options list
13
- *
14
- * @return array
15
- */
16
- public function toOptionArray()
17
- {
18
- $_attributeCollection = Mage::getResourceModel('catalog/product_attribute_collection')->addVisibleFilter();
19
- /* var $_attributeCollection Mage_Catalog_Model_Resource_Product_Attribute_Collecton */
20
- $attributeCollection = array(array('value' => 0, 'label' => '<empty>'));
21
- foreach ($_attributeCollection as $_attribute) {
22
- /* var $_attribute Mage_Catalog_Model_Product_Attribute_Collection */
23
- $label = $_attribute->getFrontendLabel();
24
- $attributeCollection[] = array(
25
- 'value' => $_attribute->getAttributeId(),
26
- 'label' => (empty($label)) ? Mage::helper('catalog')->__($_attribute->getAttributeCode()) : Mage::helper('catalog')->__($label)
27
- );
28
- }
29
- return $attributeCollection;
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Catalog/Product/Attribute/Boolean.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- /**
3
- * Source model class for backend config fields with boolean product atributes
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_System_Config_Source_Catalog_Product_Attribute_Boolean
10
- {
11
- /**
12
- * Options list
13
- *
14
- * @return array
15
- */
16
- public function toOptionArray()
17
- {
18
- $_attributeCollection = Mage::getResourceModel('catalog/product_attribute_collection')
19
- ->addVisibleFilter()
20
- ->addFieldToFilter('frontend_input', 'boolean');
21
- /* var $_attributeCollection Mage_Catalog_Model_Resource_Product_Attribute_Collection */
22
- $attributeCollection = array(array('value' => 0, 'label' => '<empty>'));
23
- foreach ($_attributeCollection as $_attribute) {
24
- /* var $_attribute Mage_Catalog_Model_Product_Attribute */
25
- $label = $_attribute->getFrontendLabel();
26
- $attributeCollection[] = array(
27
- 'value' => $_attribute->getAttributeId(),
28
- 'label' => (empty($label)) ? Mage::helper('catalog')->__($_attribute->getAttributeCode()) : Mage::helper('catalog')->__($label)
29
- );
30
- }
31
- return $attributeCollection;
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Date/Weekday.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /**
3
- * Source model for catalog_mapping/config/cron_weekday config field
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_System_Config_Source_Date_Weekday
10
- {
11
- /**
12
- * Options list
13
- *
14
- * @return array
15
- */
16
- public function toOptionArray()
17
- {
18
- $array = array();
19
- for ($i=1; $i<8; $i++) {
20
- $time = mktime(0, 0, 0, 1, $i, 1970);
21
- $dayofweek = date('N', $time);
22
- $array[$dayofweek] = array(
23
- 'value' => $dayofweek,
24
- 'label' => Mage::helper('ipglobalecommerce')->__(date('l', $time))
25
- );
26
- }
27
- ksort($array, SORT_NUMERIC);
28
- return $array;
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/Model/System/Config/Source/Sales/Order/Status.php DELETED
@@ -1,24 +0,0 @@
1
- <?php
2
- /**
3
- * Source model class for external_api/sales/order_status config field
4
- *
5
- * @category Iparcel
6
- * @package Iparcel_GlobaleCommerce
7
- * @author Bobby Burden <bburden@i-parcel.com>
8
- */
9
- class Iparcel_GlobaleCommerce_Model_System_Config_Source_Sales_Order_Status
10
- {
11
- /**
12
- * Options list
13
- *
14
- * @return array
15
- */
16
- public function toOptionArray()
17
- {
18
- return array(
19
- array('value' => Mage_Sales_Model_Order::STATE_COMPLETE, 'label' => Mage::helper('ipglobalecommerce')->__('Complete')),
20
- array('value' => 'pending', 'label' => Mage::helper('ipglobalecommerce')->__('Pending')),
21
- array('value' => Mage_Sales_Model_Order::STATE_PROCESSING, 'label' => Mage::helper('ipglobalecommerce')->__('Processing'))
22
- );
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Iparcel/GlobaleCommerce/controllers/AjaxController.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once(Mage::getModuleDir('controllers', 'Iparcel_All') . DS . 'AjaxController.php');
3
+ /**
4
+ * i-parcel frontend ajax controller
5
+ *
6
+ * @category Iparcel
7
+ * @package Iparcel_All
8
+ * @author Bobby Burden <bburden@i-parcel.com>
9
+ */
10
+ class Iparcel_GlobaleCommerce_AjaxController extends Iparcel_All_AjaxController
11
+ {
12
+ }
app/code/community/Iparcel/GlobaleCommerce/controllers/DevController.php CHANGED
@@ -36,9 +36,10 @@ class Iparcel_GlobaleCommerce_DevController extends Mage_Core_Controller_Front_A
36
  foreach ($_regionCollection as $_region) {
37
  $response[$_region->getCode()] = $_region->getDefaultName();
38
  }
 
39
  $this->getResponse()
40
- ->setHeader('Content-Type', 'application/json');
41
- echo json_encode($response);
42
  }
43
 
44
  /**
@@ -76,9 +77,12 @@ class Iparcel_GlobaleCommerce_DevController extends Mage_Core_Controller_Front_A
76
  'created_at' => $_order->getCreatedAt()
77
  );
78
  }
79
- echo json_encode($response);
 
 
80
  } catch (Mage_Core_Exception $e) {
81
- echo $e->getMessage();
 
82
  }
83
  }
84
  }
36
  foreach ($_regionCollection as $_region) {
37
  $response[$_region->getCode()] = $_region->getDefaultName();
38
  }
39
+
40
  $this->getResponse()
41
+ ->setHeader('Content-Type', 'application/json')
42
+ ->setBody(json_encode($response));
43
  }
44
 
45
  /**
77
  'created_at' => $_order->getCreatedAt()
78
  );
79
  }
80
+
81
+ $this->getResponse()
82
+ ->setBody(json_encode($response));
83
  } catch (Mage_Core_Exception $e) {
84
+ $this->getResponse()
85
+ ->setBody($e->getMessage());
86
  }
87
  }
88
  }
app/code/community/Iparcel/GlobaleCommerce/controllers/OrderController.php CHANGED
@@ -40,10 +40,6 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
40
  if (strcasecmp($request->getPost('key'), Mage::helper('ipglobalecommerce')->getGuid())) {
41
  Mage::throwException('Wrong GUID key');
42
  }
43
- // checking if request IP is allowed
44
- if (!Mage::helper('ipglobalecommerce/api_external')->isAllowed()) {
45
- Mage::throwException('Access Forbidden');
46
- }
47
  return $request;
48
  }
49
 
@@ -76,7 +72,8 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
76
  // Make sure that an order doesn't already exist for this request
77
  $model->loadByTrackingNumber($tracking['number']);
78
  if ($model->getId()) {
79
- echo $model->getOrderIncrementId();
 
80
  return true;
81
  }
82
 
@@ -128,8 +125,10 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
128
  // if order created successfully
129
  $model->setStoreId(Mage::app()->getStore()->getId());
130
  if ($order = $model->createOrder()) {
131
- $invoice = $model->createInvoice();
132
- echo $order->getIncrementId();
 
 
133
  $model->setOrderIncrementId($order->getIncrementId());
134
  $model->save();
135
  }
@@ -160,12 +159,14 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
160
  // var $order Mage_Sales_Model_Order
161
  if ($order->getId()) {
162
  $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->save();
163
- echo 'Order #'.$request->getPost('order').' cancelled.';
 
164
  } else {
165
  Mage::throwException('Order no longer exists');
166
  }
167
  } catch (Mage_Core_Exception $e) {
168
- echo $e->getMessage();
 
169
  }
170
  }
171
 
40
  if (strcasecmp($request->getPost('key'), Mage::helper('ipglobalecommerce')->getGuid())) {
41
  Mage::throwException('Wrong GUID key');
42
  }
 
 
 
 
43
  return $request;
44
  }
45
 
72
  // Make sure that an order doesn't already exist for this request
73
  $model->loadByTrackingNumber($tracking['number']);
74
  if ($model->getId()) {
75
+ $this->getResponse()
76
+ ->setBody($model->getOrderIncrementId());
77
  return true;
78
  }
79
 
125
  // if order created successfully
126
  $model->setStoreId(Mage::app()->getStore()->getId());
127
  if ($order = $model->createOrder()) {
128
+ $model->createInvoice();
129
+ $this->getResponse()
130
+ ->setBody($order->getIncrementId());
131
+
132
  $model->setOrderIncrementId($order->getIncrementId());
133
  $model->save();
134
  }
159
  // var $order Mage_Sales_Model_Order
160
  if ($order->getId()) {
161
  $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->save();
162
+ $this->getResponse()
163
+ ->setBody('Order #'.$request->getPost('order').' cancelled.');
164
  } else {
165
  Mage::throwException('Order no longer exists');
166
  }
167
  } catch (Mage_Core_Exception $e) {
168
+ $this->getResponse()
169
+ ->setBody($e->getMessage());
170
  }
171
  }
172
 
app/code/community/Iparcel/GlobaleCommerce/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Iparcel_GlobaleCommerce>
5
- <version>3.1.0</version>
6
  </Iparcel_GlobaleCommerce>
7
  </modules>
8
  <frontend>
@@ -101,6 +101,11 @@
101
  </parcel>
102
  </entities>
103
  </ipglobalecommerce_resource>
 
 
 
 
 
104
  </models>
105
  <events>
106
  <sales_order_load_after>
@@ -166,42 +171,6 @@
166
  </iparcel_sales_quote_save_before_observer>
167
  </observers>
168
  </sales_quote_save_before>
169
- <model_load_before>
170
- <observers>
171
- <iparcel_model_load_before_observer>
172
- <type>singleton</type>
173
- <class>Iparcel_GlobaleCommerce_Model_Observer</class>
174
- <method>createCheckState</method>
175
- </iparcel_model_load_before_observer>
176
- </observers>
177
- </model_load_before>
178
- <adminhtml_cache_refresh_type>
179
- <observers>
180
- <iparcel_adminhtml_cache_refresh_type_observer>
181
- <type>singleton</type>
182
- <class>Iparcel_GlobaleCommerce_Model_Observer</class>
183
- <method>removeExtendFile</method>
184
- </iparcel_adminhtml_cache_refresh_type_observer>
185
- </observers>
186
- </adminhtml_cache_refresh_type>
187
- <adminhtml_cache_flush_all>
188
- <observers>
189
- <iparcel_adminhtml_cache_flush_all_observer>
190
- <type>singleton</type>
191
- <class>Iparcel_GlobaleCommerce_Model_Observer</class>
192
- <method>removeExtendFile</method>
193
- </iparcel_adminhtml_cache_flush_all_observer>
194
- </observers>
195
- </adminhtml_cache_flush_all>
196
- <adminhtml_cache_flush_system>
197
- <observers>
198
- <iparcel_adminhtml_cache_flush_system_observer>
199
- <type>singleton</type>
200
- <class>Iparcel_GlobaleCommerce_Model_Observer</class>
201
- <method>removeExtendFile</method>
202
- </iparcel_adminhtml_cache_flush_system_observer>
203
- </observers>
204
- </adminhtml_cache_flush_system>
205
  </events>
206
  <resources>
207
  <ipglobalecommerce_setup>
2
  <config>
3
  <modules>
4
  <Iparcel_GlobaleCommerce>
5
+ <version>3.1.1</version>
6
  </Iparcel_GlobaleCommerce>
7
  </modules>
8
  <frontend>
101
  </parcel>
102
  </entities>
103
  </ipglobalecommerce_resource>
104
+ <sales>
105
+ <rewrite>
106
+ <order>Iparcel_GlobaleCommerce_Model_Sales_Order</order>
107
+ </rewrite>
108
+ </sales>
109
  </models>
110
  <events>
111
  <sales_order_load_after>
171
  </iparcel_sales_quote_save_before_observer>
172
  </observers>
173
  </sales_quote_save_before>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  </events>
175
  <resources>
176
  <ipglobalecommerce_setup>
app/code/community/Iparcel/GlobaleCommerce/etc/system.xml CHANGED
@@ -77,7 +77,7 @@
77
  <order_status>
78
  <label>New Order Status</label>
79
  <frontend_type>select</frontend_type>
80
- <source_model>ipglobalecommerce/system_config_source_sales_order_status</source_model>
81
  <sort_order>114</sort_order>
82
  <show_in_default>1</show_in_default>
83
  <show_in_website>1</show_in_website>
77
  <order_status>
78
  <label>New Order Status</label>
79
  <frontend_type>select</frontend_type>
80
+ <source_model>iparcel/system_config_source_sales_order_status</source_model>
81
  <sort_order>114</sort_order>
82
  <show_in_default>1</show_in_default>
83
  <show_in_website>1</show_in_website>
app/design/adminhtml/default/default/template/iparcel/sync/ajax/catalog.phtml CHANGED
@@ -18,6 +18,6 @@
18
  </div>
19
  <script type="text/javascript">
20
  jQuery(document).ready(function() {
21
- var sync = new iparcelSync.sync('<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalog') ?>?isAjax=true', <?php echo Mage::getStoreConfig('catalog_mapping/upload/step'); ?>);
22
  })
23
  </script>
18
  </div>
19
  <script type="text/javascript">
20
  jQuery(document).ready(function() {
21
+ var sync = new iparcelSync.sync('<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalogJson') ?>', <?php echo Mage::getStoreConfig('catalog_mapping/upload/step'); ?>);
22
  })
23
  </script>
app/design/adminhtml/default/default/template/iparcel/sync/ajax/checkitems.phtml CHANGED
@@ -17,5 +17,5 @@
17
  <p>There was <span>0</span> errors when checking items</p>
18
  </div>
19
  <script type="text/javascript">
20
- var sync = new iparcelSync.sync('<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/checkitems') ?>?isAjax=true', 1);
21
  </script>
17
  <p>There was <span>0</span> errors when checking items</p>
18
  </div>
19
  <script type="text/javascript">
20
+ var sync = new iparcelSync.sync('<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/checkitemsJson') ?>', 1);
21
  </script>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>iparcel_connect</name>
4
- <version>3.1.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-05-12</date>
20
- <time>20:03:21</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="DevController.php" hash="e72f322908f4435fe39fc7a8c6d7ad07"/><file name="OrderController.php" hash="d44583efd9e552bf8ce0e019444981fc"/></dir><dir name="etc"><file name="adminhtml.xml" hash="13d82fdb42fad3c9ccf2d474cf287797"/><file name="config.xml" hash="f88b23608ee8c4d72f0dcd0e55bac78a"/><file name="system.xml" hash="ddbee53439e5fa8cab0ea696ad05001f"/></dir><dir name="Helper"><dir name="Api"><file name="External.php" hash="f1e2229ea753fdafccb5d9ca396b5279"/></dir><file name="Api.php" hash="e79a2fa92b3a5898cc9915e1cd80c522"/><file name="Data.php" hash="33cac3c2511b7e3a3bb045db60863a8c"/><file name="International.php" hash="c9c061f40810ea5a17833caa508336cd"/><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="2f37bbee7803751fb1173c289ac90151"/></dir></dir></dir><dir name="Carrier"><file name="Iparcel.php" hash="f604116aa5bc81dcd7ff2de9ad648fbf"/></dir><dir name="Config"><dir name="Data"><dir name="Date"><file name="Monthday.php" hash="d136367488f51687b4a8f1205ed1db39"/><file name="Weekday.php" hash="cfb1d0a381d74207ca5f567bdb6a6ae0"/></dir><dir name="Time"><file name="Hour.php" hash="7ee959e67a3100d60aefd31d4b626bba"/><file name="Minute.php" hash="f8376b241ad8a8e6bf35c82d75109b71"/></dir></dir></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="Observer.php" hash="cd565b3dc11533c598891631e4d266a0"/><file name="Parcel.php" hash="e9325c49bc67983c075b5bba76bc243a"/><dir name="Payment"><file name="Iparcel.php" hash="958572bf836c478161a371beb1c86139"/></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><dir name="Quote"><file name="Observer.php" hash="b9ac9f1f2323765b482dd4970ed2c7e8"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Catalog"><dir name="Product"><dir name="Attribute"><file name="Boolean.php" hash="e783073c99cc876c670d90655fb068c8"/></dir><file name="Attribute.php" hash="e3e9e3ab353ad864c40b1b7a682f169f"/></dir></dir><dir name="Date"><file name="Weekday.php" hash="8f636058187564cb7d9c2b9a0a94b10b"/></dir><dir name="Sales"><dir name="Order"><file name="Status.php" hash="484e68457cc656585665aca1300a4d4e"/></dir></dir></dir></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="2969af5eed8a1179579fa182e20cd59e"/></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="f8ae79b70c6b5ba41c7acac9be5d84c0"/><file name="Tax.php" hash="1cfee0fccb1feede23f3cdc22f57c903"/></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"/><file name="SyncController.php" hash="9378f5db27d059bbb36ff1e71bd38d32"/><dir name="Shipment"><file name="SplitController.php" hash="6a294947cf9399e42e90c890a6da2caa"/></dir><dir name="Sync"><file name="AjaxController.php" hash="ceaffb0c652954b95e83426c763a2d0d"/></dir></dir></dir><file name="AjaxController.php" hash="f6b0573eefbb21d7ac863fd029783b3c"/><file name="InfoController.php" hash="6543b1e9803489e507d2470f8e3e408b"/><file name="InternationalController.php" hash="75fc93febe96e328d5927665c33d40d1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="50bc0bee93b5612763321eae11cfdc51"/><file name="config.xml" hash="4bd33ca7a2dca415a545f524165ced48"/><file name="system.xml" hash="823d3690c187d8c3db42912d83a6303b"/></dir><dir name="Helper"><file name="Api.php" hash="d20c7a56fbc922a6bca34ea547aa3092"/><file name="Data.php" hash="0c32ec392ffb3857571f272c21d84faa"/><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="Iparcel.php" hash="ad65fdc9f7f2264e9704b0f17d89dd34"/></dir><dir name="Catalog"><dir name="Product"><file name="Observer.php" hash="d16d89cea8eea6352a7d9b1193cd9512"/></dir></dir><dir name="Config"><dir name="Script"><file name="Js.php" hash="100822286c5326c82cbc5d4ff3cf4c39"/></dir></dir><file name="Cron.php" hash="670d37cd6cdbe60aa69fad8eb0a0759e"/><file name="Log.php" hash="8c87e5f356f8ca77a186430dda106097"/><file name="Observer.php" hash="ad3c34320671927263e673e18c798a34"/><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="30ad607409d5ed225e233638ecbff39c"/></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Abstract.php" hash="a3af320e934f50651e09bfd15b86ffea"/><file name="Collector.php" hash="f99413fe415c342d5c0d582caa767ad1"/><file name="Duty.php" hash="6ef16c8b2038d5c90b4b9c7d00825da2"/><file name="Tax.php" hash="62c9e255562643a967b8c49b9914524d"/></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="8895678aa59e49226509d2b4709c5f43"/></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="5d76b072c657035cf3d7713fa6672f1f"/><file name="Subtotal.php" hash="cbd2e41f3bdc74134590a675d93d4bfb"/><file name="Tax.php" hash="ffc8d78a8d0442690c49b60f909c8e48"/></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="cfb9fbc137e7e551dfaece00ac6bb2f4"/><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"/></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="c6be54da5875c9356bba8988fa8c264c"/></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="64da446db5c1bfe892951c9b3c7f1e7d"/><file name="checkitems.phtml" hash="c19b0e4fd0feddedbc2cef3b2f4ce79b"/></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="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/></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=""/><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.1.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>2016-06-10</date>
20
+ <time>20:36:15</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="775a719275f56ddea1bff2df70249379"/></dir><dir name="etc"><file name="adminhtml.xml" hash="13d82fdb42fad3c9ccf2d474cf287797"/><file name="config.xml" hash="4ea60c7f2c14075f04077a8f45482e1c"/><file name="system.xml" hash="473cfa6606cb0f27d8d671f48866c8e3"/></dir><dir name="Helper"><file name="Api.php" hash="e6ccd2cee450298d71e6514bdf9bdefd"/><file name="Data.php" hash="33cac3c2511b7e3a3bb045db60863a8c"/><file name="International.php" hash="c9c061f40810ea5a17833caa508336cd"/><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="2f37bbee7803751fb1173c289ac90151"/></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"/><file name="SyncController.php" hash="9378f5db27d059bbb36ff1e71bd38d32"/><dir name="Shipment"><file name="SplitController.php" hash="6a294947cf9399e42e90c890a6da2caa"/></dir><dir name="Sync"><file name="AjaxController.php" hash="4ded0f9d50382ca0137d4778176d7c88"/></dir></dir></dir><file name="AjaxController.php" hash="f6b0573eefbb21d7ac863fd029783b3c"/><file name="InfoController.php" hash="6543b1e9803489e507d2470f8e3e408b"/><file name="InternationalController.php" hash="75fc93febe96e328d5927665c33d40d1"/></dir><dir name="etc"><file name="adminhtml.xml" hash="50bc0bee93b5612763321eae11cfdc51"/><file name="config.xml" hash="4bd33ca7a2dca415a545f524165ced48"/><file name="system.xml" hash="823d3690c187d8c3db42912d83a6303b"/></dir><dir name="Helper"><file name="Api.php" hash="6dcdb6fb0efb8f94ce684a5fcb409636"/><file name="Data.php" hash="0c32ec392ffb3857571f272c21d84faa"/><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="f0ea2e007c04f56befed34bc6676de80"/></dir><dir name="Catalog"><dir name="Product"><file name="Observer.php" hash="d16d89cea8eea6352a7d9b1193cd9512"/></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="3627f6e7ec5795394dfec5cf07e63bdb"/><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="6398808a9a280c30f349c236ff0dec02"/><file name="Duty.php" hash="41adb9e60a5a22e1e552eb12aa83f858"/><file name="Tax.php" hash="67bce5ef6a1ec130cebaaa3526b97112"/></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="5d76b072c657035cf3d7713fa6672f1f"/><file name="Subtotal.php" hash="cbd2e41f3bdc74134590a675d93d4bfb"/><file name="Tax.php" hash="ffc8d78a8d0442690c49b60f909c8e48"/></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="cfb9fbc137e7e551dfaece00ac6bb2f4"/><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"/></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="c6be54da5875c9356bba8988fa8c264c"/></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="ee1ecd2cf9e8e175e5ca5ceddb197376"/><file name="checkitems.phtml" hash="b47b923ef7f433e41a9bc0d118401659"/></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="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f4525e5c6bce01f9a5cea562f23618e7"/></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=""/><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>