Iglobal_Main - Version 1.0.7

Version Notes

-fixed bug related to duplicate orders
-fixed bug related to collect totals errors

Download this release

Release Info

Developer Matt Flamm
Extension Iglobal_Main
Version 1.0.7
Comparing to
See all releases


Code changes from version 1.0.6 to 1.0.7

app/code/community/Iglobal/Fee/etc/config.xml CHANGED
@@ -48,7 +48,8 @@
48
  <quote>
49
  <totals>
50
  <fee>
51
- <class>fee/sales_quote_address_total_fee</class>
 
52
  </fee>
53
  </totals>
54
  </quote>
@@ -56,6 +57,7 @@
56
  <totals>
57
  <fee>
58
  <class>fee/sales_order_total_invoice_fee</class>
 
59
  </fee>
60
  </totals>
61
  </order_invoice>
@@ -63,6 +65,7 @@
63
  <totals>
64
  <fee>
65
  <class>fee/sales_order_total_creditmemo_fee</class>
 
66
  </fee>
67
  </totals>
68
  </order_creditmemo>
48
  <quote>
49
  <totals>
50
  <fee>
51
+ <class>fee/sales_quote_address_total_fee</class>
52
+ <after>tax</after>
53
  </fee>
54
  </totals>
55
  </quote>
57
  <totals>
58
  <fee>
59
  <class>fee/sales_order_total_invoice_fee</class>
60
+ <after>tax</after>
61
  </fee>
62
  </totals>
63
  </order_invoice>
65
  <totals>
66
  <fee>
67
  <class>fee/sales_order_total_creditmemo_fee</class>
68
+ <after>tax</after>
69
  </fee>
70
  </totals>
71
  </order_creditmemo>
app/code/community/Iglobal/Stores/Model/Observer.php CHANGED
@@ -75,8 +75,10 @@ class Iglobal_Stores_Model_Observer
75
 
76
  //build array of orders with keypairs "ig_order_number" => "the number as a string"
77
  foreach($orderData as $row => $order){
78
- $newId = $order['id'];
79
- array_push($restOrders, $newId);
 
 
80
  }
81
 
82
  //build array of orders currently in magento
@@ -105,6 +107,7 @@ class Iglobal_Stores_Model_Observer
105
  $mail->setToName('iGlobal Customer');
106
  if (Mage::getStoreConfig('iglobal_integration/apireqs/admin_email')) {
107
  $mail->setBcc('monitoring@iglobalstores.com');
 
108
  $mail->setToEmail(Mage::getStoreConfig('iglobal_integration/apireqs/admin_email'));
109
  } else {
110
  $mail->setToEmail('monitoring@iglobalstores.com');
75
 
76
  //build array of orders with keypairs "ig_order_number" => "the number as a string"
77
  foreach($orderData as $row => $order){
78
+ if($data['testOrder'] == "false"){
79
+ $newId = $order['id'];
80
+ array_push($restOrders, $newId);
81
+ }
82
  }
83
 
84
  //build array of orders currently in magento
107
  $mail->setToName('iGlobal Customer');
108
  if (Mage::getStoreConfig('iglobal_integration/apireqs/admin_email')) {
109
  $mail->setBcc('monitoring@iglobalstores.com');
110
+ $mail->setCc('magentomonitoring@iglobalstores.com');
111
  $mail->setToEmail(Mage::getStoreConfig('iglobal_integration/apireqs/admin_email'));
112
  } else {
113
  $mail->setToEmail('monitoring@iglobalstores.com');
app/code/community/Iglobal/Stores/controllers/OrderscheckController.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ <?php
4
+
5
+ class Iglobal_Stores_OrderscheckController extends Mage_Core_Controller_Front_Action
6
+ {
7
+ public function indexAction()
8
+ {
9
+
10
+ //get array with all orders in past
11
+ $rest = Mage::getModel('stores/rest_order'); // get rest model
12
+
13
+ //fetch all orders for the store from iGlobal server
14
+ $data = $rest->getAllOrdersSinceDate('20140526');
15
+ $orderData = $data['order'];
16
+ $restOrders = array();
17
+
18
+ //build array of orders with keypairs "ig_order_number" => "the number as a string"
19
+ foreach($orderData as $row => $order){
20
+ if($data['testOrder'] == "false"){
21
+ $newId = $order['id'];
22
+ array_push($restOrders, $newId);
23
+ }
24
+ }
25
+
26
+
27
+ //build array of orders currently in magento
28
+ $table = "sales_flat_order";
29
+ $tableName = Mage::getSingleton("core/resource")->getTableName($table);
30
+ $reader = Mage::getSingleton('core/resource')->getConnection('core_read'); // get our connection to the DB
31
+ $importedIgOrdersQuery = "Select * from `" . $tableName . "` where `international_order` = 1 AND `ig_order_number` IS NOT NULL"; //select rows that are ig orders
32
+ $importedIgOrders = $reader->fetchAll($importedIgOrdersQuery); //fetch them all
33
+
34
+ //fix teh array so it matches our array of all orders
35
+ $magentoOrders = array();
36
+ foreach ($importedIgOrders as $importedIgOrder) {
37
+ $newId = $importedIgOrder['ig_order_number'];
38
+ array_push($magentoOrders, $newId);
39
+ }
40
+
41
+
42
+ //compare arrays, removing orders already in magento from list of all orders, remainder are orders that didn't import
43
+ $missedOrders = array_diff($restOrders, $magentoOrders);
44
+
45
+ if (count($missedOrders) > 0) {
46
+ echo '<div style="width:50%;background-color:#c1c1c1;overflow:hidden;">Missed Orders: <br />';
47
+ foreach ($missedOrders as $missedOrder){
48
+ echo $missedOrder . '<br />';
49
+ }
50
+ //var_dump($missedOrders);
51
+ echo '</div>';
52
+ } else {
53
+ echo '<div style="width:50%;background-color:#c1c1c1;overflow:hidden;">There are no orders that have not been imported<br /></div>';
54
+ }
55
+
56
+ /* if (count($restOrders) > 0) {
57
+ echo '<div style="width:50%;background-color:#e0e0e0;overflow:hidden;float:left;">Rest Orders: <br />';
58
+ var_dump($restOrders);
59
+ echo '</div>';
60
+ } else {
61
+ echo '<div style="width:50%;background-color:#e0e0e0;overflow:hidden;float:left;">All orders from iGlobal are test orders.<br />';
62
+ }
63
+
64
+ if (count($magentoOrders) > 0) {
65
+ echo '<div style="width:50%;background-color:#e0e0e0;overflow:hidden;float:left;">Magento Orders: <br />';
66
+ var_dump($magentoOrders);
67
+ echo '</div>';
68
+ } else {
69
+ echo '<div style="width:50%;background-color:#e0e0e0;overflow:hidden;float:left;">You don\'t have any orders from iGlobal imported yet.<br />';
70
+ } */
71
+
72
+
73
+ //create array of duplicate orders
74
+ $allOrders = array();
75
+ foreach ($importedIgOrders as $importedIgOrder) {
76
+ $order = Mage::getModel('sales/order')->load($importedIgOrder['entity_id']);
77
+ $Incrementid = $importedIgOrder['entity_id'];
78
+ $magentoOrderId = $order->getIncrementId();
79
+ $allOrders[$magentoOrderId] = $importedIgOrder['ig_order_number'];
80
+ }
81
+
82
+ //create a complicated way to show duplicates, because PHP only makes it easy to find unique values. for shame, php. for shame.
83
+ $duplicateOrders = array_diff_assoc($allOrders,array_unique($allOrders));
84
+
85
+ echo '<table style="width:50%;background-color:#e0e0e0;border: 1px solid black;"><thead><tr><th>Orders duplicated in Magento (does not include the actual order, only the duplicates)</th></tr><tr><th>Magento Order Number</th><th>iGlobal Order Number</th></tr></thead><tbody>';
86
+
87
+ foreach ($duplicateOrders as $key=>$value) {
88
+ echo '<tr><td>' . $key . '</td><td>' . $value . '</td></tr>';
89
+ }
90
+ echo '</tbody></table>' ;
91
+
92
+ /* //get array of all
93
+ $dupsQuery = "SELECT *, COUNT(*) as count FROM " . $tableName ." GROUP BY ig_order_number HAVING COUNT(*) > 1";
94
+ $duplicatedIgOrders = $reader->fetchAll($dupsQuery);
95
+ //var_dump($duplicatedIgOrders);
96
+
97
+ //foreach to get $orderId
98
+ foreach ($duplicatedIgOrders as $order){
99
+ $igNumber = $order['ig_order_number'];
100
+ $magentoNumber = $order['entity_id'];
101
+ //array_push($magentoOrders, $newId);
102
+ echo $igNumber . ":" . $magentoNumber;
103
+ //echo $igNumber;
104
+ }
105
+
106
+ //remove from array if no duplicate
107
+
108
+ //echo unique order numbers, paired with ig_order number
109
+ $order = Mage::getModel('sales/order')->load($orderid);
110
+ $Incrementid = $order->getIncrementId();
111
+ */
112
+ }
113
+
114
+
115
+ }
116
+
app/code/community/Iglobal/Stores/controllers/SuccessController.php CHANGED
@@ -8,57 +8,40 @@ class Iglobal_Stores_SuccessController extends Mage_Core_Controller_Front_Action
8
  $_order = $this->getRequest()->getParam('orderId', null);
9
  try
10
  {
11
- /*
12
- Mage::log('in the try', null, 'iglobal.log');
13
-
14
- //try and log the whole trace to see what is calling this
15
- Mage::log(' ******* Entered the controller. Begin backtrace: *******', null, 'mattscustom.log');
16
- foreach(debug_backtrace() as $key=>$info)
17
- {
18
- Mage::Log("#" . $key .
19
- " Called " .
20
- $info['function'] .
21
- " in " .
22
- $info['file'] .
23
- " on line " .
24
- $info['line'], null, 'mattscustom.log');
25
- }
26
- */
27
-
28
- $quote = Mage::getSingleton('checkout/session')->getQuote()->setStoreId(Mage::app()->getStore()->getId());//if more than one store, then this should be set dynamically
29
- $table = "sales_flat_order";
30
- $tableName = Mage::getSingleton("core/resource")->getTableName($table);
31
- $existsQuery = "SELECT `entity_id` FROM `" . $tableName. "` WHERE `ig_order_number` = '{$_order}'";
32
- //Mage::log('Exists Query: ' . $existsQuery, null, 'mattscustom.log');
33
- $orderExists = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchRow($existsQuery);
34
- //Mage::log('Order Exists: ' . $orderExists, null, 'mattscustom.log');
35
-
36
- if(!$_order || $orderExists) header('Location: /');
37
 
38
- //log that we passed the location change
39
- // Mage::log('**** We made it past the the redirect: $_order and $orderExist are true ****', null, 'mattscustom.log');
 
 
40
 
41
- $rest = Mage::getModel('stores/rest_order');
42
- $data = $rest->getOrder($_order);
43
-
44
 
45
- $quote->setCustomerEmail($data['email']);
46
- //set ddp
47
- $quote->setFeeAmount($data['dutyTaxesTotal']); //turn this back on to get the fee stff working again
 
 
 
 
 
48
 
49
- $_name = explode(' ', $data['name'], 2);
50
- if ($data['testOrder'] == "true") {
51
- $name_first = "TEST ORDER! DO NOT SHIP! - " . array_shift($_name);
52
- $name_last = array_pop($_name);
53
- } else {
54
- $name_first = array_shift($_name);
55
- $name_last = array_pop($_name);
56
- }
57
-
58
- $quote->setCustomerFirstname($name_first);
59
- $quote->setCustomerLastname($name_last);
60
 
61
- $street = $data['address2'] ? array($data['address1'], $data['address2']) : $data['address1'];
62
 
63
  // to fix error with countries w/o zip codes
64
  if (is_array($data['zip'])){
@@ -67,89 +50,55 @@ class Iglobal_Stores_SuccessController extends Mage_Core_Controller_Front_Action
67
  $igcZipCode = $data['zip'];
68
  }
69
 
70
- $addressData = array(
71
- 'firstname' => $name_first,
72
- 'lastname' => $name_last,
73
- 'street' => $street,
74
- 'city' => $data['city'],
75
- 'postcode' => $igcZipCode,
76
- 'telephone' => $data['phone'],
77
- 'region' => $data['state'],
78
- 'country_id' => $data['countryCode'],
79
- 'company' => $data['company'],
80
- );
81
-
82
- $billingCheckVar = $data['billingAddress1'];
83
- if (!empty($billingCheckVar)){
84
- $_nameBilling = explode(' ', $data['billingName'], 2);
85
- if ($data['testOrder'] == "true") {
86
- $name_first_billing = "TEST ORDER! DO NOT SHIP! - " . array_shift($_nameBilling);
87
- $name_last_billing = array_pop($_nameBilling);
88
- } else {
89
- $name_first_billing = array_shift($_nameBilling);
90
- $name_last_billing = array_pop($_nameBilling);
91
- }
92
-
93
-
94
- $streetBilling = $data['billingAddress2'] ? array($data['billingAddress1'], $data['billingAddress2']) : $data['billingAddress1'];
95
 
 
 
 
96
  // to fix error with countries w/o zip codes
97
  if (is_array($data['billingZip'])){
98
  $igcZipCodeBilling = ' ';
99
  }else {
100
  $igcZipCodeBilling = $data['billingZip'];
101
  }
102
-
103
- $billingAddressData = array(
104
- 'firstname' => $name_first_billing,
105
- 'lastname' => $name_last_billing,
106
- 'street' => $streetBilling,
107
- 'city' => $data['billingCity'],
108
- 'postcode' => $igcZipCodeBilling,
109
- 'telephone' => $data['billingPhone'],
110
- 'region' => $data['billingState'],
111
- 'country_id' => $data['billingCountryCode'],
112
- );
113
- } else {
114
- $billingAddressData = $addressData;
115
- }
116
-
117
- /*
118
- // code to pull available shipping methods pulls all available shipping methods and makes an array. used if you want to use merchants avaialable methods instead of iglobal custom method.
119
- $methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
120
- $shipping = array();
121
- foreach($methods as $_ccode => $_carrier) {
122
- if($_methods = $_carrier->getAllowedMethods()) {
123
- if(!$_title = Mage::getStoreConfig("carriers/$_ccode/title"))
124
- $_title = $_ccode;
125
- foreach($_methods as $_mcode => $_method) {
126
- $_code = $_ccode . '_' . $_mcode;
127
- $shipping[$_code]=array('title' => $_method,'carrier' => $_title);
128
- }
129
- }
130
- }
131
 
132
- //matches XML shipping level with Magento carrier code
133
-
134
- // shipping methods designed to use in store shipping methods already in place. changing this for our current version
135
- set the shipping method name here, like in the code below
136
- //matches XML shipping level with Magento carrier code
137
-
138
- used if you are trying to validate shipping method against merchent avaialable methods to use their built in modules
139
- $shippingRate = $data['shippingTotal'];
140
- if (!$shippingCarrierTitle || !$shippingMethodTItle){
141
- if(!$shippingCarrierTitle && $shipping [$shipper]['carrier']) {
142
- $shippingCarrierTitle = $shipping [$shipper]['carrier'];// 'Starship Spamblaster';
143
- } elseif (!$shippingCarrierTitle) {
144
- $shippingCarrierTitle = 'iGlobal';
145
- }
146
- if (!$shippingMethodTItle && $shipping [$shipper]['title']){
147
- $shippingMethodTitle = $shipping [$shipper]['title'];//'Operation: Tickle Fight';
148
- } elseif (!$shippingMethodTItle) {
149
- $shippingMethodTitle = 'International Shipping';
150
- }
151
  }
152
- */
 
153
  $shippingRate = $data['shippingTotal'];
154
  $shippingCarrierMethod = $data['shippingCarrierServiceLevel'];
155
  switch ($shippingCarrierMethod) {
@@ -232,104 +181,103 @@ class Iglobal_Stores_SuccessController extends Mage_Core_Controller_Front_Action
232
  $shippingCarrierTitle = 'iGlobal';
233
  $shippingMethodTitle = 'International Shipping';
234
  }
235
-
236
- Mage::register('shipping_cost', $shippingRate);
237
- Mage::register('shipping_carriertitle', $shippingCarrierTitle);
238
- Mage::register('shipping_methodtitle', $shippingMethodTitle);
 
239
 
240
- //set shipping info
241
- $billingAddress = $quote->getBillingAddress()->addData($billingAddressData); // i think this is wehre to add the billing address info. try creating a seperate address data aray and mapping billing address info to it.
242
- $shippingAddress = $quote->getShippingAddress()->addData($addressData);
243
- $shippingAddress->setCollectShippingRates(true)->collectShippingRates()
244
  ->setShippingMethod('excellence_excellence')
245
  ->setPaymentMethod('iGlobalCreditCard');
246
-
247
-
248
- //updates payment type in Magento Admin area
249
- $paymentMethod = $data ['paymentProcessing'] ['paymentGateway'];
250
- if($paymentMethod === 'iGlobal_CC'){
251
- $paymentType = 'iGlobalCreditCard';
252
- } else if ($paymentMethod === 'iGlobal PayPal') {
253
- $paymentType = 'iGlobalPaypal';
254
- } else {
255
- $paymentType = 'iGlobal';
256
- };
257
 
258
- $quote->getPayment()->importData(array('method' => $paymentType));
259
 
260
- $quote->collectTotals()->save();
261
 
262
- $service = Mage::getModel('stores/service_quote', $quote);
263
- $service->submitAll();
264
- $order = $service->getOrder();
265
-
266
 
267
- // cleaning up
268
- Mage::getSingleton('checkout/session')->clear();
269
 
270
- $id = $order->getEntityId();
271
 
272
- Mage::getSingleton('checkout/session')->setLastOrderId($order->getId());
273
- Mage::getSingleton('checkout/session')->setLastRealOrderId($order->getIncrementId());
274
 
275
- //Save Order Invoice as paid
276
- $commentMessage = 'Order automatically imported from iGlobal order ID: '. $_order;
277
-
278
- try {
279
- $order = Mage::getModel("sales/order")->load($id);
280
- $invoices = Mage::getModel('sales/order_invoice')->getCollection()->addAttributeToFilter('order_id', array('eq'=>$order->getId()));
281
- $invoices->getSelect()->limit(1);
282
- if ((int)$invoices->count() == 0 && $order->getState() == Mage_Sales_Model_Order::STATE_NEW) {
283
- if(!$order->canInvoice()) {
284
  $order->addStatusHistoryComment($commentMessage, false);
285
- $order->addStatusHistoryComment('iGlobal: Order cannot be invoiced', false);
286
- $order->save();
287
- } else {
288
  $order->addStatusHistoryComment($commentMessage, false);
289
- $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
290
- $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);
291
- $invoice->register();
292
- $invoice->getOrder()->setCustomerNoteNotify(false);
293
- $invoice->getOrder()->setIsInProcess(true);
294
- $order->addStatusHistoryComment('Automatically INVOICED by iGlobal', false);
295
- $transactionSave = Mage::getModel('core/resource_transaction')
296
- ->addObject($invoice)
297
- ->addObject($invoice->getOrder());
298
- $transactionSave->save();
299
- }
300
- }
301
- } catch (Exception $e) {
302
- $order->addStatusHistoryComment('iGlobal Invoicer: Exception occurred during automatically invoicing. Exception message: '.$e->getMessage(), false);
303
- $order->save();
304
- }
305
 
306
- if ($data['testOrder'] == 'true') {
307
- //Set the international_order flag and the ig_order_number on the order
308
- $query = "UPDATE `" . $tableName . "` SET `international_order` = 1, `ig_order_number` = '{$_order}', `iglobal_test_order` = 1 WHERE `entity_id` = '{$id}'";
309
- Mage::getSingleton('core/resource')->getConnection('core_write')->query($query);
310
- } else {
311
- //Set the international_order flag and the ig_order_number on the order
312
- $query = "UPDATE `" . $tableName . "` SET `international_order` = 1, `ig_order_number` = '{$_order}' WHERE `entity_id` = '{$id}'";
313
- Mage::getSingleton('core/resource')->getConnection('core_write')->query($query);
314
- }
315
 
316
- //Send the magento id to iGlobal
317
- $rest->sendMagentoOrderId($_order, $id);
318
 
319
  }
320
  catch(Exception $e)
321
  {
322
- //die($e);
323
- if (Mage::getStoreConfig('iglobal_integration/apireqs/admin_email')) {
324
- $adminEmail = Mage::getStoreConfig('iglobal_integration/apireqs/admin_email');
325
- }
326
- mail('monitoring@iglobalstores.com', 'Magento Integration Error - International order failed to import', 'International order# '. $_order .'.'. ' Exception Message: '.$e->getMessage());
327
- if ($adminEmail) {
328
- mail($adminEmail, 'iGlobal Import Error - International order failed to import', 'iGlobal International order# '. $_order . " failed to import properly. We've already received notice of the problem, and are probably working on it as you read this. Until then, you may manually enter the order, or give us a call for help at 1-800-942-0721." );
329
- }
330
- Mage::log("International order #{$_order} failed to import!" .$e, Zend_Log::ERR, 'iglobal.log', true);
331
- //Mage::log($e->getMessage(), null, 'iglobal.log');
332
- //Mage::log("Order Failed to Import Automatically" .$e, Zend_Log::ERR, 'iglobal.log', true);
333
  }
334
 
335
  $this->loadLayout();
8
  $_order = $this->getRequest()->getParam('orderId', null);
9
  try
10
  {
11
+ $quote = Mage::getSingleton('checkout/session')->getQuote()->setStoreId(Mage::app()->getStore()->getId());
12
+ $table = "sales_flat_order";
13
+ $tableName = Mage::getSingleton("core/resource")->getTableName($table);
14
+ $existsQuery = "SELECT `entity_id` FROM `" . $tableName. "` WHERE `ig_order_number` = '{$_order}'";
15
+ $orderExists = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchRow($existsQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
+ if(!$_order || $orderExists) {
18
+ header('Location: /');
19
+ die();
20
+ }
21
 
 
 
 
22
 
23
+ $rest = Mage::getModel('stores/rest_order');
24
+ $data = $rest->getOrder($_order);
25
+
26
+ //set ddp
27
+ $quote->setFeeAmount($data['dutyTaxesTotal']);
28
+
29
+ //set customer info
30
+ $quote->setCustomerEmail($data['email']);
31
 
32
+ $_name = explode(' ', $data['name'], 2);
33
+ if ($data['testOrder'] == "true") {
34
+ $name_first = "TEST ORDER! DO NOT SHIP! - " . array_shift($_name);
35
+ $name_last = array_pop($_name);
36
+ } else {
37
+ $name_first = array_shift($_name);
38
+ $name_last = array_pop($_name);
39
+ }
40
+
41
+ $quote->setCustomerFirstname($name_first);
42
+ $quote->setCustomerLastname($name_last);
43
 
44
+ $street = $data['address2'] ? array($data['address1'], $data['address2']) : $data['address1'];
45
 
46
  // to fix error with countries w/o zip codes
47
  if (is_array($data['zip'])){
50
  $igcZipCode = $data['zip'];
51
  }
52
 
53
+ $addressData = array(
54
+ 'firstname' => $name_first,
55
+ 'lastname' => $name_last,
56
+ 'street' => $street,
57
+ 'city' => $data['city'],
58
+ 'postcode' => $igcZipCode,
59
+ 'telephone' => $data['phone'],
60
+ 'region' => $data['state'],
61
+ 'country_id' => $data['countryCode'],
62
+ 'company' => $data['company'],
63
+ );
64
+
65
+ $billingCheckVar = $data['billingAddress1'];
66
+ if (!empty($billingCheckVar)){
67
+ $_nameBilling = explode(' ', $data['billingName'], 2);
68
+ if ($data['testOrder'] == "true") {
69
+ $name_first_billing = "TEST ORDER! DO NOT SHIP! - " . array_shift($_nameBilling);
70
+ $name_last_billing = array_pop($_nameBilling);
71
+ } else {
72
+ $name_first_billing = array_shift($_nameBilling);
73
+ $name_last_billing = array_pop($_nameBilling);
74
+ }
 
 
 
75
 
76
+
77
+ $streetBilling = $data['billingAddress2'] ? array($data['billingAddress1'], $data['billingAddress2']) : $data['billingAddress1'];
78
+
79
  // to fix error with countries w/o zip codes
80
  if (is_array($data['billingZip'])){
81
  $igcZipCodeBilling = ' ';
82
  }else {
83
  $igcZipCodeBilling = $data['billingZip'];
84
  }
85
+
86
+ $billingAddressData = array(
87
+ 'firstname' => $name_first_billing,
88
+ 'lastname' => $name_last_billing,
89
+ 'street' => $streetBilling,
90
+ 'city' => $data['billingCity'],
91
+ 'postcode' => $igcZipCodeBilling,
92
+ 'telephone' => $data['billingPhone'],
93
+ 'region' => $data['billingState'],
94
+ 'country_id' => $data['billingCountryCode'],
95
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
+ } else {
98
+ $billingAddressData = $addressData;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  }
100
+
101
+ //Figure out shipping carrier name etc.
102
  $shippingRate = $data['shippingTotal'];
103
  $shippingCarrierMethod = $data['shippingCarrierServiceLevel'];
104
  switch ($shippingCarrierMethod) {
181
  $shippingCarrierTitle = 'iGlobal';
182
  $shippingMethodTitle = 'International Shipping';
183
  }
184
+
185
+ //Add things to the register so they can be used by the shipping method
186
+ Mage::register('shipping_cost', $shippingRate);
187
+ Mage::register('shipping_carriertitle', $shippingCarrierTitle);
188
+ Mage::register('shipping_methodtitle', $shippingMethodTitle);
189
 
190
+ //set shipping info
191
+ $billingAddress = $quote->getBillingAddress()->addData($billingAddressData);
192
+ $shippingAddress = $quote->getShippingAddress()->addData($addressData);
193
+ $shippingAddress->setCollectShippingRates(true)->collectShippingRates()
194
  ->setShippingMethod('excellence_excellence')
195
  ->setPaymentMethod('iGlobalCreditCard');
196
+
197
+
198
+ //updates payment type in Magento Admin area
199
+ $paymentMethod = $data ['paymentProcessing'] ['paymentGateway'];
200
+ if($paymentMethod === 'iGlobal_CC'){
201
+ $paymentType = 'iGlobalCreditCard';
202
+ } else if ($paymentMethod === 'iGlobal PayPal') {
203
+ $paymentType = 'iGlobalPaypal';
204
+ } else {
205
+ $paymentType = 'iGlobal';
206
+ };
207
 
208
+ $quote->getPayment()->importData(array('method' => $paymentType));
209
 
210
+ $quote->collectTotals()->save();
211
 
212
+ $service = Mage::getModel('stores/service_quote', $quote);
213
+ $service->submitAll();
214
+ $order = $service->getOrder();
215
+
216
 
217
+ // cleaning up
218
+ Mage::getSingleton('checkout/session')->clear();
219
 
220
+ $id = $order->getEntityId();
221
 
222
+ Mage::getSingleton('checkout/session')->setLastOrderId($order->getId());
223
+ Mage::getSingleton('checkout/session')->setLastRealOrderId($order->getIncrementId());
224
 
225
+ //Save Order Invoice as paid
226
+ $commentMessage = 'Order automatically imported from iGlobal order ID: '. $_order;
227
+
228
+ try {
229
+ $order = Mage::getModel("sales/order")->load($id);
230
+ $invoices = Mage::getModel('sales/order_invoice')->getCollection()->addAttributeToFilter('order_id', array('eq'=>$order->getId()));
231
+ $invoices->getSelect()->limit(1);
232
+ if ((int)$invoices->count() == 0 && $order->getState() == Mage_Sales_Model_Order::STATE_NEW) {
233
+ if(!$order->canInvoice()) {
234
  $order->addStatusHistoryComment($commentMessage, false);
235
+ $order->addStatusHistoryComment('iGlobal: Order cannot be invoiced', false);
236
+ $order->save();
237
+ } else {
238
  $order->addStatusHistoryComment($commentMessage, false);
239
+ $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
240
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);
241
+ $invoice->register();
242
+ $invoice->getOrder()->setCustomerNoteNotify(false);
243
+ $invoice->getOrder()->setIsInProcess(true);
244
+ $order->addStatusHistoryComment('Automatically INVOICED by iGlobal', false);
245
+ $transactionSave = Mage::getModel('core/resource_transaction')
246
+ ->addObject($invoice)
247
+ ->addObject($invoice->getOrder());
248
+ $transactionSave->save();
249
+ }
250
+ }
251
+ } catch (Exception $e) {
252
+ $order->addStatusHistoryComment('iGlobal Invoicer: Exception occurred during automatically invoicing. Exception message: '.$e->getMessage(), false);
253
+ $order->save();
254
+ }
255
 
256
+ if ($data['testOrder'] == 'true') {
257
+ //Set the international_order flag and the ig_order_number on the order and mark as a test order
258
+ $query = "UPDATE `" . $tableName . "` SET `international_order` = 1, `ig_order_number` = '{$_order}', `iglobal_test_order` = 1 WHERE `entity_id` = '{$id}'";
259
+ Mage::getSingleton('core/resource')->getConnection('core_write')->query($query);
260
+ } else {
261
+ //Set the international_order flag and the ig_order_number on the order
262
+ $query = "UPDATE `" . $tableName . "` SET `international_order` = 1, `ig_order_number` = '{$_order}' WHERE `entity_id` = '{$id}'";
263
+ Mage::getSingleton('core/resource')->getConnection('core_write')->query($query);
264
+ }
265
 
266
+ //Send the magento id to iGlobal
267
+ $rest->sendMagentoOrderId($_order, $id);
268
 
269
  }
270
  catch(Exception $e)
271
  {
272
+ //die($e);
273
+ if (Mage::getStoreConfig('iglobal_integration/apireqs/admin_email')) {
274
+ $adminEmail = Mage::getStoreConfig('iglobal_integration/apireqs/admin_email');
275
+ }
276
+ mail('monitoring@iglobalstores.com', 'Magento Integration Error - International order failed to import', 'International order# '. $_order .'.'. ' Exception Message: '.$e->getMessage());
277
+ if ($adminEmail) {
278
+ mail($adminEmail, 'iGlobal Import Error - International order failed to import', 'iGlobal International order# '. $_order . " failed to import properly. We've already received notice of the problem, and are probably working on it as you read this. Until then, you may manually enter the order, or give us a call for help at 1-800-942-0721." );
279
+ }
280
+ Mage::log("International order #{$_order} failed to import!" .$e, Zend_Log::ERR, 'iglobal.log', true);
 
 
281
  }
282
 
283
  $this->loadLayout();
app/code/community/Iglobal/Stores/controllers/TestController.php CHANGED
@@ -9,86 +9,37 @@ class Iglobal_Stores_TestController extends Mage_Core_Controller_Front_Action
9
 
10
  echo "in the controller <br/>";
11
 
12
-
13
- $_order = '902-107604'; // has different addresses
14
- //$_order = '902-107620'; // has same addresses
15
-
16
- $rest = Mage::getModel('stores/rest_order');
17
- $data = $rest->getOrder($_order);
18
-
19
-
20
- $_name = explode(' ', $data['name'], 2);
21
- if ($data['testOrder'] == "true") {
22
- $name_first = "TEST ORDER! DO NOT SHIP! - " . array_shift($_name);
23
- $name_last = array_pop($_name);
24
- } else {
25
- $name_first = array_shift($_name);
26
- $name_last = array_pop($_name);
27
- }
28
-
29
- $street = $data['address2'] ? array($data['address1'], $data['address2']) : $data['address1'];
30
-
31
- // to fix error with countries w/o zip codes
32
- if (is_array($data['zip'])){
33
- $igcZipCode = ' ';
34
- }else {
35
- $igcZipCode = $data['zip'];
36
- }
37
-
38
- $addressData = array(
39
- 'firstname' => $name_first,
40
- 'lastname' => $name_last,
41
- 'street' => $street,
42
- 'city' => $data['city'],
43
- 'postcode' => $igcZipCode,
44
- 'telephone' => $data['phone'],
45
- 'region' => $data['state'],
46
- //'region' => 'utah',
47
- //'region_id' => 'ut',
48
- 'country_id' => $data['countryCode'],
49
- 'company' => $data['company'],
50
- );
51
-
52
- $billingCheckVar = $data['billingAddress1'];
53
- if (!empty($billingCheckVar)){
54
- $_nameBilling = explode(' ', $data['billingName'], 2);
55
- if ($data['testOrder'] == "true") {
56
- $name_first_billing = "TEST ORDER! DO NOT SHIP! - " . array_shift($_nameBilling);
57
- $name_last_billing = array_pop($_nameBilling);
58
- } else {
59
- $name_first_billing = array_shift($_nameBilling);
60
- $name_last_billing = array_pop($_nameBilling);
61
- }
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
- $streetBilling = $data['billingAddress2'] ? array($data['billingAddress1'], $data['billingAddress2']) : $data['billingAddress1'];
65
-
66
- // to fix error with countries w/o zip codes
67
- if (is_array($data['billingZip'])){
68
- $igcZipCodeBilling = ' ';
69
- }else {
70
- $igcZipCodeBilling = $data['billingZip'];
71
- }
72
-
73
- $billingAddressData = array(
74
- 'firstname' => $name_first_billing,
75
- 'lastname' => $name_last_billing,
76
- 'street' => $streetBilling,
77
- 'city' => $data['billingCity'],
78
- 'postcode' => $igcZipCodeBilling,
79
- 'telephone' => $data['billingPhone'],
80
- 'region' => $data['billingState'],
81
- 'country_id' => $data['billingCountryCode'],
82
- );
83
- } else {
84
- $billingAddressData = $addressData;
85
- }
86
- echo "Address Data: <br />";
87
- Zend_Debug::dump($addressData);
88
-
89
-
90
- echo "Billing Address Data: <br />";
91
- Zend_Debug::dump($billingAddressData);
92
  /*
93
  // Load the session
94
  $session = Mage::getModel('checkout/cart');
9
 
10
  echo "in the controller <br/>";
11
 
12
+ // $_order = "902-111111";
13
+ $_order = $this->getRequest()->getParam('orderId', null);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
+ $quote = Mage::getSingleton('checkout/session')->getQuote()->setStoreId(Mage::app()->getStore()->getId());//if more than one store, then this should be set dynamically
16
+ $table = "sales_flat_order";
17
+ $tableName = Mage::getSingleton("core/resource")->getTableName($table);
18
+ $existsQuery = "SELECT `entity_id` FROM `" . $tableName. "` WHERE `ig_order_number` = '{$_order}'";
19
+ $orderExists = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchRow($existsQuery);
20
+
21
+ echo 'My Query: ' . $existsQuery . '<br />';
22
+ echo 'My Query result: ' . $orderExists . '<br />';
23
+ Zend_Debug::dump($orderExists);
24
+
25
+ if(!$_order ){
26
+ echo 'Order is not defined. <br />';
27
+ }else {
28
+ echo 'Order is defined <br />';
29
+ }
30
+
31
+ if($orderExists){
32
+ echo 'Order Exists. <br />';
33
+ }else {
34
+ echo 'Order does not exist. <br />';
35
+ }
36
+
37
+ if(!$_order || $orderExists){
38
+ echo "I'm going to stop this right here.";
39
+ }else {
40
+ echo "I'll let you through.";
41
+ };
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  /*
44
  // Load the session
45
  $session = Mage::getModel('checkout/cart');
app/code/community/Iglobal/Stores/etc/config.xml CHANGED
@@ -4,7 +4,7 @@
4
  <config>
5
  <modules>
6
  <Iglobal_Stores>
7
- <version>1.0.6</version>
8
  <currencies>
9
  <AED></AED>
10
  <ARS>&amp;#8371;</ARS>
@@ -228,7 +228,7 @@
228
  </resources>
229
  </global>
230
  <frontend>
231
- <!-- <routers>
232
  <iglobal>
233
  <use>standard</use>
234
  <args>
@@ -236,7 +236,7 @@
236
  <frontName>iglobal</frontName>
237
  </args>
238
  </iglobal>
239
- </routers> -->
240
  <layout>
241
  <updates>
242
  <stores>
@@ -335,12 +335,12 @@
335
  </controller_action_predispatch>
336
  </events> -->
337
  </adminhtml>
338
- <crontab>
339
  <jobs>
340
  <iglobal_order_update>
341
  <schedule><cron_expr>* * */2 * *</cron_expr></schedule>
342
  <run><model>stores/observer::orderRec</model></run>
343
  </iglobal_order_update>
344
  </jobs>
345
- </crontab>
346
  </config>
4
  <config>
5
  <modules>
6
  <Iglobal_Stores>
7
+ <version>1.0.7</version>
8
  <currencies>
9
  <AED></AED>
10
  <ARS>&amp;#8371;</ARS>
228
  </resources>
229
  </global>
230
  <frontend>
231
+ <routers>
232
  <iglobal>
233
  <use>standard</use>
234
  <args>
236
  <frontName>iglobal</frontName>
237
  </args>
238
  </iglobal>
239
+ </routers>
240
  <layout>
241
  <updates>
242
  <stores>
335
  </controller_action_predispatch>
336
  </events> -->
337
  </adminhtml>
338
+ <!-- <crontab>
339
  <jobs>
340
  <iglobal_order_update>
341
  <schedule><cron_expr>* * */2 * *</cron_expr></schedule>
342
  <run><model>stores/observer::orderRec</model></run>
343
  </iglobal_order_update>
344
  </jobs>
345
+ </crontab> -->
346
  </config>
app/design/frontend/base/default/template/iglobal/stores/cart.phtml CHANGED
@@ -16,7 +16,7 @@
16
 
17
  foreach ($cart->getAllVisibleItems() as $item) {
18
 
19
- echo '<div class="igItemDetails">';
20
 
21
  /* figure this item type problem out, okay?
22
 
16
 
17
  foreach ($cart->getAllVisibleItems() as $item) {
18
 
19
+ echo '<div class="igItemDetails '.$item->getName().'">';
20
 
21
  /* figure this item type problem out, okay?
22
 
app/design/frontend/base/default/template/iglobal/stores/igcincludes.phtml CHANGED
@@ -2,16 +2,9 @@
2
 
3
  //build our URL to be able to check for cart page
4
  $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
5
- $igcDevMode = Mage::getStoreConfig('iglobal_integration/igc_dev/dev_on'); //set to 1 for localhost dev environment, 0 for anything not on localhost
6
- // $localHostUrl = 'http://localhost';
7
  //label the area of DOM
8
  echo '<!--Added for iGlobal-->';
9
-
10
- //if (Mage::getStoreConfig('iglobal_integration/apireqs/iglobalid')) {
11
- // echo '<span id="iglobal_store_id" style="display:none;">' . Mage::getStoreConfig('iglobal_integration/apireqs/iglobalid') . "</span>";
12
- //}
13
-
14
- //If (!$igcDevMode){
15
 
16
  //set include for welcome mat
17
  if (Mage::getStoreConfig('iglobal_integration/igmat/welcome_mat_active')){ //welcome mat is on
@@ -61,45 +54,5 @@
61
  }
62
  }
63
 
64
- /*
65
- }else{ //devmode includes
66
-
67
- //set include for welcome mat
68
- if (Mage::getStoreConfig('iglobal_integration/apireqs/welcome_mat_active')){ //welcome mat is on
69
- if (Mage::getStoreConfig('iglobal_integration/apireqs/welcome_mat_script')){ //custom welcome mat has been uploaded
70
-
71
- // these lines are used in localhost dev environment only
72
- echo '<script type="text/javascript" src="'.$localHostUrl.'/magento/js/iGlobal/'.Mage::getStoreConfig('iglobal_integration/apireqs/welcome_mat_script').'"></script>'; //temp call b/c of problems with localhost:88
73
- echo '<link rel="stylesheet" type="text/css" href="'.$localHostUrl.'/magento/js/iGlobal/' . Mage::getStoreConfig('iglobal_integration/apireqs/welcome_mat_css') . '">';//temp call b/c of problems with localhost:88
74
-
75
- } else { //welcome mat is on, but no custom file has been uploaded
76
-
77
- // these lines are used in localhost dev environment only
78
- echo '<script type="text/javascript" src="'.$localHostUrl.'/magento/js/iGlobal/ig_welcome_mat_default.js"></script>';
79
- echo '<link rel="stylesheet" type="text/css" href="'.$localHostUrl.'/magento/js/iGlobal/ig_welcome_mat_default.css">';
80
-
81
- }
82
- } else { //welcome mat is off
83
- echo '<span id="welcome_mat_deactivated" style="display:none;"></span>';
84
- }
85
-
86
- //set includes for ICE and main
87
- if ((false !== strpos($url,'cart')) || (false !== strpos($url,'checkout'))) {
88
-
89
- //include main js
90
- echo '<script type="text/javascript" src="https://checkout.iglobalstores.com/js/igc.cs.main.js"></script>';
91
-
92
- if (Mage::getStoreConfig('iglobal_integration/apireqs/ice')){
93
- //include custom ICE
94
- //echo Mage::getStoreConfig('iglobal_integration/apireqs/ice');
95
- echo '<script type="text/javascript" src="'.Mage::getStoreConfig('iglobal_integration/apireqs/ice').'">';
96
- } else {
97
- //include default ICE
98
- echo '<script type="text/javascript" src="'.$localHostUrl.'/magento/js/iGlobal/igc.cs.localhost.js"></script>'; // used for dev only
99
- }
100
- }
101
-
102
- } */
103
- //echo '<span id="ajaxpath" display="none" value = "'. Mage::getUrl("iglobal/ajax") .'"></span>';
104
  echo '<!--End of iGlobal-->';
105
  ?>
2
 
3
  //build our URL to be able to check for cart page
4
  $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
5
+
 
6
  //label the area of DOM
7
  echo '<!--Added for iGlobal-->';
 
 
 
 
 
 
8
 
9
  //set include for welcome mat
10
  if (Mage::getStoreConfig('iglobal_integration/igmat/welcome_mat_active')){ //welcome mat is on
54
  }
55
  }
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  echo '<!--End of iGlobal-->';
58
  ?>
js/iGlobal/ig_welcome_mat_default.js CHANGED
@@ -15,19 +15,9 @@ var ig_logoUrl = "http://iglobalstores.com/images/iglobal-stores.png";
15
  var ig_flagLocation = "body";
16
  var ig_flagMethod = "prepend";
17
  var ig_flagCode = '<div id="igFlag"></div>';
18
- var ajaxPath = window.location.href.replace(window.location.origin, '')
19
- ajaxPath ='/iglobal/ajax/matdata';// ajaxPath.substring(0, ajaxPath.indexOf("/",1)) + '/iglobal/ajax/matdata'; //parses the uri to figure out how to get to the right controller
20
-
21
- /* TODO: this method was taking too long. still promising route. check into it again.
22
- if (window.location.href.indexOf("index.php") != -1){
23
- var ajaxPath = window.location.href.replace(window.location.origin, '');
24
- ajaxPath = ajaxPath.substring(0, ajaxPath.indexOf("index.php")+9) + '/iglobal/ajax/matdata'; //parses the url to figure out how to get to the right controller
25
- } else if (window.location.href == window.location.origin) {
26
- var ajaxPath = window.location.href.replace(window.location.origin, '').substring(0, ajaxPath.indexOf("index.php")+9) + '/iglobal/ajax/matdata'; //parses the url to figure out how to get to the right controller
27
- }
28
- // console.log(ajaxPath);
29
- ajaxPath = 'iglobal/ajax/matdata';*/
30
- //
31
  // Set internal JQuery Variable
32
  // Can set to existing $ on page, or can include Jquery here, and set igJq to jquery-no-conflict
33
  //
@@ -96,34 +86,7 @@ var ajaxResult = igJq.ajax({
96
  });
97
 
98
 
99
- //console.log('outside: method: ' + ig_flagMethod + ' || flag: ' + ig_flagLocation + ' || code: ' + ig_flagCode + ' || Domestic countries: ' + ig_domestic + " || Serviced Countries: " + ig_countries);
100
-
101
-
102
-
103
-
104
-
105
-
106
- //
107
- // Append <div id="igFlag"></div> to specific element on page
108
- // edit using Magento Config
109
- //
110
-
111
-
112
- /*
113
- * methods to use:
114
- * append
115
- * prepend
116
- * after
117
- * before
118
- * replaceWith
119
-
120
- igJq(function(){
121
- if
122
- igJq(ig_flagLocation).prepend( '<div id="igFlag"></div>' );
123
- });
124
-
125
 
126
- */
127
 
128
  igJq(function(){
129
  if (ig_flagMethod == "prepend"){
15
  var ig_flagLocation = "body";
16
  var ig_flagMethod = "prepend";
17
  var ig_flagCode = '<div id="igFlag"></div>';
18
+ var ajaxPath = window.location.href.replace(window.location.origin, '');
19
+ ajaxPath ='/magento/index.php/iglobal/ajax/matdata';// override this when a different path is needed to reach the ajax controller
20
+
 
 
 
 
 
 
 
 
 
 
21
  // Set internal JQuery Variable
22
  // Can set to existing $ on page, or can include Jquery here, and set igJq to jquery-no-conflict
23
  //
86
  });
87
 
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
 
90
 
91
  igJq(function(){
92
  if (ig_flagMethod == "prepend"){
js/iGlobal/igc.cs.magento_default_ice.js CHANGED
@@ -6,12 +6,9 @@ $igc =jQuery
6
  var igStoreId = "3"; //this can be set by updating the "iGlobal Store ID Number" in Magento conficuration options
7
  var igSubdomain = "checkout"; //this can be set by updating the "iGlobal Hosted Checkout Subdomain" in Magento conficuration options
8
  var igCartUrl = "/magento/index.php/checkout/cart";
9
- var ajaxPath = window.location.href.replace(window.location.origin, '')
10
- ajaxPath = '/iglobal/ajax/icedata'; //parses the uri to figure out how to get to the right controller
11
- ajaxPath = '/magento/index.php/iglobal/ajax/icedata'; //just here to make it easy for me to override the default path while debugging. comment this out on a live site
12
- //ajaxPath = ajaxPath.substring(0, ajaxPath.indexOf("index.php")+9) + '/iglobal/ajax/icedata'; //parses the url to figure out how to get to the right controller
13
-
14
-
15
  $igc.post (
16
  ajaxPath,
17
  //'/magento/iglobal/ajax/icedata',
6
  var igStoreId = "3"; //this can be set by updating the "iGlobal Store ID Number" in Magento conficuration options
7
  var igSubdomain = "checkout"; //this can be set by updating the "iGlobal Hosted Checkout Subdomain" in Magento conficuration options
8
  var igCartUrl = "/magento/index.php/checkout/cart";
9
+ var ajaxPath = window.location.href.replace(window.location.origin, '');
10
+ ajaxPath = '/magento/index.php/iglobal/ajax/icedata'; //override this to adjust for different paths in different installs
11
+
 
 
 
12
  $igc.post (
13
  ajaxPath,
14
  //'/magento/iglobal/ajax/icedata',
js/iGlobal/igc.cs.matts_test_ice.js DELETED
@@ -1,205 +0,0 @@
1
- $igc =jQuery
2
-
3
-
4
- //These are the Key variables used in customizing this script. By changing these, many Magento themes will operate correctly with iGlobal technology. Some themes require further customization by defining the item details below.
5
- //identify the store
6
- var igStoreId = "3"; //this can be set by updating the "iGlobal Store ID Number" in Magento conficuration options
7
- var igSubdomain = "checkout"; //this can be set by updating the "iGlobal Hosted Checkout Subdomain" in Magento conficuration options
8
- var igCartUrl = "/magento/index.php/checkout/cart";
9
- var ajaxPath = window.location.href.replace(window.location.origin, '')
10
- ajaxPath = '/index.php/iglobal/ajax/icedata'; //parses the uri to figure out how to get to the right controller
11
- //ajaxPath = ajaxPath.substring(0, ajaxPath.indexOf("index.php")+9) + '/iglobal/ajax/icedata'; //parses the url to figure out how to get to the right controller
12
-
13
-
14
- $igc.post (
15
- ajaxPath,
16
- //'/magento/iglobal/ajax/icedata',
17
- function(data){
18
-
19
- //console.log(data);
20
- var result = eval("(" + data + ")");
21
-
22
- if (result.storeId){
23
- // store ID is set
24
- igStoreId = result.storeId;
25
- }
26
-
27
- if (result.subdomain){
28
- // subdomain is set
29
- igSubdomain = result.subdomain;
30
- }
31
-
32
- if (result.cartUrl){
33
- // subdomain is set
34
- igCartUrl = result.cartUrl;
35
- }
36
-
37
- }
38
- );
39
- //}
40
-
41
- function igcCheckout() {
42
- //TODO: reset to store 3
43
- igcGoToCheckout(igStoreId);
44
- }
45
-
46
- function getSelectedCountry() {
47
- return ig_country;
48
- }
49
-
50
- function getSubDomain() {
51
- return igSubdomain;
52
- }
53
-
54
- function igcGetItems() {
55
-
56
- var items = new Array();
57
- var itemRows = $igc(".igItemDetails");//products rows
58
-
59
- $igc(itemRows).each(function() {
60
- var qty = $igc(this).find('.igQty').text();
61
- var price = $igc(this).find('.igPrice').text();
62
- var imgURL = $igc(this).find('.igImage').text();
63
- var itemURL = $igc(this).find('.igUrl').text();
64
- var descTxt = '<span class="itemDescription">' + $igc(this).find('.igName').text() + '</span>';// + $igc(this).find('.igItemOptions').html();
65
- var sku = $igc(this).find('.igSku').text();
66
- var pid =$igc(this).find('.igID').text();
67
- var weight = $igc(this).find('.ig_itemWeight').text();
68
- var length = $igc(this).find('.ig_itemLength').text();
69
- var width = $igc(this).find('.ig_itemWidth').text();
70
- var height = $igc(this).find('.ig_itemHeight').text();
71
-
72
-
73
- if(qty){
74
- items.push({
75
- "itemDescription":$igc.trim(descTxt),
76
- "itemQuantity":$igc.trim(qty),
77
- "itemUnitPrice": $igc.trim(price),
78
- "itemURL": itemURL,
79
- "itemImageURL": imgURL,
80
- "itemSku": sku,
81
- "itemProductId": pid,
82
- "itemWeight": weight,
83
- "itemLength": length,
84
- "itemWidth": width,
85
- "itemHeight": height
86
- });
87
- }
88
- });
89
- return items;
90
- }
91
-
92
- var oldButton = "";
93
- var oldOnClick = "";
94
-
95
- function ig_recordOnClick () {
96
- //record click actions
97
- oldButton = $igc(':button[title="Proceed to Checkout"]'); //this is the jQuery selector for your checkout button
98
- oldOnClick = oldButton.attr('onclick'); //this is the attribute or click function that moves from the cart to checkout. defining this lets us move international customers to your iGlobal hosted checkout automatically.
99
- //console.log(oldOnClick);
100
- }
101
-
102
- //domestic configuration
103
-
104
- function ig_domesticActions () {
105
- $igc(oldButton).off(); // remove event handler if it was added by ig_internationalActions()
106
- //replace old onclick attr
107
- $igc(oldButton).attr('onclick',oldOnClick);
108
-
109
- //hide the shipping estimate and discount codes for int'l visitors
110
- $igc(".shipping").show();
111
- $igc(".discount").show();
112
- }
113
-
114
-
115
- //international configuration
116
-
117
- function ig_internationalActions () {
118
-
119
- //take over button
120
- $igc(oldButton).attr('onclick','');
121
- $igc(oldButton).click(function(){
122
- igcCheckout();
123
- });
124
- //hide the shipping estimate and discount codes for int'l visitors
125
- $igc(".shipping").hide();
126
- $igc(".discount").hide();
127
-
128
- }
129
-
130
- //for when the country is changed
131
- function ig_ice_countryChanged() {
132
-
133
- if (window.location.href.indexOf("cart") != -1) {
134
-
135
- if ( !ig_isDomesticCountry() ){
136
-
137
- ig_internationalActions ();
138
-
139
- } else {
140
-
141
- ig_domesticActions ();
142
-
143
- }
144
- }
145
-
146
- if ((window.location.href.indexOf("checkout") != -1) && (window.location.href.indexOf("cart") == -1)) {
147
-
148
- if ( !ig_isDomesticCountry() ){
149
-
150
- alert('You are using the domestic checkout for an international order. Please return to your cart and checkout again.');
151
- window.location.replace(igCartUrl);
152
-
153
- }
154
- }
155
- }
156
-
157
-
158
- $igc(document).ready(function(){
159
-
160
-
161
- if ((window.location.href.indexOf("checkout") != -1) && (window.location.href.indexOf("cart") == -1)) {
162
-
163
- if ( !ig_isDomesticCountry() ){
164
-
165
- alert('You are using the domestic checkout for an international order. Please return to your cart and checkout again.');
166
- window.location.replace(igCartUrl);
167
-
168
- }
169
- }
170
-
171
- //button logic
172
- if(!$igc("#welcome_mat_deactivated").length){ //welcome mat active, take button or set country
173
- if(ig_country){
174
-
175
- ig_recordOnClick();
176
-
177
- if(!ig_isDomesticCountry()){
178
-
179
-
180
- //hide the shipping estimate and discount codes for int'l visitors
181
- //$igc(".shipping").hide();
182
- //$igc(".discount").hide();
183
-
184
-
185
- ig_internationalActions ();
186
-
187
- }
188
- } else {
189
- alert("Please select your country from the list, and click the Checkout button again.");
190
- ig_showTheSplash();
191
- return false;
192
- }
193
-
194
- } else {
195
- //add additional button b/c no welcome mat
196
- var igButton = $igc('<br /><img>').attr("src","https://checkout.iglobalstores.com/images/iglobal-button2.png").attr("class","igButton").css({cursor:"pointer"});
197
-
198
- $igc(".totals .checkout-types").append($igc("<li>").append(igButton));
199
-
200
- $igc(igButton).click(function() {
201
- igcCheckout();
202
- });
203
-
204
- }
205
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,12 +1,12 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Iglobal_Main</name>
4
- <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>a test package to be used in debugging.</summary>
10
  <description>International eCommerce Done Right&#xD;
11
  Thanks for checking out the iGlobal Stores extension for Magento Community Edition! This extension gives you access to the many features of iGlobal Stores services. For more information on this extension and iGlobal's services, please visit http://www.iglobalstores.com/magento&#xD;
12
  &#xD;
@@ -55,11 +55,12 @@ Installation Instructions&#xD;
55
  &lt;li&gt;&lt;strong&gt;iGlobal Dimension Units&lt;/strong&gt; &#x2013; Unit of measure for the iGlobal Dimensional attributes. (CM / IN)&lt;/li&gt;&#xD;
56
  &lt;/ul&gt;&#xD;
57
  &lt;/ol&gt;</description>
58
- <notes>Fixed problems with installer not liking some tables in some installs</notes>
59
- <authors><author><name>Matt Flamm</name><user>mattflamm</user><email>matt@iglobalstores.com</email></author><author><name>Judd Flamm</name><user>UnkUser1</user><email>judd@iglobalstores.com</email></author><author><name>Dustin Dwyer</name><user>UnkUser2</user><email>dustin@iglobalstores.com</email></author><author><name>Dave Meads</name><user>unkuser3</user><email>dave@iglobalstores.com</email></author></authors>
60
- <date>2014-09-29</date>
61
- <time>14:48:13</time>
62
- <contents><target name="magecommunity"><dir name="Iglobal"><dir name="Ship"><dir name="Block"><file name="Ship.php" hash="a802b4d42e72997ec4ab466dec75b743"/></dir><dir name="Helper"><file name="Data.php" hash="fe9f074c1cb74260fa134efa94eb67c9"/></dir><dir name="Model"><dir name="Carrier"><file name="Excellence.php" hash="1cf0b2e1716d3f726f4e974f02267b53"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="3355a75caf30f4ff96499da3d8a4102a"/></dir><dir name="etc"><file name="config.xml" hash="adecbc76332ffb4b0f8918d3166c655c"/><file name="system.xml" hash="fea6b2ed9b7fdf5748cb57e53fe1301b"/></dir></dir><dir name="Stores"><dir name="Block"><file name="Ajax.php" hash="7b71e2bc9b801138f77f5927e7a6f6ba"/><file name="Cart.php" hash="2fd47fa1ca047bbc75383c2e35dd4bf2"/><file name="Includes.php" hash="7c36803ae1a6193f7805d7ae5bef17e6"/></dir><dir name="Helper"><file name="Configoptions.php" hash="b129e55b21f845a20d6e7fdb3b532be3"/><file name="Data.php" hash="2d77637b08ac8e7dcb717d8e1571739a"/></dir><dir name="Model"><file name="Configoptions.php" hash="6da281d601b7a6ce98ebc81b398d6e54"/><file name="Observer.php" hash="24ba19336cd0fb51700069ae3d80e471"/><dir name="Payment"><file name="Iglobal.php" hash="9ac8f8d81b8f8d547831ad6db8a1c7fc"/><file name="Iglobalcreditcard.php" hash="f2f5cf4507a128fadc95071951ca2a41"/><file name="Iglobalpaypal.php" hash="3a566289db82b177ce6b52ce205728f6"/></dir><dir name="Resource"><file name="Setup.php" hash="6b05cac95a1d36deeb7e9c9bd439ad8c"/></dir><dir name="Rest"><file name="Order.php" hash="916a67634abdf48666119854a1628ac3"/></dir><dir name="Service"><file name="Quote.php" hash="bae0e5a710b9e3aa1427bb78a08fbfd8"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="3169062e850efd55749ae8033676bf2d"/><file name="SuccessController.php" hash="ad7d23cb1845f6338c70df101aed5a78"/><file name="TestController.php" hash="16d3154f6762859648abe2167bd4c4f5"/><file name="UpdateShippingStatusController.php" hash="77534f8cbc68f23ab3377ff1427b9300"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a94aa66e4f3643fcc49fb60650fef416"/><file name="config.xml" hash="035d1c3a5bde65e7eebae378e0a6537c"/><file name="system.xml" hash="40420c6652da8b38d181fdf57ab15720"/></dir><dir name="sql"><dir name="iglobal_stores_setup"><file name="mysql4-install-0.1.0.php" hash="99054f45310bf45efce6b168a8373655"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="1e8d0cc9906c303b99042290636faef9"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="df1ecb64d74827e729df76a2d2ed2c8a"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="1e8d0cc9906c303b99042290636faef9"/><file name="mysql4-upgrade-0.1.3-1.0.0.php" hash="ef0079b0f3b1c09b7417ff86df00ad9e"/></dir></dir></dir><dir name="Fee"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Total.php" hash="0e9e1537fd6cedc9a2b4a3efdf3f769d"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="406a814f1216d736e8661a32c833a15e"/></dir><dir name="Model"><file name="Fee.php" hash="5a18c1da4f5f091d63051872a9dc0135"/><file name="Observer.php" hash="a9ec09a49108625f592f8ef00bcba842"/><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="048c8a97de6d884d3b95e0345c1cb75a"/></dir><dir name="Invoice"><file name="Fee.php" hash="fc98218c9a421b95af9f5f0ca062e1d8"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="bc925a41535068fb0a94c57183dd2027"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4cf60a3913d56196b169dd2dffa85e12"/></dir><dir name="sql"><dir name="fee_setup"><file name="mysql4-install-0.1.0.php" hash="8327866f66c8bff7fcbb0305385a6f93"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Iglobal_Ship.xml" hash="6d40f1c84e29bb7d8b70eadd77a03917"/><file name="Iglobal_Stores.xml" hash="9d9c621c78a98152bf83747eeecdaf99"/><file name="Iglobal_Fee.xml" hash="205714b75c3b417343a6b25ecedf35c4"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iglobal.xml" hash="6df6f5f0aceab891d0cd13061a3b5e55"/><file name="fee.xml" hash="96955d111e2a9014d5dc3d18201ddddf"/></dir><dir name="template"><dir name="iglobal"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="06280040dd9521efcd36c12779648108"/></dir></dir></dir></dir><dir name="fee"><dir name="sales"><dir name="order"><file name="refunded.phtml" hash="f4239d313366d75907a34b3342b35eb1"/><file name="total.phtml" hash="bbb080fb20415086d72719c1f1f613d4"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="iglobal"><dir name="checkout"><dir name="cart"><dir name="item"><dir name="configure"><file name="updatecart.phtml" hash="0fc6cc809c88704da74a915cf7e20918"/></dir></dir></dir></dir><dir name="stores"><file name="cart.phtml" hash="5d2db597e5dad80541c1caa5feab1af0"/><file name="igcincludes.phtml" hash="c8e7469a99a83a7ad7a884fa96899abc"/></dir></dir></dir><dir name="layout"><file name="iglobal.xml" hash="d522ac5d3cabf448736c0b593dd7536e"/><file name="fee.xml" hash="97d67fc83755f625dfe305748fca65b1"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="iGlobal"><file name="ig_welcome_mat_default.css" hash="52ddb2f596572313d7525de9b53adecb"/><file name="ig_welcome_mat_default.js" hash="6d8567ed60a1464e738eb018e77e7874"/><file name="igc.cs.magento_default_ice.js" hash="89898d6eb28c8636fb93f6dc5d9d0230"/><file name="igc.cs.matts_test_ice.js" hash="77971613fcf5b7addab808762ad8a421"/><dir name="jquery"><file name="jquery.js" hash="73a130a5693ab0a806c6d2acc8251006"/><file name="jquery.noconflict.js" hash="09bfdd3b964eb2b17b5d6caa1d20a607"/></dir></dir></dir></target></contents>
 
63
  <compatible/>
64
  <dependencies><required><php><min>5.0.0</min><max>7.0.0</max></php></required></dependencies>
65
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Iglobal_Main</name>
4
+ <version>1.0.7</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>fixes for DDP adding order and order duplication</summary>
10
  <description>International eCommerce Done Right&#xD;
11
  Thanks for checking out the iGlobal Stores extension for Magento Community Edition! This extension gives you access to the many features of iGlobal Stores services. For more information on this extension and iGlobal's services, please visit http://www.iglobalstores.com/magento&#xD;
12
  &#xD;
55
  &lt;li&gt;&lt;strong&gt;iGlobal Dimension Units&lt;/strong&gt; &#x2013; Unit of measure for the iGlobal Dimensional attributes. (CM / IN)&lt;/li&gt;&#xD;
56
  &lt;/ul&gt;&#xD;
57
  &lt;/ol&gt;</description>
58
+ <notes>-fixed bug related to duplicate orders&#xD;
59
+ -fixed bug related to collect totals errors</notes>
60
+ <authors><author><name>Matt Flamm</name><user>mattflamm</user><email>matt@iglobalstores.com</email></author><author><name>Judd Flamm</name><user>UnkUser1</user><email>judd@iglobalstores.com</email></author><author><name>Dustin Dwyer</name><user>iglobaldustin</user><email>dustin@iglobalstores.com</email></author><author><name>Dave Meads</name><user>jag628</user><email>dave@iglobalstores.com</email></author></authors>
61
+ <date>2014-10-07</date>
62
+ <time>16:08:47</time>
63
+ <contents><target name="magecommunity"><dir name="Iglobal"><dir name="Ship"><dir name="Block"><file name="Ship.php" hash="a802b4d42e72997ec4ab466dec75b743"/></dir><dir name="Helper"><file name="Data.php" hash="fe9f074c1cb74260fa134efa94eb67c9"/></dir><dir name="Model"><dir name="Carrier"><file name="Excellence.php" hash="1cf0b2e1716d3f726f4e974f02267b53"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="3355a75caf30f4ff96499da3d8a4102a"/></dir><dir name="etc"><file name="config.xml" hash="adecbc76332ffb4b0f8918d3166c655c"/><file name="system.xml" hash="fea6b2ed9b7fdf5748cb57e53fe1301b"/></dir></dir><dir name="Stores"><dir name="Block"><file name="Ajax.php" hash="7b71e2bc9b801138f77f5927e7a6f6ba"/><file name="Cart.php" hash="2fd47fa1ca047bbc75383c2e35dd4bf2"/><file name="Includes.php" hash="7c36803ae1a6193f7805d7ae5bef17e6"/></dir><dir name="Helper"><file name="Configoptions.php" hash="b129e55b21f845a20d6e7fdb3b532be3"/><file name="Data.php" hash="2d77637b08ac8e7dcb717d8e1571739a"/></dir><dir name="Model"><file name="Configoptions.php" hash="6da281d601b7a6ce98ebc81b398d6e54"/><file name="Observer.php" hash="eda102564a8c3662c9c9374a1211461a"/><dir name="Payment"><file name="Iglobal.php" hash="9ac8f8d81b8f8d547831ad6db8a1c7fc"/><file name="Iglobalcreditcard.php" hash="f2f5cf4507a128fadc95071951ca2a41"/><file name="Iglobalpaypal.php" hash="3a566289db82b177ce6b52ce205728f6"/></dir><dir name="Resource"><file name="Setup.php" hash="6b05cac95a1d36deeb7e9c9bd439ad8c"/></dir><dir name="Rest"><file name="Order.php" hash="916a67634abdf48666119854a1628ac3"/></dir><dir name="Service"><file name="Quote.php" hash="bae0e5a710b9e3aa1427bb78a08fbfd8"/></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="3169062e850efd55749ae8033676bf2d"/><file name="OrderscheckController.php" hash="8090c693fac1a57fc724514ae853c9f1"/><file name="SuccessController.php" hash="edbe633af4a616b62ede953ceaa41ad1"/><file name="TestController.php" hash="f7bb8d27e2b1f4e2bbbfd5bb929b6cf7"/><file name="UpdateShippingStatusController.php" hash="77534f8cbc68f23ab3377ff1427b9300"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a94aa66e4f3643fcc49fb60650fef416"/><file name="config.xml" hash="e986c2fddcac54643c8075014f566abf"/><file name="system.xml" hash="40420c6652da8b38d181fdf57ab15720"/></dir><dir name="sql"><dir name="iglobal_stores_setup"><file name="mysql4-install-0.1.0.php" hash="99054f45310bf45efce6b168a8373655"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="1e8d0cc9906c303b99042290636faef9"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="df1ecb64d74827e729df76a2d2ed2c8a"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="1e8d0cc9906c303b99042290636faef9"/><file name="mysql4-upgrade-0.1.3-1.0.0.php" hash="ef0079b0f3b1c09b7417ff86df00ad9e"/></dir></dir></dir><dir name="Fee"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Total.php" hash="0e9e1537fd6cedc9a2b4a3efdf3f769d"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="406a814f1216d736e8661a32c833a15e"/></dir><dir name="Model"><file name="Fee.php" hash="5a18c1da4f5f091d63051872a9dc0135"/><file name="Observer.php" hash="a9ec09a49108625f592f8ef00bcba842"/><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="048c8a97de6d884d3b95e0345c1cb75a"/></dir><dir name="Invoice"><file name="Fee.php" hash="fc98218c9a421b95af9f5f0ca062e1d8"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="bc925a41535068fb0a94c57183dd2027"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="5bf05265273678a578fa620aa59e34a9"/></dir><dir name="sql"><dir name="fee_setup"><file name="mysql4-install-0.1.0.php" hash="8327866f66c8bff7fcbb0305385a6f93"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Iglobal_Ship.xml" hash="6d40f1c84e29bb7d8b70eadd77a03917"/><file name="Iglobal_Stores.xml" hash="9d9c621c78a98152bf83747eeecdaf99"/><file name="Iglobal_Fee.xml" hash="205714b75c3b417343a6b25ecedf35c4"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iglobal.xml" hash="6df6f5f0aceab891d0cd13061a3b5e55"/><file name="fee.xml" hash="96955d111e2a9014d5dc3d18201ddddf"/></dir><dir name="template"><dir name="iglobal"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="06280040dd9521efcd36c12779648108"/></dir></dir></dir></dir><dir name="fee"><dir name="sales"><dir name="order"><file name="refunded.phtml" hash="f4239d313366d75907a34b3342b35eb1"/><file name="total.phtml" hash="bbb080fb20415086d72719c1f1f613d4"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="iglobal"><dir name="checkout"><dir name="cart"><dir name="item"><dir name="configure"><file name="updatecart.phtml" hash="0fc6cc809c88704da74a915cf7e20918"/></dir></dir></dir></dir><dir name="stores"><file name="cart.phtml" hash="26aad68cbe45247ece12d702f87da59b"/><file name="igcincludes.phtml" hash="871a91b03faf0849085e4d3558b77186"/></dir></dir></dir><dir name="layout"><file name="iglobal.xml" hash="d522ac5d3cabf448736c0b593dd7536e"/><file name="fee.xml" hash="97d67fc83755f625dfe305748fca65b1"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="iGlobal"><file name="ig_welcome_mat_default.css" hash="52ddb2f596572313d7525de9b53adecb"/><file name="ig_welcome_mat_default.js" hash="8cac426e7e98479a7a6d7a24ae4d1676"/><file name="igc.cs.magento_default_ice.js" hash="287b6cf8c3264dd1f194c5f81faaded0"/><dir name="jquery"><file name="jquery.js" hash="73a130a5693ab0a806c6d2acc8251006"/><file name="jquery.noconflict.js" hash="09bfdd3b964eb2b17b5d6caa1d20a607"/></dir></dir></dir></target></contents>
64
  <compatible/>
65
  <dependencies><required><php><min>5.0.0</min><max>7.0.0</max></php></required></dependencies>
66
  </package>