Version Notes
Support details statistic
Download this release
Release Info
Developer | Woomio |
Extension | Woo |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- app/code/local/Woomio/Tracker/etc/config.xml +1 -1
- app/code/local/Woomio/Tracker/sql/tracker_setup/install-1.1.0.php +0 -39
- app/code/local/Woomio/Tracker/sql/tracker_setup/install-1.1.1.php +44 -0
- app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.10-1.1.0.php +0 -39
- app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.10-1.1.1.php +44 -0
- app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.11-1.1.0.php +0 -39
- app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.11-1.1.1.php +44 -0
- app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.12-1.1.0.php +0 -39
- app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.12-1.1.1.php +44 -0
- app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.1.0-1.1.1.php +44 -0
- app/design/frontend/base/default/layout/tracker.xml +1 -1
- app/etc/modules/Woomio_Tracker.xml +1 -1
- package.xml +4 -4
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 |
</Woomio_Tracker>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Woomio_Tracker>
|
5 |
+
<version>1.1.1</version>
|
6 |
</Woomio_Tracker>
|
7 |
</modules>
|
8 |
<frontend>
|
app/code/local/Woomio/Tracker/sql/tracker_setup/install-1.1.0.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function w_error_handler($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 |
-
$installer = $this;
|
8 |
-
$installer->startSetup();
|
9 |
-
|
10 |
-
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
11 |
-
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
12 |
-
|
13 |
-
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
14 |
-
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
15 |
-
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
16 |
-
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
17 |
-
|
18 |
-
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
19 |
-
|
20 |
-
//Ignore errors returned by the server
|
21 |
-
$context = stream_context_create(array(
|
22 |
-
'http' => array('ignore_errors' => true)
|
23 |
-
));
|
24 |
-
|
25 |
-
set_error_handler('w_error_handler');
|
26 |
-
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
27 |
-
restore_error_handler();
|
28 |
-
|
29 |
-
if($Response !== false) {
|
30 |
-
$configModel = new Mage_Core_Model_Config();
|
31 |
-
//We save to default since the plugin can only be one in a multistore setup anyhow
|
32 |
-
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
33 |
-
//Make sure cache gets updated with the new config
|
34 |
-
$configModel->reinit();
|
35 |
-
Mage::app()->reinitStores();
|
36 |
-
}
|
37 |
-
|
38 |
-
$installer->run($sql);
|
39 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Woomio/Tracker/sql/tracker_setup/install-1.1.1.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function w_error_handler($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 |
+
$installer = $this;
|
8 |
+
$installer->startSetup();
|
9 |
+
|
10 |
+
//Check if data_key is already in config and that it is a number
|
11 |
+
$data_key = Mage::getStoreConfig('tracker/general/data_key');
|
12 |
+
if(is_numeric($data_key) === false) {
|
13 |
+
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
14 |
+
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
15 |
+
|
16 |
+
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
17 |
+
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
18 |
+
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
19 |
+
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
20 |
+
|
21 |
+
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
22 |
+
|
23 |
+
//Ignore errors returned by the server
|
24 |
+
$context = stream_context_create(array(
|
25 |
+
'http' => array('ignore_errors' => true)
|
26 |
+
));
|
27 |
+
|
28 |
+
set_error_handler('w_error_handler');
|
29 |
+
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
30 |
+
restore_error_handler();
|
31 |
+
|
32 |
+
if($Response !== false) {
|
33 |
+
$configModel = new Mage_Core_Model_Config();
|
34 |
+
//We save to default since the plugin can only be one in a multistore setup anyhow
|
35 |
+
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
36 |
+
//Make sure cache gets updated with the new config
|
37 |
+
$configModel->reinit();
|
38 |
+
Mage::app()->reinitStores();
|
39 |
+
}
|
40 |
+
|
41 |
+
$installer->run($sql);
|
42 |
+
}
|
43 |
+
|
44 |
+
$installer->endSetup();
|
app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.10-1.1.0.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function w_error_handler($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 |
-
$installer = $this;
|
8 |
-
$installer->startSetup();
|
9 |
-
|
10 |
-
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
11 |
-
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
12 |
-
|
13 |
-
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
14 |
-
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
15 |
-
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
16 |
-
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
17 |
-
|
18 |
-
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
19 |
-
|
20 |
-
//Ignore errors returned by the server
|
21 |
-
$context = stream_context_create(array(
|
22 |
-
'http' => array('ignore_errors' => true)
|
23 |
-
));
|
24 |
-
|
25 |
-
set_error_handler('w_error_handler');
|
26 |
-
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
27 |
-
restore_error_handler();
|
28 |
-
|
29 |
-
if($Response !== false) {
|
30 |
-
$configModel = new Mage_Core_Model_Config();
|
31 |
-
//We save to default since the plugin can only be one in a multistore setup anyhow
|
32 |
-
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
33 |
-
//Make sure cache gets updated with the new config
|
34 |
-
$configModel->reinit();
|
35 |
-
Mage::app()->reinitStores();
|
36 |
-
}
|
37 |
-
|
38 |
-
$installer->run($sql);
|
39 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.10-1.1.1.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function w_error_handler_10($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 |
+
$installer = $this;
|
8 |
+
$installer->startSetup();
|
9 |
+
|
10 |
+
//Check if data_key is already in config and that it is a number
|
11 |
+
$data_key = Mage::getStoreConfig('tracker/general/data_key');
|
12 |
+
if(is_numeric($data_key) === false) {
|
13 |
+
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
14 |
+
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
15 |
+
|
16 |
+
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
17 |
+
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
18 |
+
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
19 |
+
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
20 |
+
|
21 |
+
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
22 |
+
|
23 |
+
//Ignore errors returned by the server
|
24 |
+
$context = stream_context_create(array(
|
25 |
+
'http' => array('ignore_errors' => true)
|
26 |
+
));
|
27 |
+
|
28 |
+
set_error_handler('w_error_handler_10');
|
29 |
+
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
30 |
+
restore_error_handler();
|
31 |
+
|
32 |
+
if($Response !== false) {
|
33 |
+
$configModel = new Mage_Core_Model_Config();
|
34 |
+
//We save to default since the plugin can only be one in a multistore setup anyhow
|
35 |
+
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
36 |
+
//Make sure cache gets updated with the new config
|
37 |
+
$configModel->reinit();
|
38 |
+
Mage::app()->reinitStores();
|
39 |
+
}
|
40 |
+
|
41 |
+
$installer->run($sql);
|
42 |
+
}
|
43 |
+
|
44 |
+
$installer->endSetup();
|
app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.11-1.1.0.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function w_error_handler($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 |
-
$installer = $this;
|
8 |
-
$installer->startSetup();
|
9 |
-
|
10 |
-
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
11 |
-
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
12 |
-
|
13 |
-
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
14 |
-
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
15 |
-
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
16 |
-
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
17 |
-
|
18 |
-
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
19 |
-
|
20 |
-
//Ignore errors returned by the server
|
21 |
-
$context = stream_context_create(array(
|
22 |
-
'http' => array('ignore_errors' => true)
|
23 |
-
));
|
24 |
-
|
25 |
-
set_error_handler('w_error_handler');
|
26 |
-
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
27 |
-
restore_error_handler();
|
28 |
-
|
29 |
-
if($Response !== false) {
|
30 |
-
$configModel = new Mage_Core_Model_Config();
|
31 |
-
//We save to default since the plugin can only be one in a multistore setup anyhow
|
32 |
-
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
33 |
-
//Make sure cache gets updated with the new config
|
34 |
-
$configModel->reinit();
|
35 |
-
Mage::app()->reinitStores();
|
36 |
-
}
|
37 |
-
|
38 |
-
$installer->run($sql);
|
39 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.11-1.1.1.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function w_error_handler_11($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 |
+
$installer = $this;
|
8 |
+
$installer->startSetup();
|
9 |
+
|
10 |
+
//Check if data_key is already in config and that it is a number
|
11 |
+
$data_key = Mage::getStoreConfig('tracker/general/data_key');
|
12 |
+
if(is_numeric($data_key) === false) {
|
13 |
+
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
14 |
+
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
15 |
+
|
16 |
+
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
17 |
+
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
18 |
+
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
19 |
+
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
20 |
+
|
21 |
+
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
22 |
+
|
23 |
+
//Ignore errors returned by the server
|
24 |
+
$context = stream_context_create(array(
|
25 |
+
'http' => array('ignore_errors' => true)
|
26 |
+
));
|
27 |
+
|
28 |
+
set_error_handler('w_error_handler_11');
|
29 |
+
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
30 |
+
restore_error_handler();
|
31 |
+
|
32 |
+
if($Response !== false) {
|
33 |
+
$configModel = new Mage_Core_Model_Config();
|
34 |
+
//We save to default since the plugin can only be one in a multistore setup anyhow
|
35 |
+
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
36 |
+
//Make sure cache gets updated with the new config
|
37 |
+
$configModel->reinit();
|
38 |
+
Mage::app()->reinitStores();
|
39 |
+
}
|
40 |
+
|
41 |
+
$installer->run($sql);
|
42 |
+
}
|
43 |
+
|
44 |
+
$installer->endSetup();
|
app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.12-1.1.0.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function w_error_handler($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 |
-
$installer = $this;
|
8 |
-
$installer->startSetup();
|
9 |
-
|
10 |
-
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
11 |
-
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
12 |
-
|
13 |
-
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
14 |
-
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
15 |
-
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
16 |
-
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
17 |
-
|
18 |
-
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
19 |
-
|
20 |
-
//Ignore errors returned by the server
|
21 |
-
$context = stream_context_create(array(
|
22 |
-
'http' => array('ignore_errors' => true)
|
23 |
-
));
|
24 |
-
|
25 |
-
set_error_handler('w_error_handler');
|
26 |
-
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
27 |
-
restore_error_handler();
|
28 |
-
|
29 |
-
if($Response !== false) {
|
30 |
-
$configModel = new Mage_Core_Model_Config();
|
31 |
-
//We save to default since the plugin can only be one in a multistore setup anyhow
|
32 |
-
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
33 |
-
//Make sure cache gets updated with the new config
|
34 |
-
$configModel->reinit();
|
35 |
-
Mage::app()->reinitStores();
|
36 |
-
}
|
37 |
-
|
38 |
-
$installer->run($sql);
|
39 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.0.12-1.1.1.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function w_error_handler_12($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 |
+
$installer = $this;
|
8 |
+
$installer->startSetup();
|
9 |
+
|
10 |
+
//Check if data_key is already in config and that it is a number
|
11 |
+
$data_key = Mage::getStoreConfig('tracker/general/data_key');
|
12 |
+
if(is_numeric($data_key) === false) {
|
13 |
+
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
14 |
+
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
15 |
+
|
16 |
+
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
17 |
+
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
18 |
+
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
19 |
+
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
20 |
+
|
21 |
+
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
22 |
+
|
23 |
+
//Ignore errors returned by the server
|
24 |
+
$context = stream_context_create(array(
|
25 |
+
'http' => array('ignore_errors' => true)
|
26 |
+
));
|
27 |
+
|
28 |
+
set_error_handler('w_error_handler_12');
|
29 |
+
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
30 |
+
restore_error_handler();
|
31 |
+
|
32 |
+
if($Response !== false) {
|
33 |
+
$configModel = new Mage_Core_Model_Config();
|
34 |
+
//We save to default since the plugin can only be one in a multistore setup anyhow
|
35 |
+
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
36 |
+
//Make sure cache gets updated with the new config
|
37 |
+
$configModel->reinit();
|
38 |
+
Mage::app()->reinitStores();
|
39 |
+
}
|
40 |
+
|
41 |
+
$installer->run($sql);
|
42 |
+
}
|
43 |
+
|
44 |
+
$installer->endSetup();
|
app/code/local/Woomio/Tracker/sql/tracker_setup/upgrade-1.1.0-1.1.1.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function w_error_handler_110($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 |
+
$installer = $this;
|
8 |
+
$installer->startSetup();
|
9 |
+
|
10 |
+
//Check if data_key is already in config and that it is a number
|
11 |
+
$data_key = Mage::getStoreConfig('tracker/general/data_key');
|
12 |
+
if(is_numeric($data_key) === false) {
|
13 |
+
$sql = 'DROP TABLE IF EXISTS `'.$this->getTable('woomio').'`;';
|
14 |
+
$sql .= 'CREATE TABLE '.$this->getTable('woomio').'(orderid int not null auto_increment, wacsid varchar(100), primary key(orderid));';
|
15 |
+
|
16 |
+
$Email = Mage::getStoreConfig('trans_email/ident_general/email');
|
17 |
+
$Domain = Mage::getStoreConfig('web/unsecure/base_url');
|
18 |
+
$Lang = substr(Mage::getStoreConfig('general/locale/code'),0,2);
|
19 |
+
$Name = Mage::getStoreConfig('trans_email/ident_general/name');
|
20 |
+
|
21 |
+
$SetupCallbackUrl = 'https://www.woomio.com/endpoints/RetailerSignup?name=' . urlencode($Name) . '&domain=' . urlencode($Domain) . '&country=' . urlencode($Lang) . '&email=' . urlencode($Email) . '&platform=1';
|
22 |
+
|
23 |
+
//Ignore errors returned by the server
|
24 |
+
$context = stream_context_create(array(
|
25 |
+
'http' => array('ignore_errors' => true)
|
26 |
+
));
|
27 |
+
|
28 |
+
set_error_handler('w_error_handler_110');
|
29 |
+
$Response = @file_get_contents($SetupCallbackUrl, false, $context);
|
30 |
+
restore_error_handler();
|
31 |
+
|
32 |
+
if($Response !== false) {
|
33 |
+
$configModel = new Mage_Core_Model_Config();
|
34 |
+
//We save to default since the plugin can only be one in a multistore setup anyhow
|
35 |
+
$configModel->saveConfig('tracker/general/data_key', $Response, 'default', 0);
|
36 |
+
//Make sure cache gets updated with the new config
|
37 |
+
$configModel->reinit();
|
38 |
+
Mage::app()->reinitStores();
|
39 |
+
}
|
40 |
+
|
41 |
+
$installer->run($sql);
|
42 |
+
}
|
43 |
+
|
44 |
+
$installer->endSetup();
|
app/design/frontend/base/default/layout/tracker.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<layout version="1.1.
|
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.1">
|
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.1.
|
8 |
</Woomio_Tracker>
|
9 |
</modules>
|
10 |
</config>
|
4 |
<Woomio_Tracker>
|
5 |
<active>true</active>
|
6 |
<codePool>local</codePool>
|
7 |
+
<version>1.1.1</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.
|
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
|
|
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-07-
|
27 |
-
<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="
|
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.1</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-07-03</date>
|
27 |
+
<time>13:25:04</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="0c696686bbdb93560dc87679b4203937"/></dir><dir name="sql"><dir name="tracker_setup"><file name="install-1.1.1.php" hash="73b2f6ad8f3bb367fe08f643073849c0"/><file name="upgrade-1.0.10-1.1.1.php" hash="edf196555ee4bf6dec023f9b4f019afd"/><file name="upgrade-1.0.11-1.1.1.php" hash="84aea5e1fdf6fd604e6ab44289134c4d"/><file name="upgrade-1.0.12-1.1.1.php" hash="b2d4471ce37a76a2faf0abfe9a0fcbdf"/><file name="upgrade-1.1.0-1.1.1.php" hash="69a37f2d1c8532b65f61696b2eb500f1"/></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="2e2551c3a44c0663c9463820e2ba5cc3"/></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="4bb2f16ba96cc75294e894e6ef7c53c3"/></dir></target></contents>
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
31 |
</package>
|