Woo - Version 1.1.7

Version Notes

Support details statistic

Download this release

Release Info

Developer Woomio
Extension Woo
Version 1.1.7
Comparing to
See all releases


Code changes from version 1.1.6 to 1.1.7

Files changed (18) hide show
  1. app/code/local/Woomio/Tracker/controllers/IndexController.php +60 -25
  2. app/code/local/Woomio/Tracker/data/tracker_setup/{data-install-1.1.6.php → data-install-1.1.7.php} +1 -1
  3. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.10-1.1.6.php → data-upgrade-1.0.10-1.1.7.php} +1 -1
  4. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.11-1.1.6.php → data-upgrade-1.0.11-1.1.7.php} +1 -1
  5. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.12-1.1.6.php → data-upgrade-1.0.12-1.1.7.php} +1 -1
  6. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.0-1.1.6.php → data-upgrade-1.1.0-1.1.7.php} +1 -1
  7. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.1-1.1.6.php → data-upgrade-1.1.1-1.1.7.php} +1 -1
  8. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.2-1.1.6.php → data-upgrade-1.1.2-1.1.7.php} +1 -1
  9. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.3-1.1.6.php → data-upgrade-1.1.3-1.1.7.php} +1 -1
  10. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.4-1.1.6.php → data-upgrade-1.1.4-1.1.7.php} +1 -1
  11. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.5-1.1.6.php → data-upgrade-1.1.5-1.1.7.php} +1 -1
  12. app/code/local/Woomio/Tracker/data/tracker_setup/data-upgrade-1.1.6-1.1.7.php +36 -0
  13. app/code/local/Woomio/Tracker/etc/config.xml +1 -1
  14. app/code/local/Woomio/Tracker/sql/tracker_setup/{install-1.1.6.php → install-1.1.7.php} +0 -0
  15. app/design/frontend/base/default/layout/tracker.xml +1 -1
  16. app/design/frontend/base/default/template/woomio_tracker/tracking.phtml +1 -1
  17. app/etc/modules/Woomio_Tracker.xml +1 -1
  18. package.xml +4 -4
app/code/local/Woomio/Tracker/controllers/IndexController.php CHANGED
@@ -22,21 +22,9 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
22
  $response = new stdClass();
23
  $response->orders = $this->get_orders($affiliated, $id, $hrs);
24
  break;
25
-
26
  case 'customers':
27
- $response = array();
28
-
29
- if($id){
30
- $Address = Mage::getModel('sales/order_address')->load($id);
31
- $response['customers'][] = $Address->getData();
32
- }
33
- else{
34
- $Addresses = Mage::getModel('sales/order_address')->getCollection()->addFieldToSelect('*')->addFieldToFilter('address_type', 'billing');
35
- foreach($Addresses as $Address) {
36
- $response['customers'][$Address->getId()] = $Address->getData();
37
- }
38
- unset($Address);
39
- }
40
  break;
41
  case 'products':
42
  $response = array();
@@ -70,8 +58,6 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
70
  }
71
 
72
  function get_orders($affiliated, $id, $hrs) {
73
- global $wpdb;
74
-
75
  //If no orders return empty order array
76
  $orders = array();
77
 
@@ -83,8 +69,8 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
83
 
84
  $now = new DateTime(null, new DateTimeZone('UTC'));
85
 
86
- //Get orders
87
- $query = "SELECT entity_id, created_at, shipping_method, shipping_amount, shipping_tax_amount, order_currency_code, remote_ip, customer_is_guest, customer_id, customer_email, discount_amount, tax_amount, grand_total, shipping_address_id, billing_address_id";
88
  if($affiliated === true) {
89
  $query .= ", wacsid";
90
  }
@@ -94,16 +80,16 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
94
  }
95
  $query .= " WHERE entity_id >= 0"; //Always true condition to allow adding the other conditionals based on parameters
96
  if($affiliated === true) {
97
- $query .= " AND entity_id=orderid";
98
  }
99
  if($id) {
100
- $query .= " AND entity_id = :id";
101
  }
102
  if($hrs !== null) {
103
  $now->sub(new DateInterval('PT' . $hrs . 'H'));
104
  $query .= " AND created_at >= :created_at";
105
  }
106
- $query .= " ORDER BY entity_id;";
107
 
108
  $query_binds = array();
109
  if ($id && $hrs !== null) {
@@ -118,9 +104,12 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
118
  }
119
 
120
  $result = $read_connection->query($query, $query_binds);
 
121
  while($row = $result->fetch()) {
122
  $order = new stdClass();
123
- $order->id = $row['entity_id'];
 
 
124
  $order->time = $row['created_at'];
125
  $order->items = array();
126
  $order->shippings = array();
@@ -159,7 +148,7 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
159
  $address_query .= " WHERE t1.entity_id = :shipping_entity_id;";
160
 
161
  foreach($orders as $order) {
162
- $item_query_binds = array('order_id' => $order->id);
163
  //Get order items
164
  $result = $read_connection->query($item_query, $item_query_binds);
165
  $count = 0;
@@ -195,9 +184,9 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
195
  $order->shippings[0]->shipping_company = $row['shipping_company'];
196
  $order->shippings[0]->shipping_country = $row['shipping_country'];
197
 
198
- $order->billing_state = $row['billing_state'];
199
  $order->billing_postcode = $row['billing_postcode'];
200
- $order->billing_lastname = "";
201
  if($row['billing_middlename'] !== null) {
202
  $order->billing_last_name .= $row['billing_middlename'] . " ";
203
  }
@@ -214,4 +203,50 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
214
 
215
  return $orders;
216
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
22
  $response = new stdClass();
23
  $response->orders = $this->get_orders($affiliated, $id, $hrs);
24
  break;
 
25
  case 'customers':
26
+ $response = new stdClass();
27
+ $response->customers = $this->get_customers($id);
 
 
 
 
 
 
 
 
 
 
 
28
  break;
29
  case 'products':
30
  $response = array();
58
  }
59
 
60
  function get_orders($affiliated, $id, $hrs) {
 
 
61
  //If no orders return empty order array
62
  $orders = array();
63
 
69
 
70
  $now = new DateTime(null, new DateTimeZone('UTC'));
71
 
72
+ //Get orders, increment_id is the order id shown to shop owner and customer, entity_id is the order object id used in the database
73
+ $query = "SELECT entity_id, created_at, status, shipping_method, shipping_amount, shipping_tax_amount, order_currency_code, remote_ip, customer_is_guest, customer_email, increment_id AS order_id, customer_id, discount_amount, tax_amount, grand_total, shipping_address_id, billing_address_id";
74
  if($affiliated === true) {
75
  $query .= ", wacsid";
76
  }
80
  }
81
  $query .= " WHERE entity_id >= 0"; //Always true condition to allow adding the other conditionals based on parameters
82
  if($affiliated === true) {
83
+ $query .= " AND increment_id = orderid";
84
  }
85
  if($id) {
86
+ $query .= " AND increment_id = :id";
87
  }
88
  if($hrs !== null) {
89
  $now->sub(new DateInterval('PT' . $hrs . 'H'));
90
  $query .= " AND created_at >= :created_at";
91
  }
92
+ $query .= " ORDER BY order_id;";
93
 
94
  $query_binds = array();
95
  if ($id && $hrs !== null) {
104
  }
105
 
106
  $result = $read_connection->query($query, $query_binds);
107
+
108
  while($row = $result->fetch()) {
109
  $order = new stdClass();
110
+ $order->id = $row['order_id'];
111
+ $order->entity_id = $row['entity_id'];
112
+ $order->status = $row['status'];
113
  $order->time = $row['created_at'];
114
  $order->items = array();
115
  $order->shippings = array();
148
  $address_query .= " WHERE t1.entity_id = :shipping_entity_id;";
149
 
150
  foreach($orders as $order) {
151
+ $item_query_binds = array('order_id' => $order->entity_id);
152
  //Get order items
153
  $result = $read_connection->query($item_query, $item_query_binds);
154
  $count = 0;
184
  $order->shippings[0]->shipping_company = $row['shipping_company'];
185
  $order->shippings[0]->shipping_country = $row['shipping_country'];
186
 
187
+ $order->billing_region = $row['billing_region'];
188
  $order->billing_postcode = $row['billing_postcode'];
189
+ $order->billing_last_name = "";
190
  if($row['billing_middlename'] !== null) {
191
  $order->billing_last_name .= $row['billing_middlename'] . " ";
192
  }
203
 
204
  return $orders;
205
  }
206
+
207
+ function get_customers($id) {
208
+ $customers = array();
209
+
210
+ $customers_collection = Mage::getModel('customer/customer')->getCollection()
211
+ ->addAttributeToSelect('email')
212
+ ->addAttributeToSelect('firstname')
213
+ ->addAttributeToSelect('lastname');
214
+
215
+ if($id) {
216
+ $customers_collection->addAttributeToFilter('entity_id', $id);
217
+ }
218
+
219
+ foreach ($customers_collection as $customer) {
220
+ $customerData = $customer->getData();
221
+ $customer = new stdClass();
222
+ $customer->id = $customerData['entity_id'];
223
+ $customer->first_name = $customerData['firstname'];
224
+ $customer->last_name = $customerData['lastname'];
225
+ $customer->email = $customerData['email'];
226
+
227
+
228
+ $customer_object = Mage::getModel('customer/customer')->load($customer->id);
229
+ $customer_addresses_array = $customer_object->getAddresses();
230
+ if(count($customer_addresses_array) > 0) {
231
+ foreach($customer_addresses_array as $customer_address) {
232
+ $address_array = $customer_address->toArray();
233
+ var_dump($address_array);
234
+ echo "<br><br>";
235
+ $customer->billing_address = $address_array['street'];
236
+ $customer->billing_city = $address_array['city'];
237
+ $customer->billing_postcode = $address_array['postcode'];
238
+ if(isset($address_array['region'])) {
239
+ $customer->billing_region = $address_array['region'];
240
+ }
241
+ $customer->billing_country = $address_array['country_id'];
242
+ $customer->phone = $address_array['telephone'];
243
+ break;
244
+ }
245
+ }
246
+
247
+ $customers[] = $customer;
248
+ }
249
+
250
+ return $customers;
251
+ }
252
  }
app/code/local/Woomio/Tracker/data/tracker_setup/{data-install-1.1.6.php → data-install-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Installing woomio plugin 1.1.6. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Installing woomio plugin 1.1.7. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.10-1.1.6.php → data-upgrade-1.0.10-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.0.10. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.0.10. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.11-1.1.6.php → data-upgrade-1.0.11-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.0.11. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.0.11. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.12-1.1.6.php → data-upgrade-1.0.12-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.0.12. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.0.12. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.0-1.1.6.php → data-upgrade-1.1.0-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.1.0. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.1.0. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.1-1.1.6.php → data-upgrade-1.1.1-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.1.1. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.1.1. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.2-1.1.6.php → data-upgrade-1.1.2-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.1.2. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.1.2. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.3-1.1.6.php → data-upgrade-1.1.3-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.1.3. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.1.3. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.4-1.1.6.php → data-upgrade-1.1.4-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.1.4. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.1.4. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.5-1.1.6.php → data-upgrade-1.1.5-1.1.7.php} RENAMED
@@ -12,7 +12,7 @@ if(is_numeric($data_key) === false) {
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
- error_log("Updating to woomio plugin 1.1.6 from 1.1.5. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
12
  $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
  $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
 
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.1.5. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
 
17
  $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
 
app/code/local/Woomio/Tracker/data/tracker_setup/data-upgrade-1.1.6-1.1.7.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function w_error_handler_1106($errno, $errstr, $errfile, $errline, $errcontext) {
3
+ error_log('An error occurred registering with woomio backend, and was bypassed. ' . $errno . ': ' . $errstr);
4
+ return true;
5
+ }
6
+
7
+ //Check if data_key is already in config and that it is a number
8
+ $data_key = Mage::getStoreConfig('tracker/general/data_key');
9
+ if(is_numeric($data_key) === false) {
10
+ $email = Mage::getStoreConfig('trans_email/ident_general/email');
11
+ $domain = Mage::getStoreConfig('web/unsecure/base_url');
12
+ $lang = substr(Mage::getStoreConfig('general/locale/code'), 0, 2);
13
+ $name = Mage::getStoreConfig('trans_email/ident_general/name');
14
+
15
+ error_log("Updating to woomio plugin 1.1.7 from 1.1.6. Email: " . $email . "; Domain: " . $domain . "; Lang: " . $lang . "; Name: " . $name);
16
+
17
+ $setup_callback_url = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($name) . '&domain=' . urlencode($domain) . '&country=' . urlencode($lang) . '&email=' . urlencode($email) . '&platform=1';
18
+
19
+ //Ignore errors returned by the server
20
+ $context = stream_context_create(array(
21
+ 'http' => array('ignore_errors' => true)
22
+ ));
23
+
24
+ set_error_handler('w_error_handler_1106');
25
+ $response = @file_get_contents($setup_callback_url, false, $context);
26
+ restore_error_handler();
27
+
28
+ if($response !== false) {
29
+ $configModel = new Mage_Core_Model_Config();
30
+ //We save to default since the plugin can only be one in a multistore setup anyhow
31
+ $configModel->saveConfig('tracker/general/data_key', $response, 'default', 0);
32
+ //Make sure cache gets updated with the new config
33
+ $configModel->reinit();
34
+ Mage::app()->reinitStores();
35
+ }
36
+ }
app/code/local/Woomio/Tracker/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Woomio_Tracker>
5
- <version>1.1.6</version>
6
  </Woomio_Tracker>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Woomio_Tracker>
5
+ <version>1.1.7</version>
6
  </Woomio_Tracker>
7
  </modules>
8
  <frontend>
app/code/local/Woomio/Tracker/sql/tracker_setup/{install-1.1.6.php → install-1.1.7.php} RENAMED
File without changes
app/design/frontend/base/default/layout/tracker.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <layout version="1.1.6">
3
  <default>
4
  <reference name="head">
5
  <block type="tracker/tracking" name="tracking" as="tracker_tracking_head" template="woomio_tracker/tracking.phtml" />
1
  <?xml version="1.0"?>
2
+ <layout version="1.1.7">
3
  <default>
4
  <reference name="head">
5
  <block type="tracker/tracking" name="tracking" as="tracker_tracking_head" template="woomio_tracker/tracking.phtml" />
app/design/frontend/base/default/template/woomio_tracker/tracking.phtml CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $VERSION = '1.1.6';
3
  $DATAR = Mage::getStoreConfig('tracker/general/data_key');
4
  ?>
5
  <?php if($DATAR):?>
1
  <?php
2
+ $VERSION = '1.1.7';
3
  $DATAR = Mage::getStoreConfig('tracker/general/data_key');
4
  ?>
5
  <?php if($DATAR):?>
app/etc/modules/Woomio_Tracker.xml CHANGED
@@ -4,7 +4,7 @@
4
  <Woomio_Tracker>
5
  <active>true</active>
6
  <codePool>local</codePool>
7
- <version>1.1.6</version>
8
  </Woomio_Tracker>
9
  </modules>
10
  </config>
4
  <Woomio_Tracker>
5
  <active>true</active>
6
  <codePool>local</codePool>
7
+ <version>1.1.7</version>
8
  </Woomio_Tracker>
9
  </modules>
10
  </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Woo</name>
4
- <version>1.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.woomio.com">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -23,9 +23,9 @@ Compatibility&#xD;
23
  Woomio is fully compatible with all Magento versions and modules.</description>
24
  <notes>Support details statistic </notes>
25
  <authors><author><name>Woomio</name><user>Woomio</user><email>developer@woomio.com</email></author></authors>
26
- <date>2015-08-18</date>
27
- <time>09:59:45</time>
28
- <contents><target name="magelocal"><dir name="Woomio"><dir name="Tracker"><dir name="Block"><file name="Index.php" hash="949b7c689724a7eeeba5168a9cf03507"/><file name="Tracking.php" hash="1e3cb6eb08e18f13913b3a172571603d"/></dir><dir name="Helper"><file name="Data.php" hash="53a3a643e1eea3a72e02b5c64daa9edd"/></dir><dir name="Model"><file name="Observer.php" hash="1051776a9a12c70554447141cdc906b5"/></dir><dir name="controllers"><file name="IndexController.php" hash="f832fec73719f37b02ecdd09ff6b790a"/></dir><dir name="data"><dir name="tracker_setup"><file name="data-install-1.1.6.php" hash="32795a04d0e94394182203360d5a79cb"/><file name="data-upgrade-1.0.10-1.1.6.php" hash="a6d03f2fed98b80606492516909cabe3"/><file name="data-upgrade-1.0.11-1.1.6.php" hash="da520315da60f86aafeac17f4cae3ec7"/><file name="data-upgrade-1.0.12-1.1.6.php" hash="c828db25628da5739a41341b2934d5b9"/><file name="data-upgrade-1.1.0-1.1.6.php" hash="4260b434c65751f763cdfb8891fe67f2"/><file name="data-upgrade-1.1.1-1.1.6.php" hash="d1acd8bd934f141f42092d019fca414d"/><file name="data-upgrade-1.1.2-1.1.6.php" hash="6039751de373ce45ad818e9cbf69c675"/><file name="data-upgrade-1.1.3-1.1.6.php" hash="f2d0afccf85901e707ce2e1632708a12"/><file name="data-upgrade-1.1.4-1.1.6.php" hash="002eb1ea073547c6db62f9239402a6ef"/><file name="data-upgrade-1.1.5-1.1.6.php" hash="1219df73e6a1d6ee806fb8abd1b48dbb"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f4f46675a9901fece5c8b74bb44f7d27"/><file name="config.xml" hash="ee0145f5590aa7946343b70d34e9ee9a"/></dir><dir name="sql"><dir name="tracker_setup"><file name="install-1.1.6.php" hash="655bbf18c1da631e72f068d26ea42f86"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="tracker.xml" hash="fabefc844657e5eca96ff9a6bff71a4a"/></dir><dir name="template"><dir name="woomio_tracker"><file name="tracking.phtml" hash="0cd1b8ddf7d743f6a967bbfe32044e79"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Woomio_Tracker.xml" hash="da5af9591bfe0efd72462a49ba3f03c4"/></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Woo</name>
4
+ <version>1.1.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.woomio.com">Open Software License (OSL)</license>
7
  <channel>community</channel>
23
  Woomio is fully compatible with all Magento versions and modules.</description>
24
  <notes>Support details statistic </notes>
25
  <authors><author><name>Woomio</name><user>Woomio</user><email>developer@woomio.com</email></author></authors>
26
+ <date>2015-09-24</date>
27
+ <time>12:28:22</time>
28
+ <contents><target name="magelocal"><dir name="Woomio"><dir name="Tracker"><dir name="Block"><file name="Index.php" hash="949b7c689724a7eeeba5168a9cf03507"/><file name="Tracking.php" hash="1e3cb6eb08e18f13913b3a172571603d"/></dir><dir name="Helper"><file name="Data.php" hash="53a3a643e1eea3a72e02b5c64daa9edd"/></dir><dir name="Model"><file name="Observer.php" hash="1051776a9a12c70554447141cdc906b5"/></dir><dir name="controllers"><file name="IndexController.php" hash="c2ff5f076ade7fa7cc4203009b25a4ee"/></dir><dir name="data"><dir name="tracker_setup"><file name="data-install-1.1.7.php" hash="e73421493be88a8b6e2a5c2fea7700a8"/><file name="data-upgrade-1.0.10-1.1.7.php" hash="684c89ed31536439af09b3c835336a31"/><file name="data-upgrade-1.0.11-1.1.7.php" hash="43a42d699960b19b4b4a204beb3fbe72"/><file name="data-upgrade-1.0.12-1.1.7.php" hash="3fd5df864a39fbd4d8364aea9a3a29d8"/><file name="data-upgrade-1.1.0-1.1.7.php" hash="5f2ddc0332c33341275d0a9d64f560a9"/><file name="data-upgrade-1.1.1-1.1.7.php" hash="4ac71dc2b4a9b40a9f1acbc145a85710"/><file name="data-upgrade-1.1.2-1.1.7.php" hash="ebf72b27e204cf7dad10af48c6e8941b"/><file name="data-upgrade-1.1.3-1.1.7.php" hash="6a32a51eb01e7917b9c76487c29d43b9"/><file name="data-upgrade-1.1.4-1.1.7.php" hash="57fd353ab569c00f16898c4020bccbcf"/><file name="data-upgrade-1.1.5-1.1.7.php" hash="4bf89d96ef4b61b0361b7b36f1fb5002"/><file name="data-upgrade-1.1.6-1.1.7.php" hash="98245381307219ea24b31b525602d868"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f4f46675a9901fece5c8b74bb44f7d27"/><file name="config.xml" hash="d92b91b7e5c08318fb4b2b7a52159f45"/></dir><dir name="sql"><dir name="tracker_setup"><file name="install-1.1.7.php" hash="655bbf18c1da631e72f068d26ea42f86"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="tracker.xml" hash="3421107b555322389982dec395817b17"/></dir><dir name="template"><dir name="woomio_tracker"><file name="tracking.phtml" hash="376de219a980feca1b84a0d97867e1b5"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Woomio_Tracker.xml" hash="9d77f63a83c883f4725194c7a7be3efb"/></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>