Version Notes
Notes
Download this release
Release Info
Developer | Bobby Burden |
Extension | iparcel_connect |
Version | 3.2.0 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.2.0
- app/code/community/Iparcel/All/Helper/Api.php +23 -21
- app/code/community/Iparcel/All/Helper/Data.php +28 -1
- app/code/community/Iparcel/All/Model/Carrier/Iparcel.php +1 -1
- app/code/community/Iparcel/All/Model/Observer.php +61 -44
- app/code/community/Iparcel/All/Model/Quote/Address/Total/Collector.php +1 -1
- app/code/community/Iparcel/All/Model/Tax/Quote/Shipping.php +1 -1
- app/code/community/Iparcel/All/Model/Tax/Quote/Subtotal.php +1 -1
- app/code/community/Iparcel/All/Model/Tax/Quote/Tax.php +1 -1
- app/code/community/Iparcel/All/controllers/Adminhtml/Iparcel/Sync/AjaxController.php +30 -103
- app/code/community/Iparcel/All/controllers/Adminhtml/Iparcel/SyncController.php +0 -18
- app/code/community/Iparcel/All/controllers/InfoController.php +1 -27
- app/code/community/Iparcel/All/controllers/InternationalController.php +4 -4
- app/code/community/Iparcel/All/sql/iparcel_setup/mysql4-upgrade-1.1.0-1.1.1.php +7 -4
- app/code/community/Iparcel/GlobaleCommerce/Helper/International.php +0 -11
- app/code/community/Iparcel/GlobaleCommerce/Model/Api/External/Sales/Order.php +175 -60
- app/code/community/Iparcel/GlobaleCommerce/controllers/OrderController.php +4 -5
- app/code/community/Iparcel/GlobaleCommerce/etc/config.xml +1 -4
- app/design/adminhtml/default/default/layout/iparcel.xml +0 -11
- app/design/adminhtml/default/default/template/iparcel/sync/ajax/catalog.phtml +3 -1
- app/design/adminhtml/default/default/template/iparcel/sync/ajax/checkitems.phtml +0 -21
- js/iparcel/adminhtml/sync.js +72 -73
- package.xml +4 -4
app/code/community/Iparcel/All/Helper/Api.php
CHANGED
@@ -54,20 +54,6 @@ class Iparcel_All_Helper_Api
|
|
54 |
return $response;
|
55 |
}
|
56 |
|
57 |
-
/**
|
58 |
-
* Send REST XML requests
|
59 |
-
*
|
60 |
-
* Wrapper for _rest() that sends a SimpleXMLElement object to the API.
|
61 |
-
*
|
62 |
-
* @param SimpleXMLElement $xml XML to send
|
63 |
-
* @param string $url REST API URL to send POST data to
|
64 |
-
* @return string Response from the POST request
|
65 |
-
*/
|
66 |
-
protected function _restXML($xml, $url)
|
67 |
-
{
|
68 |
-
return $this->_rest($xml->asXml, $url, array('Content-Type: text/xml'));
|
69 |
-
}
|
70 |
-
|
71 |
/**
|
72 |
* Send REST JSON requests
|
73 |
*
|
@@ -205,12 +191,17 @@ class Iparcel_All_Helper_Api
|
|
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 &&
|
214 |
$itemDetails = $this->_getItemDetails($item);
|
215 |
$itemsList[] = $itemDetails;
|
216 |
}
|
@@ -544,7 +535,18 @@ class Iparcel_All_Helper_Api
|
|
544 |
$item['Length'] = (float)$this->_getProductAttribute($product, 'length');
|
545 |
$item['Height'] = (float)$this->_getProductAttribute($product, 'height');
|
546 |
$item['Width'] = (float)$this->_getProductAttribute($product, 'width');
|
547 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
|
549 |
$item['ProductURL'] = $product->getUrlPath();
|
550 |
$item['SKN'] = '';
|
@@ -590,7 +592,7 @@ class Iparcel_All_Helper_Api
|
|
590 |
* @param Mage_Catalog_Model_Product $product Product with Options
|
591 |
* @return array Options array with all product variations
|
592 |
*/
|
593 |
-
|
594 |
{
|
595 |
// get product options collection object
|
596 |
$options = Mage::getModel('catalog/product_option')
|
@@ -682,7 +684,7 @@ class Iparcel_All_Helper_Api
|
|
682 |
* @param array $options Array of option arrays (sku, price, title, sort_order, required)
|
683 |
* @return array Array of arrays, representing the possible option variations
|
684 |
*/
|
685 |
-
|
686 |
{
|
687 |
// filter out empty values
|
688 |
$options = array_filter($options);
|
@@ -750,7 +752,7 @@ class Iparcel_All_Helper_Api
|
|
750 |
* @param bool $request If provided, this shipping rate request is used
|
751 |
* @return array Address information formatted for API requests
|
752 |
*/
|
753 |
-
|
754 |
{
|
755 |
/**
|
756 |
* @var Mage_Sales_Model_Quote_Address $shippingAddress
|
@@ -785,7 +787,7 @@ class Iparcel_All_Helper_Api
|
|
785 |
* @param object|bool $request If provided, this shipping rate request is used
|
786 |
* @return array Formatted address array
|
787 |
*/
|
788 |
-
|
789 |
{
|
790 |
$formattedAddress = array();
|
791 |
$formattedAddress['City'] = $request ? $request->getDestCity() : $address->getCity();
|
@@ -821,7 +823,7 @@ class Iparcel_All_Helper_Api
|
|
821 |
}
|
822 |
|
823 |
// Find the price of the product
|
824 |
-
$itemPrice = (float)
|
825 |
// if no price and item has parent (is configurable)
|
826 |
if (!$itemPrice && ($parent = $item->getParentItem())) {
|
827 |
// get parent price
|
54 |
return $response;
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
* Send REST JSON requests
|
59 |
*
|
191 |
|
192 |
$itemsList = array();
|
193 |
foreach ($request->getAllItems() as $item) {
|
194 |
+
// Skip products that belong to a configurable -- we send the configurable product
|
195 |
+
if ($item->getParentItemId() !== null) {
|
196 |
+
continue;
|
197 |
+
}
|
198 |
+
|
199 |
/**
|
200 |
* @var Mage_Sales_Model_Quote_Item $item
|
201 |
* @var Mage_Catalog_Model_Product $itemProduct
|
202 |
*/
|
203 |
$itemProduct = Mage::getModel('catalog/product')->load($item->getProductId());
|
204 |
+
if ($item["is_virtual"] == false && $itemProduct->getTypeId() != 'downloadable') {
|
205 |
$itemDetails = $this->_getItemDetails($item);
|
206 |
$itemsList[] = $itemDetails;
|
207 |
}
|
535 |
$item['Length'] = (float)$this->_getProductAttribute($product, 'length');
|
536 |
$item['Height'] = (float)$this->_getProductAttribute($product, 'height');
|
537 |
$item['Width'] = (float)$this->_getProductAttribute($product, 'width');
|
538 |
+
|
539 |
+
/**
|
540 |
+
* On configurable products, send the weight if one is available,
|
541 |
+
* otherwise, send '0.1'. This allows for classification while the
|
542 |
+
* simple product is the one actually added to cart and sold.
|
543 |
+
*/
|
544 |
+
$productWeight = (float)$this->_getProductAttribute($product, 'weight');
|
545 |
+
if ($product->getTypeId() == Mage_Catalog_Model_Product_TYPE::TYPE_CONFIGURABLE
|
546 |
+
&& $productWeight < 0.1) {
|
547 |
+
$productWeight = 0.1;
|
548 |
+
}
|
549 |
+
$item['Weight'] = $productWeight;
|
550 |
|
551 |
$item['ProductURL'] = $product->getUrlPath();
|
552 |
$item['SKN'] = '';
|
592 |
* @param Mage_Catalog_Model_Product $product Product with Options
|
593 |
* @return array Options array with all product variations
|
594 |
*/
|
595 |
+
protected function _findSimpleProductVariants($product)
|
596 |
{
|
597 |
// get product options collection object
|
598 |
$options = Mage::getModel('catalog/product_option')
|
684 |
* @param array $options Array of option arrays (sku, price, title, sort_order, required)
|
685 |
* @return array Array of arrays, representing the possible option variations
|
686 |
*/
|
687 |
+
protected function _findVariations($options)
|
688 |
{
|
689 |
// filter out empty values
|
690 |
$options = array_filter($options);
|
752 |
* @param bool $request If provided, this shipping rate request is used
|
753 |
* @return array Address information formatted for API requests
|
754 |
*/
|
755 |
+
protected function _prepareAddress($object, $request = false)
|
756 |
{
|
757 |
/**
|
758 |
* @var Mage_Sales_Model_Quote_Address $shippingAddress
|
787 |
* @param object|bool $request If provided, this shipping rate request is used
|
788 |
* @return array Formatted address array
|
789 |
*/
|
790 |
+
protected function _getAddressArray($address, $emailAddress, $request = false)
|
791 |
{
|
792 |
$formattedAddress = array();
|
793 |
$formattedAddress['City'] = $request ? $request->getDestCity() : $address->getCity();
|
823 |
}
|
824 |
|
825 |
// Find the price of the product
|
826 |
+
$itemPrice = (float) $item->getCalculationPrice();
|
827 |
// if no price and item has parent (is configurable)
|
828 |
if (!$itemPrice && ($parent = $item->getParentItem())) {
|
829 |
// get parent price
|
app/code/community/Iparcel/All/Helper/Data.php
CHANGED
@@ -101,7 +101,7 @@ class Iparcel_All_Helper_Data extends Mage_Core_Helper_Abstract
|
|
101 |
|
102 |
if (is_null($carrier) || $carrier == false) {
|
103 |
$method = $order->getShippingMethod();
|
104 |
-
if (preg_match('/^
|
105 |
return true;
|
106 |
}
|
107 |
return false;
|
@@ -295,4 +295,31 @@ class Iparcel_All_Helper_Data extends Mage_Core_Helper_Abstract
|
|
295 |
$allExtensions = Mage::app()->getConfig()->getNode('modules')->asArray();
|
296 |
return array_key_exists($name, $allExtensions);
|
297 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
}
|
101 |
|
102 |
if (is_null($carrier) || $carrier == false) {
|
103 |
$method = $order->getShippingMethod();
|
104 |
+
if (preg_match('/^' . $iparcelCarrier->getCarrierCode() . '.*/', $method)) {
|
105 |
return true;
|
106 |
}
|
107 |
return false;
|
295 |
$allExtensions = Mage::app()->getConfig()->getNode('modules')->asArray();
|
296 |
return array_key_exists($name, $allExtensions);
|
297 |
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Gathers extension versions for any installed i-parcel extensions
|
301 |
+
*
|
302 |
+
* @return array
|
303 |
+
*/
|
304 |
+
public function gatherExtensionVersions()
|
305 |
+
{
|
306 |
+
$extensions = array(
|
307 |
+
'Iparcel_All' => 0,
|
308 |
+
'Iparcel_CartHandoff' => 0,
|
309 |
+
'Iparcel_GlobaleCommerce' => 0,
|
310 |
+
'Iparcel_Logistics' => 0
|
311 |
+
);
|
312 |
+
|
313 |
+
$allExtensions = Mage::app()->getConfig()->getNode('modules')->asArray();
|
314 |
+
|
315 |
+
foreach ($extensions as $key => &$version) {
|
316 |
+
if (array_key_exists($key, $allExtensions)) {
|
317 |
+
$version = $allExtensions[$key]['version'];
|
318 |
+
} else {
|
319 |
+
unset($extensions[$key]);
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
return $extensions;
|
324 |
+
}
|
325 |
}
|
app/code/community/Iparcel/All/Model/Carrier/Iparcel.php
CHANGED
@@ -33,7 +33,7 @@ class Iparcel_All_Model_Carrier_Iparcel extends Iparcel_All_Model_Carrier_Abstra
|
|
33 |
/** @var boolean $internationalOrder */
|
34 |
$internationalOrder = Mage::helper('iparcel')->getIsInternational($request);
|
35 |
if ($internationalOrder && Mage::getStoreConfig('carriers/iparcel/active')) {
|
36 |
-
/** @var array $
|
37 |
$iparcelTaxAndDuty = array();
|
38 |
/** @var Mage_Shipping_Model_Rate_Result $result*/
|
39 |
$result = Mage::getModel('shipping/rate_result');
|
33 |
/** @var boolean $internationalOrder */
|
34 |
$internationalOrder = Mage::helper('iparcel')->getIsInternational($request);
|
35 |
if ($internationalOrder && Mage::getStoreConfig('carriers/iparcel/active')) {
|
36 |
+
/** @var array $iparcelTaxAndDuty Tax & Duty totals */
|
37 |
$iparcelTaxAndDuty = array();
|
38 |
/** @var Mage_Shipping_Model_Rate_Result $result*/
|
39 |
$result = Mage::getModel('shipping/rate_result');
|
app/code/community/Iparcel/All/Model/Observer.php
CHANGED
@@ -8,6 +8,32 @@
|
|
8 |
*/
|
9 |
class Iparcel_All_Model_Observer
|
10 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
/**
|
12 |
* Handles triggering the submitParcel call for the shipment.
|
13 |
*
|
@@ -37,26 +63,43 @@ class Iparcel_All_Model_Observer
|
|
37 |
|
38 |
$order = $observer->getShipment()->getOrder();
|
39 |
if ($order->getShippingCarrier() && $order->getShippingCarrier()->getCarrierCode() == $iparcelCarrierCode) {
|
40 |
-
$
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
$serviceLevels = Mage::helper('iparcel')->getServiceLevels();
|
45 |
-
$responseServiceLevelId = $response->ServiceLevels[0][0]->ServiceLevelID;
|
46 |
-
$serviceLevelTitle = 'I-Parcel';
|
47 |
-
if (array_key_exists($responseServiceLevelId, $serviceLevels)) {
|
48 |
-
$serviceLevelTitle = $serviceLevels[$responseServiceLevelId];
|
49 |
-
}
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
|
|
|
|
|
|
|
|
59 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
/**
|
@@ -87,33 +130,7 @@ class Iparcel_All_Model_Observer
|
|
87 |
// if autoship is enabled and order can be shipped
|
88 |
if (Mage::getStoreConfigFlag('carriers/iparcel/autoship')) {
|
89 |
if ($order->canShip()) {
|
90 |
-
$
|
91 |
-
/* var $converter Mage_Sales_Model_Convert_Order */
|
92 |
-
$shipment = $converter->toShipment($order);
|
93 |
-
/* var $shipment Mage_Sales_Model_Order_Shipment */
|
94 |
-
foreach ($order->getAllItems() as $orderItem) {
|
95 |
-
/* var $orderItem Mage_Sales_Model_Order_Item */
|
96 |
-
// continue if it is virtual or there is no quantity to ship
|
97 |
-
if (!$orderItem->getQtyToShip()) {
|
98 |
-
continue;
|
99 |
-
}
|
100 |
-
if ($order->getIsVirtual()) {
|
101 |
-
continue;
|
102 |
-
}
|
103 |
-
$item = $converter->itemToShipmentItem($orderItem);
|
104 |
-
/* var $item Mage_Sales_Model_Order_Shipment_Item */
|
105 |
-
$item->setQty($orderItem->getQtyToShip());
|
106 |
-
$shipment->addItem($item);
|
107 |
-
}
|
108 |
-
$shipment->register();
|
109 |
-
$shipment->getOrder()->setIsInProcess(true);
|
110 |
-
$transactionSave = Mage::getModel('core/resource_transaction')
|
111 |
-
->addObject($shipment)
|
112 |
-
->addObject($order);
|
113 |
-
/* var $transactionSave Mage_Core_Model_Resource_Transaction */
|
114 |
-
$transactionSave->save();
|
115 |
-
$shipment->save();
|
116 |
-
$shipment->sendEmail();
|
117 |
}
|
118 |
}
|
119 |
}
|
8 |
*/
|
9 |
class Iparcel_All_Model_Observer
|
10 |
{
|
11 |
+
/**
|
12 |
+
* @param $shipment
|
13 |
+
* @param $order
|
14 |
+
*/
|
15 |
+
protected function _submitParcel($shipment, $order)
|
16 |
+
{
|
17 |
+
$api = Mage::helper('iparcel/api');
|
18 |
+
$response = $api->submitParcel($shipment);
|
19 |
+
|
20 |
+
// Find the name of the Service Level as defined in the Admin
|
21 |
+
$serviceLevels = Mage::helper('iparcel')->getServiceLevels();
|
22 |
+
$responseServiceLevelId = $response->ServiceLevels[0][0]->ServiceLevelID;
|
23 |
+
$serviceLevelTitle = 'I-Parcel';
|
24 |
+
if (array_key_exists($responseServiceLevelId, $serviceLevels)) {
|
25 |
+
$serviceLevelTitle = $serviceLevels[$responseServiceLevelId];
|
26 |
+
}
|
27 |
+
|
28 |
+
// Add tracking number from submitParcel response
|
29 |
+
Mage::getModel('sales/order_shipment_api')->addTrack(
|
30 |
+
$shipment->getIncrementId(),
|
31 |
+
$order->getShippingCarrier()->getCarrierCode(),
|
32 |
+
$serviceLevelTitle,
|
33 |
+
$response->CarrierTrackingNumber
|
34 |
+
);
|
35 |
+
}
|
36 |
+
|
37 |
/**
|
38 |
* Handles triggering the submitParcel call for the shipment.
|
39 |
*
|
63 |
|
64 |
$order = $observer->getShipment()->getOrder();
|
65 |
if ($order->getShippingCarrier() && $order->getShippingCarrier()->getCarrierCode() == $iparcelCarrierCode) {
|
66 |
+
$this->_submitParcel($shipment, $order);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
/**
|
72 |
+
* @param $order
|
73 |
+
*/
|
74 |
+
protected function _createShipment($order)
|
75 |
+
{
|
76 |
+
$converter = Mage::getModel('sales/convert_order');
|
77 |
+
/* var $converter Mage_Sales_Model_Convert_Order */
|
78 |
+
$shipment = $converter->toShipment($order);
|
79 |
+
/* var $shipment Mage_Sales_Model_Order_Shipment */
|
80 |
+
foreach ($order->getAllItems() as $orderItem) {
|
81 |
+
/* var $orderItem Mage_Sales_Model_Order_Item */
|
82 |
+
// continue if it is virtual or there is no quantity to ship
|
83 |
+
if (!$orderItem->getQtyToShip()) {
|
84 |
+
continue;
|
85 |
+
}
|
86 |
+
if ($order->getIsVirtual()) {
|
87 |
+
continue;
|
88 |
}
|
89 |
+
$item = $converter->itemToShipmentItem($orderItem);
|
90 |
+
/* var $item Mage_Sales_Model_Order_Shipment_Item */
|
91 |
+
$item->setQty($orderItem->getQtyToShip());
|
92 |
+
$shipment->addItem($item);
|
93 |
}
|
94 |
+
$shipment->register();
|
95 |
+
$shipment->getOrder()->setIsInProcess(true);
|
96 |
+
$transactionSave = Mage::getModel('core/resource_transaction')
|
97 |
+
->addObject($shipment)
|
98 |
+
->addObject($order);
|
99 |
+
/* var $transactionSave Mage_Core_Model_Resource_Transaction */
|
100 |
+
$transactionSave->save();
|
101 |
+
$shipment->save();
|
102 |
+
$shipment->sendEmail();
|
103 |
}
|
104 |
|
105 |
/**
|
130 |
// if autoship is enabled and order can be shipped
|
131 |
if (Mage::getStoreConfigFlag('carriers/iparcel/autoship')) {
|
132 |
if ($order->canShip()) {
|
133 |
+
$this->_createShipment($order);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
}
|
136 |
}
|
app/code/community/Iparcel/All/Model/Quote/Address/Total/Collector.php
CHANGED
@@ -39,7 +39,7 @@ class Iparcel_All_Model_Quote_Address_Total_Collector extends Mage_Sales_Model_Q
|
|
39 |
* @param array $array
|
40 |
* @return array
|
41 |
*/
|
42 |
-
|
43 |
{
|
44 |
if (isset($array[$index])) {
|
45 |
$temp = $array[$index];
|
39 |
* @param array $array
|
40 |
* @return array
|
41 |
*/
|
42 |
+
protected function _moveIndexToEnd($index, $array)
|
43 |
{
|
44 |
if (isset($array[$index])) {
|
45 |
$temp = $array[$index];
|
app/code/community/Iparcel/All/Model/Tax/Quote/Shipping.php
CHANGED
@@ -13,7 +13,7 @@ class Iparcel_All_Model_Tax_Quote_Shipping extends Mage_Tax_Model_Sales_Total_Qu
|
|
13 |
*
|
14 |
* @return Iparcel_All_Model_Quote_Address_Total_Abstract
|
15 |
*/
|
16 |
-
|
17 |
{
|
18 |
$model = new Iparcel_All_Model_Quote_Address_Total_Abstract;
|
19 |
return $model;
|
13 |
*
|
14 |
* @return Iparcel_All_Model_Quote_Address_Total_Abstract
|
15 |
*/
|
16 |
+
protected function _getAbstract()
|
17 |
{
|
18 |
$model = new Iparcel_All_Model_Quote_Address_Total_Abstract;
|
19 |
return $model;
|
app/code/community/Iparcel/All/Model/Tax/Quote/Subtotal.php
CHANGED
@@ -13,7 +13,7 @@ class Iparcel_All_Model_Tax_Quote_Subtotal extends Mage_Tax_Model_Sales_Total_Qu
|
|
13 |
*
|
14 |
* @return Iparcel_All_Model_Quote_Address_Total_Abstract
|
15 |
*/
|
16 |
-
|
17 |
{
|
18 |
$model = new Iparcel_All_Model_Quote_Address_Total_Abstract;
|
19 |
return $model;
|
13 |
*
|
14 |
* @return Iparcel_All_Model_Quote_Address_Total_Abstract
|
15 |
*/
|
16 |
+
protected function _getAbstract()
|
17 |
{
|
18 |
$model = new Iparcel_All_Model_Quote_Address_Total_Abstract;
|
19 |
return $model;
|
app/code/community/Iparcel/All/Model/Tax/Quote/Tax.php
CHANGED
@@ -13,7 +13,7 @@ class Iparcel_All_Model_Tax_Quote_Tax extends Mage_Tax_Model_Sales_Total_Quote_T
|
|
13 |
*
|
14 |
* @return Iparcel_All_Model_Quote_Address_Total_Abstract
|
15 |
*/
|
16 |
-
|
17 |
{
|
18 |
$model = new Iparcel_All_Model_Quote_Address_Total_Abstract;
|
19 |
return $model;
|
13 |
*
|
14 |
* @return Iparcel_All_Model_Quote_Address_Total_Abstract
|
15 |
*/
|
16 |
+
protected function _getAbstract()
|
17 |
{
|
18 |
$model = new Iparcel_All_Model_Quote_Address_Total_Abstract;
|
19 |
return $model;
|
app/code/community/Iparcel/All/controllers/Adminhtml/Iparcel/Sync/AjaxController.php
CHANGED
@@ -9,51 +9,45 @@
|
|
9 |
class Iparcel_All_Adminhtml_Iparcel_Sync_AjaxController extends Mage_Adminhtml_Controller_Action
|
10 |
{
|
11 |
/**
|
12 |
-
* Response for init
|
13 |
*
|
14 |
-
* @return
|
15 |
*/
|
16 |
-
protected function
|
17 |
{
|
18 |
$step = Mage::getStoreConfig('catalog_mapping/upload/step');
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
* @alias _initResponse
|
26 |
-
* @return array
|
27 |
-
*/
|
28 |
-
protected function _initCatalogResponse()
|
29 |
-
{
|
30 |
-
return $this->_initResponse();
|
31 |
-
}
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
*/
|
39 |
-
protected function _initCheckitemsResponse()
|
40 |
-
{
|
41 |
-
return $this->_initResponse();
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
-
* Response for uploadCatalog
|
46 |
*
|
47 |
-
* @
|
48 |
-
* @return array
|
49 |
*/
|
50 |
-
protected function
|
51 |
{
|
|
|
|
|
52 |
$page = $params['page'];
|
53 |
$step = $params['step'];
|
54 |
|
55 |
$offset = Mage::getStoreConfig('catalog_mapping/upload/offset');
|
56 |
-
$page += floor($offset
|
57 |
|
58 |
$productCollection = Mage::getModel('catalog/product')
|
59 |
->getCollection()
|
@@ -64,64 +58,22 @@ class Iparcel_All_Adminhtml_Iparcel_Sync_AjaxController extends Mage_Adminhtml_C
|
|
64 |
$n = Mage::helper('iparcel/api')->submitCatalog($productCollection);
|
65 |
|
66 |
if ($n != -1) {
|
67 |
-
|
68 |
-
'page'=>$page,
|
69 |
-
'step'=>$step,
|
70 |
-
'uploaded'=>$n
|
71 |
-
);
|
72 |
-
} else {
|
73 |
-
return array(
|
74 |
-
'error'=>'1'
|
75 |
-
);
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Response for _uploadCheckitems querry
|
81 |
-
*
|
82 |
-
* @param array $params
|
83 |
-
* @return array
|
84 |
-
*/
|
85 |
-
protected function _uploadCheckitemsResponse($params)
|
86 |
-
{
|
87 |
-
$page = $params['page'];
|
88 |
-
$step = $params['step'];
|
89 |
-
|
90 |
-
$productCollection = Mage::getModel('catalog/product')
|
91 |
-
->getCollection()
|
92 |
-
->setPageSize($step)
|
93 |
-
->setCurPage($page);
|
94 |
-
/* var $productCollection Mage_Catalog_Model_Resource_Product_Collection */
|
95 |
-
|
96 |
-
$n = Mage::helper('iparcel/api')->checkItems($productCollection);
|
97 |
-
|
98 |
-
if ($n != -1) {
|
99 |
-
return array(
|
100 |
'page' => $page,
|
101 |
'step' => $step,
|
102 |
'uploaded' => $n
|
103 |
);
|
104 |
} else {
|
105 |
-
|
106 |
'error' => '1'
|
107 |
);
|
108 |
}
|
109 |
-
}
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
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 |
/**
|
@@ -132,29 +84,4 @@ class Iparcel_All_Adminhtml_Iparcel_Sync_AjaxController extends Mage_Adminhtml_C
|
|
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 |
}
|
9 |
class Iparcel_All_Adminhtml_Iparcel_Sync_AjaxController extends Mage_Adminhtml_Controller_Action
|
10 |
{
|
11 |
/**
|
12 |
+
* Response for init query
|
13 |
*
|
14 |
+
* @return bool
|
15 |
*/
|
16 |
+
protected function catalogJsonInitAction()
|
17 |
{
|
18 |
$step = Mage::getStoreConfig('catalog_mapping/upload/step');
|
19 |
+
$count = Mage::getModel('catalog/product')
|
20 |
+
->getCollection()
|
21 |
+
->getSize()
|
22 |
+
- floor(Mage::getStoreConfig('catalog_mapping/upload/offset')
|
23 |
+
/ $step
|
24 |
+
) * $step;
|
25 |
|
26 |
+
$response = array(
|
27 |
+
'count' => $count
|
28 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
$this->getResponse()
|
31 |
+
->setHeader('Content-type', 'application/json', true)
|
32 |
+
->setBody(json_encode($response));
|
33 |
+
|
34 |
+
return true;
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
+
* Response for uploadCatalog query
|
39 |
*
|
40 |
+
* @return bool
|
|
|
41 |
*/
|
42 |
+
protected function catalogJsonUploadAction()
|
43 |
{
|
44 |
+
$params = $this->getRequest()->getParams();
|
45 |
+
|
46 |
$page = $params['page'];
|
47 |
$step = $params['step'];
|
48 |
|
49 |
$offset = Mage::getStoreConfig('catalog_mapping/upload/offset');
|
50 |
+
$page += floor($offset / $step);
|
51 |
|
52 |
$productCollection = Mage::getModel('catalog/product')
|
53 |
->getCollection()
|
58 |
$n = Mage::helper('iparcel/api')->submitCatalog($productCollection);
|
59 |
|
60 |
if ($n != -1) {
|
61 |
+
$response = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
'page' => $page,
|
63 |
'step' => $step,
|
64 |
'uploaded' => $n
|
65 |
);
|
66 |
} else {
|
67 |
+
$response = array(
|
68 |
'error' => '1'
|
69 |
);
|
70 |
}
|
|
|
71 |
|
72 |
+
$this->getResponse()
|
73 |
+
->setHeader('Content-type', 'application/json', true)
|
74 |
+
->setBody(json_encode($response));
|
75 |
+
|
76 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
/**
|
84 |
$this->loadLayout();
|
85 |
$this->renderLayout();
|
86 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
app/code/community/Iparcel/All/controllers/Adminhtml/Iparcel/SyncController.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Adminhtml i-parcel sync controller
|
4 |
-
*
|
5 |
-
* @category Iparcel
|
6 |
-
* @package Iparcel_All
|
7 |
-
* @author Bobby Burden <bburden@i-parcel.com>
|
8 |
-
*/
|
9 |
-
class Iparcel_All_Adminhtml_Iparcel_SyncController extends Mage_Adminhtml_Controller_Action
|
10 |
-
{
|
11 |
-
public function salesruleAction()
|
12 |
-
{
|
13 |
-
$_salesRuleCollection = Mage::getResourceModel('salesrule/rule_collection');
|
14 |
-
/* var $_salesRuleCollection Mage_SalesRule_Model_Resource_Rule_Collection */
|
15 |
-
Mage::helper('iparcel/api')->salesRule($_salesRuleCollection);
|
16 |
-
$this->_redirectReferer();
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Iparcel/All/controllers/InfoController.php
CHANGED
@@ -13,36 +13,10 @@ class Iparcel_All_InfoController extends Mage_Core_Controller_Front_Action
|
|
13 |
*/
|
14 |
public function indexAction()
|
15 |
{
|
16 |
-
$versions =
|
17 |
|
18 |
foreach ($versions as $key => $version) {
|
19 |
print "<b>$key</b>: $version<br />";
|
20 |
}
|
21 |
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Gathers extension versions for any installed i-parcel extensions
|
25 |
-
*
|
26 |
-
* @return array
|
27 |
-
*/
|
28 |
-
private function _gatherExtensionVersions()
|
29 |
-
{
|
30 |
-
$extensions = array(
|
31 |
-
'Iparcel_All' => 0,
|
32 |
-
'Iparcel_GlobaleCommerce' => 0,
|
33 |
-
'Iparcel_Logistics' => 0
|
34 |
-
);
|
35 |
-
|
36 |
-
$allExtensions = Mage::app()->getConfig()->getNode('modules')->asArray();
|
37 |
-
|
38 |
-
foreach ($extensions as $key => &$version) {
|
39 |
-
if (array_key_exists($key, $allExtensions)) {
|
40 |
-
$version = $allExtensions[$key]['version'];
|
41 |
-
} else {
|
42 |
-
unset($extensions[$key]);
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
return $extensions;
|
47 |
-
}
|
48 |
}
|
13 |
*/
|
14 |
public function indexAction()
|
15 |
{
|
16 |
+
$versions = Mage::helper('iparcel')->gatherExtensionVersions();
|
17 |
|
18 |
foreach ($versions as $key => $version) {
|
19 |
print "<b>$key</b>: $version<br />";
|
20 |
}
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
app/code/community/Iparcel/All/controllers/InternationalController.php
CHANGED
@@ -26,10 +26,10 @@ class Iparcel_All_InternationalController extends Mage_Core_Controller_Front_Act
|
|
26 |
$this->_prepareHeaders();
|
27 |
$current = Mage::helper('iparcel/international')->getInternational();
|
28 |
if ($current) {
|
29 |
-
|
30 |
} else {
|
31 |
Mage::helper('iparcel/international')->setInternational(true);
|
32 |
-
|
33 |
}
|
34 |
}
|
35 |
|
@@ -42,9 +42,9 @@ class Iparcel_All_InternationalController extends Mage_Core_Controller_Front_Act
|
|
42 |
$current = Mage::helper('iparcel/international')->getInternational();
|
43 |
if ($current) {
|
44 |
Mage::helper('iparcel/international')->setInternational(false);
|
45 |
-
|
46 |
} else {
|
47 |
-
|
48 |
}
|
49 |
}
|
50 |
}
|
26 |
$this->_prepareHeaders();
|
27 |
$current = Mage::helper('iparcel/international')->getInternational();
|
28 |
if ($current) {
|
29 |
+
$this->getResponse()->setBody('false');
|
30 |
} else {
|
31 |
Mage::helper('iparcel/international')->setInternational(true);
|
32 |
+
$this->getResponse()->setBody('true');
|
33 |
}
|
34 |
}
|
35 |
|
42 |
$current = Mage::helper('iparcel/international')->getInternational();
|
43 |
if ($current) {
|
44 |
Mage::helper('iparcel/international')->setInternational(false);
|
45 |
+
$this->getResponse()->setBody('true');
|
46 |
} else {
|
47 |
+
$this->getResponse()->setBody('false');
|
48 |
}
|
49 |
}
|
50 |
}
|
app/code/community/Iparcel/All/sql/iparcel_setup/mysql4-upgrade-1.1.0-1.1.1.php
CHANGED
@@ -16,10 +16,13 @@ $options = array(
|
|
16 |
);
|
17 |
|
18 |
foreach ($entities as $entity) {
|
19 |
-
$
|
20 |
-
$
|
21 |
-
|
22 |
-
$installer->addAttribute($entity, '
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
$installer->endSetup();
|
16 |
);
|
17 |
|
18 |
foreach ($entities as $entity) {
|
19 |
+
$dutyCode = Mage::getModel('iparcel/payment_iparcel')->getDutyCode();
|
20 |
+
$taxCode = Mage::getModel('iparcel/payment_iparcel')->getTaxCode();
|
21 |
+
|
22 |
+
$installer->addAttribute($entity, 'base_' . $dutyCode . '_amount', $options);
|
23 |
+
$installer->addAttribute($entity, $dutyCode . '_amount', $options);
|
24 |
+
$installer->addAttribute($entity, 'base_' . $taxCode . '_amount', $options);
|
25 |
+
$installer->addAttribute($entity, $taxCode . '_amount', $options);
|
26 |
}
|
27 |
|
28 |
$installer->endSetup();
|
app/code/community/Iparcel/GlobaleCommerce/Helper/International.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* i-parcel international customer helper
|
4 |
-
*
|
5 |
-
* @category Iparcel
|
6 |
-
* @package Iparcel_GlobaleCommerce
|
7 |
-
* @author Bobby Burden <bburden@i-parcel.com>
|
8 |
-
*/
|
9 |
-
class Iparcel_GlobaleCommerce_Helper_International extends Iparcel_All_Helper_International
|
10 |
-
{
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Iparcel/GlobaleCommerce/Model/Api/External/Sales/Order.php
CHANGED
@@ -30,10 +30,16 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
30 |
if (!$data) {
|
31 |
Mage::throwException('Session data not specified');
|
32 |
}
|
33 |
-
if (empty($data['customer_id'])) {
|
34 |
Mage::throwException('Customer ID not specified');
|
35 |
}
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
return $this;
|
38 |
}
|
39 |
|
@@ -72,37 +78,158 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
-
*
|
76 |
*
|
77 |
-
* @
|
78 |
-
* @return Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order
|
79 |
*/
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
$customer = Mage::getModel('customer/customer');
|
83 |
/* var $customer Mage_Customer_Model_Customer */
|
84 |
if ($websiteId) {
|
85 |
$customer->setWebsiteId($websiteId);
|
86 |
}
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
if ($customer->getId()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
parent::setCustomer($customer);
|
|
|
|
|
91 |
} else {
|
92 |
-
$
|
93 |
-
$customer->setFirstname($user['firstname']);
|
94 |
-
$customer->setLastname($user['lastname']);
|
95 |
-
$customer->setPassword($user['password']);
|
96 |
-
$customer->setConfirmation(null);
|
97 |
-
$customer->save();
|
98 |
-
// else create new one
|
99 |
-
parent::setCustomer($customer);
|
100 |
}
|
101 |
-
|
102 |
$this->setCustomerEmail($user['email']);
|
103 |
return $this;
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
/**
|
107 |
* Customer Billing Address setter
|
108 |
*
|
@@ -111,26 +238,11 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
111 |
*/
|
112 |
public function setCustomerBillingAddress($_address)
|
113 |
{
|
114 |
-
$address =
|
115 |
-
|
116 |
-
|
117 |
-
/* var $customer Mage_Customer_Model_Customer */
|
118 |
-
// throw exception if customer is not specified
|
119 |
-
if (!$customer) {
|
120 |
-
Mage::throwException('Customer not specified');
|
121 |
}
|
122 |
-
|
123 |
-
$address->setCustomerId($customer->getId());
|
124 |
-
$address->setFirstname($_address['firstname']);
|
125 |
-
$address->setLastname($_address['lastname']);
|
126 |
-
$address->setCountryId($_address['country_id']);
|
127 |
-
$address->setStreet($_address['street']);
|
128 |
-
$address->setPostcode($_address['postcode']);
|
129 |
-
$address->setCity($_address['city']);
|
130 |
-
$address->setTelephone(isset($_address['telephone']) ? $_address['telephone'] : '');
|
131 |
-
$address->setRegion(isset($_address['region_id']) ? $_address['region_id'] : '');
|
132 |
-
$address->setRegionId($region->getId());
|
133 |
-
$address->save();
|
134 |
return parent::setCustomerBillingAddress($address);
|
135 |
}
|
136 |
|
@@ -147,7 +259,7 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
147 |
Mage::throwException('Customer is not specified');
|
148 |
}
|
149 |
|
150 |
-
|
151 |
if (!$customer->getDefaultBilling()) {
|
152 |
return $this;
|
153 |
}
|
@@ -176,26 +288,11 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
176 |
*/
|
177 |
public function setCustomerShippingAddress($_address)
|
178 |
{
|
179 |
-
$address =
|
180 |
-
|
181 |
-
|
182 |
-
/* var $customer Mage_Customer_Model_Customer */
|
183 |
-
// throw exception if customer is not specified
|
184 |
-
if (!$customer) {
|
185 |
-
Mage::throwException('Customer not specified');
|
186 |
}
|
187 |
-
|
188 |
-
$address->setCustomerId($customer->getId());
|
189 |
-
$address->setFirstname($_address['firstname']);
|
190 |
-
$address->setLastname($_address['lastname']);
|
191 |
-
$address->setCountryId($_address['country_id']);
|
192 |
-
$address->setStreet($_address['street']);
|
193 |
-
$address->setPostcode($_address['postcode']);
|
194 |
-
$address->setCity($_address['city']);
|
195 |
-
$address->setTelephone(isset($_address['telephone']) ? $_address['telephone'] : '');
|
196 |
-
$address->setRegion(isset($_address['region_id']) ? $_address['region_id'] : '');
|
197 |
-
$address->setRegionId($region->getId());
|
198 |
-
$address->save();
|
199 |
return parent::setCustomerShippingAddress($address);
|
200 |
}
|
201 |
|
@@ -276,6 +373,7 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
276 |
// set products and options
|
277 |
$this->setProducts($_products);
|
278 |
$this->setOptions($_options);
|
|
|
279 |
|
280 |
$_customerBillingAddress = $this->getCustomerBillingAddress();
|
281 |
/* var $_customerBillingAddress Mage_Customer_Model_Address */
|
@@ -286,10 +384,11 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
286 |
$_orderData = array(
|
287 |
'session' => array(
|
288 |
'customer_id' => $_customer->getId(),
|
289 |
-
'store_id' => $this->getStoreId()
|
|
|
290 |
),
|
291 |
'payment' => array(
|
292 |
-
'method' =>
|
293 |
),
|
294 |
'add_products' => $_products,
|
295 |
'order' => array(
|
@@ -339,6 +438,20 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
339 |
'send_confirmation' => '0'
|
340 |
),
|
341 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
return parent::setOrderData($_orderData);
|
343 |
}
|
344 |
|
@@ -495,8 +608,10 @@ class Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order extends Mage_Core_M
|
|
495 |
->addObject($invoice->getOrder());
|
496 |
/* var $transactionSave Mage_Core_Model_Resource_Transaction */
|
497 |
$transactionSave->save();
|
498 |
-
$invoice->
|
|
|
499 |
$this->setInvoice($invoice);
|
|
|
500 |
return $invoice;
|
501 |
}
|
502 |
|
30 |
if (!$data) {
|
31 |
Mage::throwException('Session data not specified');
|
32 |
}
|
33 |
+
if (empty($data['customer_id']) && $this->isGuestUser() == false) {
|
34 |
Mage::throwException('Customer ID not specified');
|
35 |
}
|
36 |
+
|
37 |
+
if ($this->isGuestUser()) {
|
38 |
+
Mage::getSingleton('adminhtml/session_quote')->getQuote()->setCustomerIsGuest(true);
|
39 |
+
Mage::getSingleton('adminhtml/session_quote')->setCustomerId(0);
|
40 |
+
} else {
|
41 |
+
Mage::getSingleton('adminhtml/session_quote')->setCustomerId((int) $data['customer_id']);
|
42 |
+
}
|
43 |
return $this;
|
44 |
}
|
45 |
|
78 |
}
|
79 |
|
80 |
/**
|
81 |
+
* Determines if guest checkouts are allowed for this store
|
82 |
*
|
83 |
+
* @return bool
|
|
|
84 |
*/
|
85 |
+
protected function _isGuestCheckoutAllowed() {
|
86 |
+
$guestCheckoutAllowed = Mage::getStoreConfig('checkout/options/guest_checkout');
|
87 |
+
return (bool) $guestCheckoutAllowed;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @param $user
|
92 |
+
*/
|
93 |
+
protected function _setGuestCustomer($user) {
|
94 |
+
$customer = new Varien_Object();
|
95 |
+
$customer->setEmail($user['email']);
|
96 |
+
$customer->setFirstname($user['firstname']);
|
97 |
+
$customer->setLastname($user['lastname']);
|
98 |
+
$customer->setIsGuest(true);
|
99 |
+
return parent::setCustomer($customer);
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Creates a new customer for the order
|
104 |
+
*
|
105 |
+
* @param $user
|
106 |
+
* @param $websiteId
|
107 |
+
*/
|
108 |
+
private function _setNewCustomer($user, $websiteId) {
|
109 |
$customer = Mage::getModel('customer/customer');
|
110 |
/* var $customer Mage_Customer_Model_Customer */
|
111 |
if ($websiteId) {
|
112 |
$customer->setWebsiteId($websiteId);
|
113 |
}
|
114 |
+
|
115 |
+
$customer->setEmail($user['email']);
|
116 |
+
$customer->setFirstname($user['firstname']);
|
117 |
+
$customer->setLastname($user['lastname']);
|
118 |
+
$customer->setPassword($user['password']);
|
119 |
+
$customer->setConfirmation(null);
|
120 |
+
$customer->save();
|
121 |
+
return parent::setCustomer($customer);
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Checks if a given email address belongs to an existing customer
|
126 |
+
*
|
127 |
+
* @param string $emailAddress
|
128 |
+
* @param int $websiteId
|
129 |
+
* @return mixed
|
130 |
+
*/
|
131 |
+
private function _doesCustomerExist($emailAddress, $websiteId)
|
132 |
+
{
|
133 |
+
$customer = Mage::getModel('customer/customer');
|
134 |
+
|
135 |
+
$customer->setWebsiteId($websiteId);
|
136 |
+
$customer->loadByEmail($emailAddress);
|
137 |
+
|
138 |
if ($customer->getId()) {
|
139 |
+
return $customer;
|
140 |
+
}
|
141 |
+
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Checks if the order is placed by a guest user
|
147 |
+
*
|
148 |
+
* @return bool
|
149 |
+
*/
|
150 |
+
public function isGuestUser()
|
151 |
+
{
|
152 |
+
if($this->getCustomer() && $this->getCustomer()->getIsGuest()) {
|
153 |
+
return true;
|
154 |
+
}
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Customer setter
|
160 |
+
*
|
161 |
+
* @param array $user, int $websiteId
|
162 |
+
* @return Iparcel_GlobaleCommerce_Model_Api_External_Sales_Order
|
163 |
+
*/
|
164 |
+
public function setCustomer($user, $websiteId)
|
165 |
+
{
|
166 |
+
/**
|
167 |
+
* 1. Check if the user already exists. Use it if so.
|
168 |
+
* 2. Check if the store allows guest checkouts. Checkout as guest if so
|
169 |
+
* 3. If 1 and 2 fail, create a new customer for this order
|
170 |
+
*/
|
171 |
+
$customer = $this->_doesCustomerExist($user['email'], $websiteId);
|
172 |
+
if ($customer) {
|
173 |
parent::setCustomer($customer);
|
174 |
+
} elseif ($this->_isGuestCheckoutAllowed()) {
|
175 |
+
$this->_setGuestCustomer($user);
|
176 |
} else {
|
177 |
+
$this->_setNewCustomer($user, $websiteId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
+
|
180 |
$this->setCustomerEmail($user['email']);
|
181 |
return $this;
|
182 |
}
|
183 |
|
184 |
+
/**
|
185 |
+
* Looks up the customer's address and returns it, or creates a new address.
|
186 |
+
*
|
187 |
+
* @param array $addressData
|
188 |
+
* @return mixed
|
189 |
+
*/
|
190 |
+
private function getOrCreateAddress($addressData)
|
191 |
+
{
|
192 |
+
$customer = $this->getCustomer();
|
193 |
+
$region = Mage::getModel('directory/region')->loadByCode($addressData['region_id'], $addressData['country_id']);
|
194 |
+
|
195 |
+
if (!$this->getIsGuestUser() && $customer instanceof Mage_Customer_Model_Customer) {
|
196 |
+
/**
|
197 |
+
* Attempt to lookup an already existing address that matches the
|
198 |
+
* $addressData passed into this method
|
199 |
+
*/
|
200 |
+
$addressCollection = $customer->getAddressCollection()
|
201 |
+
->addAttributeToFilter('firstname', $addressData['firstname'])
|
202 |
+
->addAttributeToFilter('lastname', $addressData['lastname'])
|
203 |
+
->addAttributeToFilter('country_id', $addressData['country_id'])
|
204 |
+
->addAttributeToFilter('street', $addressData['street'])
|
205 |
+
->addAttributeToFilter('postcode', $addressData['postcode'])
|
206 |
+
->addAttributeToFilter('city', $addressData['city'])
|
207 |
+
->addAttributeToFilter('telephone', $addressData['telephone'])
|
208 |
+
->addAttributeToFilter('region_id', $region->getId());
|
209 |
+
|
210 |
+
if (count($addressCollection) > 0) {
|
211 |
+
$address = $addressCollection->getFirstItem();
|
212 |
+
} else {
|
213 |
+
$address = Mage::getModel('customer/address');
|
214 |
+
}
|
215 |
+
} else {
|
216 |
+
$address = new Varien_Object();
|
217 |
+
}
|
218 |
+
|
219 |
+
$address->setCustomerId($customer->getId());
|
220 |
+
$address->setFirstname($addressData['firstname']);
|
221 |
+
$address->setLastname($addressData['lastname']);
|
222 |
+
$address->setCountryId($addressData['country_id']);
|
223 |
+
$address->setStreet($addressData['street']);
|
224 |
+
$address->setPostcode($addressData['postcode']);
|
225 |
+
$address->setCity($addressData['city']);
|
226 |
+
$address->setTelephone(isset($addressData['telephone']) ? $addressData['telephone'] : '');
|
227 |
+
$address->setRegion(isset($addressData['region_id']) ? $addressData['region_id'] : '');
|
228 |
+
$address->setRegionId($region->getId());
|
229 |
+
|
230 |
+
return $address;
|
231 |
+
}
|
232 |
+
|
233 |
/**
|
234 |
* Customer Billing Address setter
|
235 |
*
|
238 |
*/
|
239 |
public function setCustomerBillingAddress($_address)
|
240 |
{
|
241 |
+
$address = $this->getOrCreateAddress($_address);
|
242 |
+
if(!$this->isGuestUser()) {
|
243 |
+
$address->save();
|
|
|
|
|
|
|
|
|
244 |
}
|
245 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
return parent::setCustomerBillingAddress($address);
|
247 |
}
|
248 |
|
259 |
Mage::throwException('Customer is not specified');
|
260 |
}
|
261 |
|
262 |
+
/* if no default billing do nothing */
|
263 |
if (!$customer->getDefaultBilling()) {
|
264 |
return $this;
|
265 |
}
|
288 |
*/
|
289 |
public function setCustomerShippingAddress($_address)
|
290 |
{
|
291 |
+
$address = $this->getOrCreateAddress($_address);
|
292 |
+
if(!$this->isGuestUser()) {
|
293 |
+
$address->save();
|
|
|
|
|
|
|
|
|
294 |
}
|
295 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
return parent::setCustomerShippingAddress($address);
|
297 |
}
|
298 |
|
373 |
// set products and options
|
374 |
$this->setProducts($_products);
|
375 |
$this->setOptions($_options);
|
376 |
+
$paymentMethodCode = Mage::getModel('iparcel/payment_iparcel')->getCode();
|
377 |
|
378 |
$_customerBillingAddress = $this->getCustomerBillingAddress();
|
379 |
/* var $_customerBillingAddress Mage_Customer_Model_Address */
|
384 |
$_orderData = array(
|
385 |
'session' => array(
|
386 |
'customer_id' => $_customer->getId(),
|
387 |
+
'store_id' => $this->getStoreId(),
|
388 |
+
'is_guest' => $_customer->getIsGuest()
|
389 |
),
|
390 |
'payment' => array(
|
391 |
+
'method' => $paymentMethodCode
|
392 |
),
|
393 |
'add_products' => $_products,
|
394 |
'order' => array(
|
438 |
'send_confirmation' => '0'
|
439 |
),
|
440 |
);
|
441 |
+
|
442 |
+
/**
|
443 |
+
* Place the user in the "NOT LOGGED IN GROUP" if they are a guest,
|
444 |
+
* and set the quote's first/lastname
|
445 |
+
*/
|
446 |
+
if ($this->isGuestUser()) {
|
447 |
+
$_orderData['order']['account']['group_id'] = 0;
|
448 |
+
$_orderData['session']['customer_id'] = 0;
|
449 |
+
Mage::getSingleton('adminhtml/session_quote')
|
450 |
+
->getQuote()
|
451 |
+
->setCustomerFirstname($_customer->getFirstname())
|
452 |
+
->setCustomerLastname($_customer->getLastname());
|
453 |
+
}
|
454 |
+
|
455 |
return parent::setOrderData($_orderData);
|
456 |
}
|
457 |
|
608 |
->addObject($invoice->getOrder());
|
609 |
/* var $transactionSave Mage_Core_Model_Resource_Transaction */
|
610 |
$transactionSave->save();
|
611 |
+
$invoice->capture();
|
612 |
+
$invoice->save();
|
613 |
$this->setInvoice($invoice);
|
614 |
+
$order->save();
|
615 |
return $invoice;
|
616 |
}
|
617 |
|
app/code/community/Iparcel/GlobaleCommerce/controllers/OrderController.php
CHANGED
@@ -46,7 +46,7 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
|
|
46 |
/**
|
47 |
* Adding new order
|
48 |
*/
|
49 |
-
public function
|
50 |
{
|
51 |
// register global flag
|
52 |
Mage::register('isExternalSale', true);
|
@@ -83,7 +83,6 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
|
|
83 |
Mage::throwException('There is no customer email address in your request');
|
84 |
}
|
85 |
$model->setCustomer($user, Mage::app()->getWebsite()->getId());
|
86 |
-
|
87 |
// If this is a new address, or the user doesn't have a default address
|
88 |
if ($user['address']['new'] == 1 || $model->getCustomerHasDefaultBilling() == false) {
|
89 |
$model->setCustomerBillingAddress($user['address']);
|
@@ -151,7 +150,7 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
|
|
151 |
/**
|
152 |
* Canceling an order
|
153 |
*/
|
154 |
-
public function
|
155 |
{
|
156 |
try {
|
157 |
$request = $this->_checkRequest();
|
@@ -200,7 +199,7 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
|
|
200 |
* @param array $orders Array of orders from the request
|
201 |
* @return array Updated $orders array
|
202 |
*/
|
203 |
-
|
204 |
{
|
205 |
foreach($orders as &$order) {
|
206 |
// Attempt to load the product by stripping out the Custom Options
|
@@ -244,7 +243,7 @@ class Iparcel_GlobaleCommerce_OrderController extends Mage_Core_Controller_Front
|
|
244 |
* @param array $orders Array of orders from the request
|
245 |
* @return array Updated $ordes array
|
246 |
*/
|
247 |
-
|
248 |
{
|
249 |
foreach ($orders as &$order) {
|
250 |
if (!array_key_exists('options', $order)) {
|
46 |
/**
|
47 |
* Adding new order
|
48 |
*/
|
49 |
+
public function addAction()
|
50 |
{
|
51 |
// register global flag
|
52 |
Mage::register('isExternalSale', true);
|
83 |
Mage::throwException('There is no customer email address in your request');
|
84 |
}
|
85 |
$model->setCustomer($user, Mage::app()->getWebsite()->getId());
|
|
|
86 |
// If this is a new address, or the user doesn't have a default address
|
87 |
if ($user['address']['new'] == 1 || $model->getCustomerHasDefaultBilling() == false) {
|
88 |
$model->setCustomerBillingAddress($user['address']);
|
150 |
/**
|
151 |
* Canceling an order
|
152 |
*/
|
153 |
+
public function cancelAction()
|
154 |
{
|
155 |
try {
|
156 |
$request = $this->_checkRequest();
|
199 |
* @param array $orders Array of orders from the request
|
200 |
* @return array Updated $orders array
|
201 |
*/
|
202 |
+
protected function _addCustomOptionsToOrder($orders)
|
203 |
{
|
204 |
foreach($orders as &$order) {
|
205 |
// Attempt to load the product by stripping out the Custom Options
|
243 |
* @param array $orders Array of orders from the request
|
244 |
* @return array Updated $ordes array
|
245 |
*/
|
246 |
+
protected function _convertOptions($orders)
|
247 |
{
|
248 |
foreach ($orders as &$order) {
|
249 |
if (!array_key_exists('options', $order)) {
|
app/code/community/Iparcel/GlobaleCommerce/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Iparcel_GlobaleCommerce>
|
5 |
-
<version>3.
|
6 |
</Iparcel_GlobaleCommerce>
|
7 |
</modules>
|
8 |
<frontend>
|
@@ -57,9 +57,6 @@
|
|
57 |
<children>
|
58 |
<config>
|
59 |
<children>
|
60 |
-
<salesrules>
|
61 |
-
<title>i-parcel Sales Rules Synchronization</title>
|
62 |
-
</salesrules>
|
63 |
<external_api>
|
64 |
<title>i-parcel External API</title>
|
65 |
</external_api>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Iparcel_GlobaleCommerce>
|
5 |
+
<version>3.2.0</version>
|
6 |
</Iparcel_GlobaleCommerce>
|
7 |
</modules>
|
8 |
<frontend>
|
57 |
<children>
|
58 |
<config>
|
59 |
<children>
|
|
|
|
|
|
|
60 |
<external_api>
|
61 |
<title>i-parcel External API</title>
|
62 |
</external_api>
|
app/design/adminhtml/default/default/layout/iparcel.xml
CHANGED
@@ -35,17 +35,6 @@
|
|
35 |
<block type="core/template" name="catalog.sync" template="iparcel/sync/ajax/catalog.phtml"/>
|
36 |
</reference>
|
37 |
</adminhtml_iparcel_sync_ajax_catalog>
|
38 |
-
<adminhtml_iparcel_sync_ajax_checkitems>
|
39 |
-
<reference name="head">
|
40 |
-
<action method="addJs"><script>iparcel/jQuery.js</script></action>
|
41 |
-
<action method="addJs"><script>iparcel/adminhtml/sync.js</script></action>
|
42 |
-
<action method="addCss"><stylesheet>iparcel/ajaxSync.css</stylesheet></action>
|
43 |
-
<action method="setTitle"><title>i-parcel Check Items</title></action>
|
44 |
-
</reference>
|
45 |
-
<reference name="content">
|
46 |
-
<block type="core/template" name="checkitems.sync" template="iparcel/sync/ajax/checkitems.phtml" />
|
47 |
-
</reference>
|
48 |
-
</adminhtml_iparcel_sync_ajax_checkitems>
|
49 |
|
50 |
<adminhtml_sales_order_view>
|
51 |
<reference name="order_totals">
|
35 |
<block type="core/template" name="catalog.sync" template="iparcel/sync/ajax/catalog.phtml"/>
|
36 |
</reference>
|
37 |
</adminhtml_iparcel_sync_ajax_catalog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
<adminhtml_sales_order_view>
|
40 |
<reference name="order_totals">
|
app/design/adminhtml/default/default/template/iparcel/sync/ajax/catalog.phtml
CHANGED
@@ -5,6 +5,8 @@
|
|
5 |
* @author Bobby Burden <bburden@i-parcel.com>
|
6 |
* @class Mage_Core_Block_Template
|
7 |
*/
|
|
|
|
|
8 |
?>
|
9 |
<div id="starting">
|
10 |
<p>Starting catalog synchronization</p>
|
@@ -18,6 +20,6 @@
|
|
18 |
</div>
|
19 |
<script type="text/javascript">
|
20 |
jQuery(document).ready(function() {
|
21 |
-
var sync = new iparcelSync.sync('<?php echo
|
22 |
})
|
23 |
</script>
|
5 |
* @author Bobby Burden <bburden@i-parcel.com>
|
6 |
* @class Mage_Core_Block_Template
|
7 |
*/
|
8 |
+
$initUrl = Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalogJsonInit');
|
9 |
+
$uploadUrl = Mage::helper('adminhtml')->getUrl('adminhtml/iparcel_sync_ajax/catalogJsonUpload');
|
10 |
?>
|
11 |
<div id="starting">
|
12 |
<p>Starting catalog synchronization</p>
|
20 |
</div>
|
21 |
<script type="text/javascript">
|
22 |
jQuery(document).ready(function() {
|
23 |
+
var sync = new iparcelSync.sync('<?php echo $initUrl ?>', '<?php echo $uploadUrl ?>', <?php echo Mage::getStoreConfig('catalog_mapping/upload/step'); ?>);
|
24 |
})
|
25 |
</script>
|
app/design/adminhtml/default/default/template/iparcel/sync/ajax/checkitems.phtml
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @category design
|
4 |
-
* @package Iparcel_All
|
5 |
-
* @author Bobby Burden <bburden@i-parcel.com>
|
6 |
-
* @class Mage_Core_Block_Template
|
7 |
-
*/
|
8 |
-
?>
|
9 |
-
<div id="starting">
|
10 |
-
<p>Starting checking items</p>
|
11 |
-
</div>
|
12 |
-
<div id="sync">
|
13 |
-
<p><span>0</span> items from <span>0</span> checked</p>
|
14 |
-
</div>
|
15 |
-
<div id="end">
|
16 |
-
<p><span>0</span> items from <span>0</span> successfully checked</p>
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/iparcel/adminhtml/sync.js
CHANGED
@@ -1,87 +1,86 @@
|
|
1 |
/**
|
2 |
* js lib for i-parcel's ajax sync
|
3 |
*
|
4 |
-
* @category
|
5 |
-
* @package
|
6 |
-
* @author
|
7 |
*/
|
8 |
var iparcelSync = {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
},
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
},
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
75 |
|
76 |
-
|
77 |
-
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
-
|
87 |
}
|
1 |
/**
|
2 |
* js lib for i-parcel's ajax sync
|
3 |
*
|
4 |
+
* @category Iparcel
|
5 |
+
* @package Iparcel_All
|
6 |
+
* @author Bobby Burden <bburden@i-parcel.com>
|
7 |
*/
|
8 |
var iparcelSync = {
|
9 |
+
item: null,
|
10 |
+
sync: null,
|
11 |
+
end: null,
|
12 |
|
13 |
+
/**
|
14 |
+
* Initialize sync ajax callback
|
15 |
+
*/
|
16 |
+
init: function (data) {
|
17 |
+
iparcelSync.item.count = data.count;
|
18 |
+
iparcelSync.sync.eq(1).text(iparcelSync.item.count);
|
19 |
+
iparcelSync.end.eq(1).text(iparcelSync.item.count);
|
20 |
+
jQuery('#starting').hide();
|
21 |
+
jQuery('#sync').show();
|
22 |
+
jQuery.get(iparcelSync.item.uploadUrl, {
|
23 |
+
page: ++iparcelSync.item.page,
|
24 |
+
step: iparcelSync.item.step,
|
25 |
+
}, iparcelSync.refresh);
|
26 |
+
},
|
|
|
27 |
|
28 |
+
/**
|
29 |
+
* Refresh sync ajax callback
|
30 |
+
*/
|
31 |
+
refresh: function (data) {
|
32 |
+
if (!data.error) {
|
33 |
+
iparcelSync.item.progress += data.uploaded;
|
34 |
+
iparcelSync.item.errors += iparcelSync.item.step - data.uploaded;
|
35 |
+
iparcelSync.sync.eq(0).text(iparcelSync.item.progress);
|
36 |
+
iparcelSync.end.eq(0).text(iparcelSync.item.progress);
|
37 |
+
} else {
|
38 |
+
if (iparcelSync.item.page * iparcelSync.item.step > iparcelSync.item.count) {
|
39 |
+
iparcelSync.item.errors += iparcelSync.item.count - iparcelSync.item.progress;
|
40 |
+
} else {
|
41 |
+
iparcelSync.item.errors += iparcelSync.item.step;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
if (iparcelSync.item.progress + iparcelSync.item.errors < iparcelSync.item.count) {
|
45 |
+
jQuery.get(iparcelSync.item.uploadUrl, {
|
46 |
+
page: ++iparcelSync.item.page,
|
47 |
+
step: iparcelSync.item.step,
|
48 |
+
}, iparcelSync.refresh);
|
49 |
+
} else {
|
50 |
+
iparcelSync.finish();
|
51 |
+
}
|
52 |
+
},
|
|
|
53 |
|
54 |
+
/**
|
55 |
+
* Finish sync
|
56 |
+
*/
|
57 |
+
finish: function () {
|
58 |
+
iparcelSync.end.eq(2).text(iparcelSync.item.errors);
|
59 |
+
jQuery('#sync').hide();
|
60 |
+
jQuery('#end').show();
|
61 |
+
},
|
62 |
|
63 |
+
/**
|
64 |
+
* Sync object
|
65 |
+
*/
|
66 |
+
sync: function (initUrl, uploadUrl, step) {
|
67 |
+
this.initUrl = initUrl;
|
68 |
+
this.uploadUrl = uploadUrl;
|
69 |
+
this.step = step;
|
70 |
+
this.progress = 0;
|
71 |
+
this.errors = 0;
|
72 |
+
this.count = 0;
|
73 |
+
this.page = 0;
|
74 |
|
75 |
+
iparcelSync.sync = jQuery('#sync span');
|
76 |
+
iparcelSync.end = jQuery('#end span');
|
77 |
|
78 |
+
this.run = function () {
|
79 |
+
jQuery.get(this.initUrl, {type: 'init'}, iparcelSync.init);
|
80 |
+
}
|
81 |
|
82 |
+
iparcelSync.item = this;
|
83 |
|
84 |
+
this.run();
|
85 |
+
}
|
86 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>iparcel_connect</name>
|
4 |
-
<version>3.
|
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-
|
20 |
-
<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>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>iparcel_connect</name>
|
4 |
+
<version>3.2.0</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-08-05</date>
|
20 |
+
<time>16:02:26</time>
|
21 |
+
<contents><target name="mageweb"><dir name="app"><dir name="code"><dir name="community"><dir name="Iparcel"><dir name="GlobaleCommerce"><dir name="Block"><file name="Cpf.php" hash="084f9bd9599539adcfb3684b9b2aca46"/><dir name="Payment"><file name="Info.php" hash="cbc97ba5326777dfc1192409be1de364"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="777136c54e9edaf0a4f218c477439f17"/><file name="DevController.php" hash="c76afd120afb3d23c4176d584c0b4c75"/><file name="OrderController.php" hash="0d21b617c139d18efd4e864d773ac87d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="13d82fdb42fad3c9ccf2d474cf287797"/><file name="config.xml" hash="85f65b21a20d8e9fde8d99eea7927bed"/><file name="system.xml" hash="473cfa6606cb0f27d8d671f48866c8e3"/></dir><dir name="Helper"><file name="Api.php" hash="e6ccd2cee450298d71e6514bdf9bdefd"/><file name="Data.php" hash="33cac3c2511b7e3a3bb045db60863a8c"/><file name="String.php" hash="13620129b7a2d8aa3dfaabaa8a17526e"/><dir name="Sales"><file name="Data.php" hash="6f7f15b86012d9e5e6b48cccdbbac7f1"/></dir></dir><dir name="Model"><dir name="Api"><dir name="External"><dir name="Sales"><file name="Order.php" hash="a056aa2cd6bc0f46b8ea469cb5042be4"/></dir></dir></dir><dir name="Carrier"><file name="Iparcel.php" hash="79bdbdbbac238774e519a1ba1ba581eb"/></dir><dir name="Cpf"><file name="Order.php" hash="51bf749b00a9b51e2f6f39a7e9734d86"/><file name="Quote.php" hash="6af90f0a33e0c02ba041bb6ff5882d7d"/></dir><file name="Cpf.php" hash="650bbe60bae37b3e43d8686378a2282b"/><file name="Parcel.php" hash="e9325c49bc67983c075b5bba76bc243a"/><dir name="Payment"><file name="Iparcel.php" hash="9e409ecd268225c713a180abe17c3a94"/></dir><dir name="Resource"><dir name="Api"><file name="Order.php" hash="2daf80f9a3be2c687b1ae3d9561c4305"/></dir><dir name="Cpf"><file name="Collection.php" hash="ac85f294739a7a892f60a63ca9dc8217"/><file name="Order.php" hash="e8391efb37ceecba5c6c73a2ff474b91"/><file name="Quote.php" hash="0a4687a32ebc264888e2eb21e885d938"/><dir name="Order"><file name="Collection.php" hash="7f8406d9e4a901183b36c8d0e85c1b87"/></dir><dir name="Quote"><file name="Collection.php" hash="08f0e8427111a34878ed8b711f13b5cf"/></dir></dir><file name="Cpf.php" hash="8e459e3535510675d9d7a1867d244008"/><file name="Parcel.php" hash="389b267d69b196454fbc97e9287cbca5"/><file name="Setup.php" hash="4752a060c3cf972f30d503b3d7f7ce70"/><dir name="Parcel"><file name="Collection.php" hash="3009eb727415705ae5f83739c007804c"/></dir></dir><dir name="Sales"><dir name="Order"><file name="Observer.php" hash="22e58f9e21b4ca3cd41f611bdd479a57"/></dir><file name="Order.php" hash="3e24b0b9a493a295f70684da3bb8b37e"/><dir name="Quote"><file name="Observer.php" hash="b9ac9f1f2323765b482dd4970ed2c7e8"/></dir></dir></dir><dir name="sql"><dir name="ipglobalecommerce_setup"><file name="mysql4-install-0.2.0.php" hash="a2d77ada0a1ed47fc9983cc3dfbb6c52"/><file name="mysql4-install-0.3.0.php" hash="a2d77ada0a1ed47fc9983cc3dfbb6c52"/><file name="mysql4-install-2.3.4.2.php" hash="deaea497fbb845739102375833116f90"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="d08b88d172a58246d27cfe8b1b25b353"/><file name="mysql4-upgrade-0.3.1-0.3.2.php" hash="55d56591823e441d4f5f8c34c4067922"/><file name="mysql4-upgrade-0.3.2-2.0.0.php" hash="d78bde958b23787eb243a2f0ab3814eb"/><file name="mysql4-upgrade-2.0.0-2.3.4.2.php" hash="caa9c9b26eb98a662e62d28adf1475f4"/><file name="mysql4-upgrade-2.4.0.3-2.4.1.0.php" hash="e67007d6ccc67dbcfb226c5601f8c8f0"/><file name="mysql4-upgrade-2.4.1.17-2.4.3.0.php" hash="aaca3b01138aedeaee8edc1cc231736f"/><file name="mysql4-upgrade-2.4.1.6-2.4.1.7.php" hash="fe16b8c574899d242e8b07889c823605"/><file name="mysql4-upgrade-2.4.6-2.4.7.php" hash="27d32d4c780813ef93de0b3512235af2"/></dir></dir></dir><dir name="All"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Mapping"><file name="Button.php" hash="dfdaf5a2fbf824a10fccc952fdccf567"/></dir></dir><dir name="Iparcel"><file name="Dashboard.php" hash="ec9dddd10368136f1bdfe79fddd4500c"/><file name="Logs.php" hash="5823bbc2a78666972dd02d5fd3e9d05d"/><dir name="Logs"><file name="Grid.php" hash="9c472c78640c8aecb5de4b638372e6f5"/></dir><dir name="Shipment"><dir name="Split"><file name="Form.php" hash="db44693b1eda47cb1d87b8a69ac9a5a0"/></dir><file name="Split.php" hash="4cb66f91987f842c699bd2d6c42f2249"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Method.php" hash="935a3d4adad09d6c049cd6bb4cefb8db"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="5de6102a56f4a9301f1b81004da39ef8"/></dir><file name="Product.php" hash="71a865c01574fd10ee0ffa7475cee378"/></dir><dir name="Catalogsearch"><dir name="Advanced"><file name="Result.php" hash="ad5a157444b80a284e0f9e7a91187b55"/></dir><file name="Result.php" hash="33e4ab0994bde9ba5dd87ade63869bee"/></dir><dir name="Html"><dir name="Head"><file name="Iparcel.php" hash="dd1737d041e9357269fa35b27dbef0bd"/><file name="Jquery.php" hash="3fd23960111c32d5696cc3de63e41b6e"/><file name="Post.php" hash="793d578cf82fb3ba83e1edc87b79ff95"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><file name="Abstract.php" hash="71cdfdce9a538b2f78b83b7b5eac8b19"/><file name="Duty.php" hash="2ca06e658c24b74d5e3dfa2a6950b010"/><file name="Tax.php" hash="7b630e60c6ff9340bedefdc84e99cef4"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Iparcel"><file name="LogController.php" hash="94e2095979140ad6d7c149080be30d38"/><file name="ShipmentController.php" hash="a9b8896d816b7612e1dc0638a2f8b740"/><dir name="Shipment"><file name="SplitController.php" hash="6a294947cf9399e42e90c890a6da2caa"/></dir><dir name="Sync"><file name="AjaxController.php" hash="224df904979eb90a3f639a8f5c89787a"/></dir></dir></dir><file name="AjaxController.php" hash="f6b0573eefbb21d7ac863fd029783b3c"/><file name="InfoController.php" hash="ab1bdf953dac27d87e9c5c8023ed9380"/><file name="InternationalController.php" hash="5250af3266389ddf0f5ea3a806652328"/></dir><dir name="etc"><file name="adminhtml.xml" hash="50bc0bee93b5612763321eae11cfdc51"/><file name="config.xml" hash="4bd33ca7a2dca415a545f524165ced48"/><file name="system.xml" hash="823d3690c187d8c3db42912d83a6303b"/></dir><dir name="Helper"><file name="Api.php" hash="4ab64cc17f7817268517f69486def609"/><file name="Data.php" hash="2e4f16bb0a3f1fe1345b5d21df59dbae"/><file name="International.php" hash="7bba0cd23188eaa3f99ed3d32ffccd14"/></dir><dir name="Model"><dir name="Api"><file name="Quote.php" hash="2e938bda13d007e73f8c2238aff76fa1"/></dir><dir name="Carrier"><file name="Abstract.php" hash="87ebc5b402ea74709a00abcf2a8aa856"/><file name="Iparcel.php" hash="add977e3b85ae8c08914874f02a288b3"/></dir><dir name="Catalog"><dir name="Product"><file name="Observer.php" hash="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="f6d8d758ed1772ab3c8fd782f2c95183"/><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Duty.php" hash="33b91a5b8fa32293bfe0eab4460b04f9"/><file name="Tax.php" hash="7cd4046231eb8cb9031ae160720390da"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Duty.php" hash="5a4010994ea502afe88632ddd2699c63"/><file name="Tax.php" hash="c4c95aaaae9662860dd635238150aa46"/></dir></dir></dir><dir name="Payment"><file name="Iparcel.php" hash="d7881d795edbbd7279888e3a86fff2c8"/></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Abstract.php" hash="c5f5a251d5cf9f6ddb5a6d92efad157b"/><file name="Collector.php" hash="f805c3fc373f931d912b92cf38a15154"/><file name="Duty.php" hash="41adb9e60a5a22e1e552eb12aa83f858"/><file name="Tax.php" hash="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="e4b0f82aaef3666be520bc2da28af098"/><file name="Subtotal.php" hash="6824b6e6e86dc423fd493a31b15aa28d"/><file name="Tax.php" hash="7ee0528db7b7f9e89cd00a0b0c74dda9"/></dir></dir></dir><dir name="sql"><dir name="iparcel_setup"><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="4df6e3a3f2adf96eeb6ccdac213e3f1e"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="358045d3bf4a53a477e52b573289fe4c"/><file name="mysql4-upgrade-1.1.1-1.2.0.php" hash="1f04c5c71a6a79aaf74810e87670d998"/><file name="mysql4-upgrade-1.2.0-1.2.1.php" hash="de1c9caa713dd194595aa2dd15a829ac"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ipglobalecommerce"><file name="cpf.phtml" hash="6f7835f5df6f6baabaf6a136a372469a"/></dir><dir name="iparcel"><dir name="html"><dir name="head"><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/><file name="iparcel.phtml" hash="07091c9914189cfef06af8cc6e41855c"/><file name="jquery.phtml" hash="c287cb0aa4ddd1f04f27cb5df605a27d"/><file name="post.phtml" hash="1a53e744668b250175ba275b4260050b"/></dir></dir><dir name="post"><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/><file name="list.phtml" hash="20e5d7d7f82e1f8d951a1509921eb3bf"/></dir><file name="post.phtml" hash="3827cab2dba981556aeb8ec915ab03cc"/></dir></dir><dir name="layout"><file name="externalshipping.xml" hash="3d6f4472442849cdb356ce9a8c33da65"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/><file name="iparcel.xml" hash="55aec816cb242fe44aab3a2e0d9de0ba"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="externalsales.xml" hash="990ecce7258a8f6586d41efde1f29e13"/><file name="iparcel.xml" hash="b6e4778db9cebc970e1dc58cae12eb85"/></dir><dir name="template"><dir name="iparcel"><dir name="order"><dir name="totals"><file name="duty.phtml" hash="7af41c6d47dafeb890a520d8e6e39910"/><file name="tax.phtml" hash="25bffd2b58554cf28e5f4abe4b4e1e7c"/></dir></dir><dir name="sync"><dir name="ajax"><file name="catalog.phtml" hash="54ad431bc5f9b6d8dc50a1160e6d6ab5"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Iparcel_GlobaleCommerce.xml" hash="0dc1ebffdd8d16f0da230acdf7c76901"/><file name="Iparcel_All.xml" hash="89e4b47a6ac9aa0b82f70b1539d587ea"/></dir></dir><dir name="locale"><dir name="en_US"><file name="iparcel.csv" hash="cbcb75a490376ca0b63c8c66622c1656"/></dir></dir></dir><dir name="var"><dir name="connect"><file name="iparcel_connect.xml" hash="d212a8922aadf484676e74a880ad86eb"/></dir></dir><dir name="js"><dir name="iparcel"><dir name="adminhtml"><file name="label.js" hash="39bf27f07ff782dcde65480d4ff04496"/><file name="label.js" hash="39bf27f07ff782dcde65480d4ff04496"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/><file name="shipping-methods.js" hash="eca91e8a5cf152fce7af0eb5bf2991bb"/><file name="sync.js" hash="f755af215fb6121c766644bd9a0f399d"/></dir><file name="cpf.js" hash="92443ee9633827b535044aebbdaeef87"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/><file name="jQuery.js" hash="8ec1680e4d815ff93f661214efa06276"/><file name="lib.js" hash="42c556650eb62797de469f1770bde3f0"/><file name="post.js" hash="c710697e3d4905a6a707222728485047"/></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="iparcel"><dir name="font"><file name="code128.ttf" hash=""/><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>
|