Woo - Version 1.1.8

Version Notes

Support details statistic

Download this release

Release Info

Developer Woomio
Extension Woo
Version 1.1.8
Comparing to
See all releases


Code changes from version 1.1.7 to 1.1.8

Files changed (20) hide show
  1. app/code/local/Woomio/Tracker/Model/Observer.php +16 -44
  2. app/code/local/Woomio/Tracker/controllers/IndexController.php +14 -0
  3. app/code/local/Woomio/Tracker/data/tracker_setup/{data-install-1.1.7.php → data-install-1.1.8.php} +1 -1
  4. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.10-1.1.7.php → data-upgrade-1.0.10-1.1.8.php} +1 -1
  5. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.11-1.1.7.php → data-upgrade-1.0.11-1.1.8.php} +1 -1
  6. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.0.12-1.1.7.php → data-upgrade-1.0.12-1.1.8.php} +1 -1
  7. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.0-1.1.7.php → data-upgrade-1.1.0-1.1.8.php} +1 -1
  8. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.1-1.1.7.php → data-upgrade-1.1.1-1.1.8.php} +1 -1
  9. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.2-1.1.7.php → data-upgrade-1.1.2-1.1.8.php} +1 -1
  10. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.3-1.1.7.php → data-upgrade-1.1.3-1.1.8.php} +1 -1
  11. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.4-1.1.7.php → data-upgrade-1.1.4-1.1.8.php} +1 -1
  12. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.5-1.1.7.php → data-upgrade-1.1.5-1.1.8.php} +1 -1
  13. app/code/local/Woomio/Tracker/data/tracker_setup/{data-upgrade-1.1.6-1.1.7.php → data-upgrade-1.1.6-1.1.8.php} +1 -1
  14. app/code/local/Woomio/Tracker/data/tracker_setup/data-upgrade-1.1.7-1.1.8.php +36 -0
  15. app/code/local/Woomio/Tracker/etc/config.xml +3 -3
  16. app/code/local/Woomio/Tracker/sql/tracker_setup/{install-1.1.7.php → install-1.1.8.php} +0 -0
  17. app/design/frontend/base/default/layout/tracker.xml +1 -1
  18. app/design/frontend/base/default/template/woomio_tracker/tracking.phtml +1 -1
  19. app/etc/modules/Woomio_Tracker.xml +1 -1
  20. package.xml +4 -4
app/code/local/Woomio/Tracker/Model/Observer.php CHANGED
@@ -1,6 +1,9 @@
1
  <?php
2
  class Woomio_Tracker_Model_Observer
3
  {
 
 
 
4
  public static function w_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
5
  error_log('An error occurred sending purchase to woomio, and was bypassed. ' . $errno . ': ' . $errstr);
6
  return true;
@@ -8,8 +11,8 @@ class Woomio_Tracker_Model_Observer
8
 
9
  public function registerOrder(Varien_Event_Observer $observer)
10
  {
11
- $Order = $observer->getEvent()->getOrder();
12
- $OrderId = $Order->getId();
13
 
14
  $WascID = Mage::getModel('core/cookie')->get('wacsid');
15
 
@@ -28,49 +31,18 @@ class Woomio_Tracker_Model_Observer
28
 
29
  $url = urlencode($_SERVER['SERVER_NAME']);
30
 
31
- $CallbackUrl = "https://www.woomio.com/endpoints/purchase?sid=" . urlencode($WascID) . "&oid=" . urlencode($OrderId) . "&ot=" . urlencode($Order->getSubtotal()) . "&url=0&oc=" . urlencode($Order->getBaseCurrencyCode()) . "&email=" . urlencode($Order->getCustomerEmail()) . "&url=" . $url;
32
 
33
  //Ignore errors returned by the server
34
- $context = stream_context_create(array(
35
- 'http' => array(
36
- 'ignore_errors' => true,
37
- 'timeout' => 10 //seconds
38
- )
39
- ));
40
-
41
- set_error_handler(array('Woomio_Tracker_Model_Observer', 'w_error_handler'));
42
- @file_get_contents($CallbackUrl, false, $context);
43
- restore_error_handler();
44
-
45
- //TODO: Figure out how to make fsockopen stable, since it is a faster connection.
46
- /*$parts = parse_url($CallbackUrl);
47
-
48
- $host = $parts['host'];
49
-
50
- $path = $parts['path'];
51
- if($parts['query'] != "") {
52
- $path .= "?" . $parts['query'];
53
- }
54
-
55
- set_error_handler(array('Woomio_Tracker_Model_Observer', 'w_error_handler'));
56
- $file_pointer = fsockopen("ssl://" . $host, 443, $errno, $errstr, 10);
57
- restore_error_handler();
58
-
59
- if(!$file_pointer) {
60
- error_log("Error opening socket to woomio server: " . $errstr . "(" . $errno . ").", 0);
61
- }
62
- else {
63
- $out = "GET " . $path . " HTTP/1.1\r\n";
64
- $out .= "Host: " . $host . "\r\n";
65
- $out .= "Content-Type: application/x-www-form-urlencoded\r\n";
66
- $out .= "Connection: Close\r\n\r\n";
67
- $fwrite = fwrite($file_pointer, $out);
68
- stream_set_timeout($file_pointer, 2);
69
-
70
- if($fwrite === false) {
71
- error_log("Error sending request to woomio server: Error writing to socket.", 0);
72
- }
73
- fclose($file_pointer);
74
- }*/
75
  }
76
  }
1
  <?php
2
  class Woomio_Tracker_Model_Observer
3
  {
4
+ const WOOMIO_API = "https://www.woomio.com/endpoints";
5
+ //const WOOMIO_API = "https://test.woomio.com/endpoints";
6
+
7
  public static function w_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
8
  error_log('An error occurred sending purchase to woomio, and was bypassed. ' . $errno . ': ' . $errstr);
9
  return true;
11
 
12
  public function registerOrder(Varien_Event_Observer $observer)
13
  {
14
+ $Order = $observer->getPayment()->getOrder();
15
+ $OrderId = $Order->getIncrementId();
16
 
17
  $WascID = Mage::getModel('core/cookie')->get('wacsid');
18
 
31
 
32
  $url = urlencode($_SERVER['SERVER_NAME']);
33
 
34
+ $CallbackUrl = self::WOOMIO_API . "/purchase?sid=" . urlencode($WascID) . "&oid=" . urlencode($OrderId) . "&ot=" . urlencode($Order->getSubtotal()) . "&url=0&oc=" . urlencode($Order->getBaseCurrencyCode()) . "&email=" . urlencode($Order->getCustomerEmail()) . "&url=" . $url;
35
 
36
  //Ignore errors returned by the server
37
+ $context = stream_context_create(array(
38
+ 'http' => array(
39
+ 'ignore_errors' => true,
40
+ 'timeout' => 10 //seconds
41
+ )
42
+ ));
43
+
44
+ set_error_handler(array('Woomio_Tracker_Model_Observer', 'w_error_handler'));
45
+ @file_get_contents($CallbackUrl, false, $context);
46
+ restore_error_handler();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
  }
app/code/local/Woomio/Tracker/controllers/IndexController.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
3
  /**
4
  * @url orders: http://ec2-52-19-3-226.eu-west-1.compute.amazonaws.com/magento/woomio?type=orders
@@ -6,13 +11,17 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
6
  public function IndexAction() {
7
 
8
  $AllowedIP = gethostbyname('ping.woomio.com');
 
9
  $GetParams = Mage::app()->getRequest()->getParams();
10
  $woomioTable = Mage::getSingleton("core/resource")->getTableName('woomio');
11
 
12
  if($_SERVER['REMOTE_ADDR'] !== $AllowedIP) {
 
13
  die;
14
  }
15
 
 
 
16
  $hrs = ((isset($_GET['hrs']) && is_numeric($_GET['hrs'])) ? $_GET['hrs'] : null);
17
  $affiliated = (isset($_GET['affiliated']) && $_GET['affiliated'] === 'true');
18
  $id = (isset($_GET['id']) ? $_GET['id'] : 0);
@@ -55,8 +64,13 @@ class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
55
  }
56
 
57
  echo json_encode($response);
 
 
58
  }
59
 
 
 
 
60
  function get_orders($affiliated, $id, $hrs) {
61
  //If no orders return empty order array
62
  $orders = array();
1
  <?php
2
+ function indexcontroller_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
3
+ echo 'An error occurred in the woomio plugin. ' . $errno . ': ' . $errstr;
4
+ return true;
5
+ }
6
+
7
  class Woomio_Tracker_IndexController extends Mage_Core_Controller_Front_Action{
8
  /**
9
  * @url orders: http://ec2-52-19-3-226.eu-west-1.compute.amazonaws.com/magento/woomio?type=orders
11
  public function IndexAction() {
12
 
13
  $AllowedIP = gethostbyname('ping.woomio.com');
14
+
15
  $GetParams = Mage::app()->getRequest()->getParams();
16
  $woomioTable = Mage::getSingleton("core/resource")->getTableName('woomio');
17
 
18
  if($_SERVER['REMOTE_ADDR'] !== $AllowedIP) {
19
+ echo "Plugin error: 403";
20
  die;
21
  }
22
 
23
+ set_error_handler('indexcontroller_error_handler');
24
+
25
  $hrs = ((isset($_GET['hrs']) && is_numeric($_GET['hrs'])) ? $_GET['hrs'] : null);
26
  $affiliated = (isset($_GET['affiliated']) && $_GET['affiliated'] === 'true');
27
  $id = (isset($_GET['id']) ? $_GET['id'] : 0);
64
  }
65
 
66
  echo json_encode($response);
67
+
68
+ restore_error_handler();
69
  }
70
 
71
+ /**
72
+ * /woomio?type=orders&
73
+ */
74
  function get_orders($affiliated, $id, $hrs) {
75
  //If no orders return empty order array
76
  $orders = array();
app/code/local/Woomio/Tracker/data/tracker_setup/{data-install-1.1.7.php → data-install-1.1.8.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.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
 
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.8. 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.7.php → data-upgrade-1.0.10-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.0.11-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.0.12-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.1.0-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.1.1-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.1.2-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.1.3-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.1.4-1.1.8.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.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
 
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.8 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.7.php → data-upgrade-1.1.5-1.1.8.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.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
 
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.8 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 → data-upgrade-1.1.6-1.1.8.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.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
 
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.8 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
 
app/code/local/Woomio/Tracker/data/tracker_setup/data-upgrade-1.1.7-1.1.8.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function w_error_handler_1107($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.8 from 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
+
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_1107');
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.7</version>
6
  </Woomio_Tracker>
7
  </modules>
8
  <frontend>
@@ -55,7 +55,7 @@
55
  </tracker_read>
56
  </resources>
57
  <events>
58
- <sales_order_place_after>
59
  <observers>
60
  <ds_order_event>
61
  <type>singleton</type>
@@ -63,7 +63,7 @@
63
  <method>registerOrder</method>
64
  </ds_order_event>
65
  </observers>
66
- </sales_order_place_after>
67
  </events>
68
  </global>
69
  </config>
2
  <config>
3
  <modules>
4
  <Woomio_Tracker>
5
+ <version>1.1.8</version>
6
  </Woomio_Tracker>
7
  </modules>
8
  <frontend>
55
  </tracker_read>
56
  </resources>
57
  <events>
58
+ <sales_order_payment_pay>
59
  <observers>
60
  <ds_order_event>
61
  <type>singleton</type>
63
  <method>registerOrder</method>
64
  </ds_order_event>
65
  </observers>
66
+ </sales_order_payment_pay>
67
  </events>
68
  </global>
69
  </config>
app/code/local/Woomio/Tracker/sql/tracker_setup/{install-1.1.7.php → install-1.1.8.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.7">
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.8">
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.7';
3
  $DATAR = Mage::getStoreConfig('tracker/general/data_key');
4
  ?>
5
  <?php if($DATAR):?>
1
  <?php
2
+ $VERSION = '1.1.8';
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.7</version>
8
  </Woomio_Tracker>
9
  </modules>
10
  </config>
4
  <Woomio_Tracker>
5
  <active>true</active>
6
  <codePool>local</codePool>
7
+ <version>1.1.8</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.7</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-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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Woo</name>
4
+ <version>1.1.8</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>2016-01-15</date>
27
+ <time>08:44:40</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="47fb55ad816ece33eb6b293468e30e9f"/></dir><dir name="controllers"><file name="IndexController.php" hash="7903e6b1758b2def4c272da351459011"/></dir><dir name="data"><dir name="tracker_setup"><file name="data-install-1.1.8.php" hash="3cf7dcd933c6e3a564eb6bfdcebf0aa5"/><file name="data-upgrade-1.0.10-1.1.8.php" hash="2b649c99d261673698551851779c2723"/><file name="data-upgrade-1.0.11-1.1.8.php" hash="85ee25ccd7cdf3615db81e9fe5243e11"/><file name="data-upgrade-1.0.12-1.1.8.php" hash="0cbaf4dd48e7f6f90564fe56754e0476"/><file name="data-upgrade-1.1.0-1.1.8.php" hash="9732ad8acf92b9519a139ed788e3852b"/><file name="data-upgrade-1.1.1-1.1.8.php" hash="34e0edb753dc89ddb8d5ca281c4acf06"/><file name="data-upgrade-1.1.2-1.1.8.php" hash="43e7b2789241f7e8fa425cf3e8535449"/><file name="data-upgrade-1.1.3-1.1.8.php" hash="be9d8cf3c7053404d7b4461c0eb479fa"/><file name="data-upgrade-1.1.4-1.1.8.php" hash="91eac486f8567f59d0c737f5dd28e13c"/><file name="data-upgrade-1.1.5-1.1.8.php" hash="26b667c92a500de93288fbc8b84b50a5"/><file name="data-upgrade-1.1.6-1.1.8.php" hash="1bdbd18be86f01259b634d9a5b2cecd6"/><file name="data-upgrade-1.1.7-1.1.8.php" hash="5c79c738b8e5cbacfef4a286cd55c51b"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f4f46675a9901fece5c8b74bb44f7d27"/><file name="config.xml" hash="2022b75a008cad7615f16fca4ffb20c1"/></dir><dir name="sql"><dir name="tracker_setup"><file name="install-1.1.8.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="56e130d7a6b38358d2ce05b8de541e49"/></dir><dir name="template"><dir name="woomio_tracker"><file name="tracking.phtml" hash="ae02e323322079532052574b1b64435d"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Woomio_Tracker.xml" hash="b767e36f871dab16fe33bd7da347dd52"/></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>