Woo - Version 1.0.10

Version Notes

Support details statistic

Download this release

Release Info

Developer Woomio
Extension Woo
Version 1.0.10
Comparing to
See all releases


Code changes from version 1.0.9 to 1.0.10

app/code/local/Woomio/Tracker/Model/Observer.php CHANGED
@@ -12,7 +12,11 @@ class Woomio_Tracker_Model_Observer
12
  $OrderId = $Order->getId();
13
 
14
  $WascID = Mage::getModel('core/cookie')->get('wacsid');
15
- if(!$WascID){ $WascID = 0; }
 
 
 
 
16
 
17
  $Resource = Mage::getSingleton('core/resource');
18
  $Connection = Mage::getSingleton('core/resource')->getConnection('core_write');
@@ -22,9 +26,24 @@ class Woomio_Tracker_Model_Observer
22
  $Connection = Mage::getSingleton('core/resource')->getConnection('core_write');
23
  $Connection->query($InsertSQL);
24
 
25
- $CallbackUrl = "https://www.woomio.com/endpoints/purchase?sid=" . urlencode($WascID) . "&oid=" . urlencode($OrderId) . "&ot=" . urlencode($Order->getGrandTotal()) . "&url=0&oc=" . urlencode($Order->getBaseCurrencyCode()) . "&email=" . urlencode($Order->getCustomerEmail());
 
 
26
 
27
- $parts = parse_url($CallbackUrl);
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  $host = $parts['host'];
30
 
@@ -52,6 +71,6 @@ class Woomio_Tracker_Model_Observer
52
  error_log("Error sending request to woomio server: Error writing to socket.", 0);
53
  }
54
  fclose($file_pointer);
55
- }
56
  }
57
  }
12
  $OrderId = $Order->getId();
13
 
14
  $WascID = Mage::getModel('core/cookie')->get('wacsid');
15
+
16
+ //We do not log purchases that are not affiliates
17
+ if(!$WascID) {
18
+ return;
19
+ }
20
 
21
  $Resource = Mage::getSingleton('core/resource');
22
  $Connection = Mage::getSingleton('core/resource')->getConnection('core_write');
26
  $Connection = Mage::getSingleton('core/resource')->getConnection('core_write');
27
  $Connection->query($InsertSQL);
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->getGrandTotal()) . "&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
 
71
  error_log("Error sending request to woomio server: Error writing to socket.", 0);
72
  }
73
  fclose($file_pointer);
74
+ }*/
75
  }
76
  }
app/code/local/Woomio/Tracker/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Woomio_Tracker>
5
- <version>1.0.9</version>
6
  </Woomio_Tracker>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Woomio_Tracker>
5
+ <version>1.0.10</version>
6
  </Woomio_Tracker>
7
  </modules>
8
  <frontend>
app/design/frontend/base/default/layout/tracker.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <layout version="1.0.9">
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.0.10">
3
  <default>
4
  <reference name="head">
5
  <block type="tracker/tracking" name="tracking" as="tracker_tracking_head" template="woomio_tracker/tracking.phtml" />
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.0.9</version>
8
  </Woomio_Tracker>
9
  </modules>
10
  </config>
4
  <Woomio_Tracker>
5
  <active>true</active>
6
  <codePool>local</codePool>
7
+ <version>1.0.10</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.0.9</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-06-23</date>
27
- <time>13:01:33</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="3fd0599f7dae4eb723364fef9a26d16b"/></dir><dir name="controllers"><file name="IndexController.php" hash="23096ef9a4af36032fe9098f87b057db"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f4f46675a9901fece5c8b74bb44f7d27"/><file name="config.xml" hash="649076c7464a5fd05f79593a416beacf"/></dir><dir name="sql"><dir name="tracker_setup"><file name="mysql4-install-1.0.6.php" hash="d2962e2e16a5f24e8854cb7bc36a792a"/></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="8f82770be01872ddbc9d6376d844144a"/></dir><dir name="template"><dir name="woomio_tracker"><file name="tracking.phtml" hash="0e015827b7beea57e8254f25e6ec1f5e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Woomio_Tracker.xml" hash="f914fd42517f4b93ebeacf64d7d032d0"/></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.0.10</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-06-25</date>
27
+ <time>14:05:23</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="6cfacdde5c3aa358c889ef1f842a61f3"/></dir><dir name="controllers"><file name="IndexController.php" hash="23096ef9a4af36032fe9098f87b057db"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f4f46675a9901fece5c8b74bb44f7d27"/><file name="config.xml" hash="4093da932f0dd3a3cbfdbf9c9b84dfff"/></dir><dir name="sql"><dir name="tracker_setup"><file name="mysql4-install-1.0.6.php" hash="d2962e2e16a5f24e8854cb7bc36a792a"/></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="7496be85364ef3230ebbf549cbeab805"/></dir><dir name="template"><dir name="woomio_tracker"><file name="tracking.phtml" hash="0e015827b7beea57e8254f25e6ec1f5e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Woomio_Tracker.xml" hash="a605cb72165822d88233570ac97463e3"/></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>