Version Notes
Saving state is handled via new connection
Download this release
Release Info
Developer | Magento Core Team |
Extension | RetentionScience_Waves |
Version | 2.1.3 |
Comparing to | |
See all releases |
Code changes from version 2.1.2 to 2.1.3
- app/code/community/RetentionScience/Waves/.DS_Store +0 -0
- app/code/community/RetentionScience/Waves/Block/.DS_Store +0 -0
- app/code/community/RetentionScience/Waves/Model/Observer.php +4 -2
- app/code/community/RetentionScience/Waves/Model/rs_get_save_config.php +29 -0
- app/code/community/RetentionScience/Waves/Model/rs_send_categories.php +28 -0
- app/code/community/RetentionScience/Waves/Model/rs_send_orders.php +1 -1
- app/code/community/RetentionScience/Waves/Model/rs_send_users.php +1 -1
- app/code/community/RetentionScience/Waves/Model/rs_sync_data.php +83 -51
- app/code/community/RetentionScience/Waves/etc/config.xml +2 -2
- app/design/frontend/base/default/template/waves/waves.phtml +7 -3
- package.xml +5 -5
app/code/community/RetentionScience/Waves/.DS_Store
DELETED
Binary file
|
app/code/community/RetentionScience/Waves/Block/.DS_Store
DELETED
Binary file
|
app/code/community/RetentionScience/Waves/Model/Observer.php
CHANGED
@@ -504,8 +504,10 @@ class RetentionScience_Waves_Model_Observer
|
|
504 |
public function syncData() {
|
505 |
if (Mage::getStoreConfig('waves/retentionscience_settings/enable') == 1) {
|
506 |
$phpbin = $this->getPhpBin();
|
507 |
-
$
|
508 |
-
|
|
|
|
|
509 |
} else {
|
510 |
Mage::getSingleton('core/session')->addError("You can't sync data unless Retention Science is enabled!");
|
511 |
}
|
504 |
public function syncData() {
|
505 |
if (Mage::getStoreConfig('waves/retentionscience_settings/enable') == 1) {
|
506 |
$phpbin = $this->getPhpBin();
|
507 |
+
$sync_data_script = escapeshellarg(dirname(__FILE__) . "/rs_sync_data.php");
|
508 |
+
$store_id = Mage::app()->getStore()->getCode();
|
509 |
+
|
510 |
+
exec("$phpbin $sync_data_script $store_id > /dev/null &");
|
511 |
} else {
|
512 |
Mage::getSingleton('core/session')->addError("You can't sync data unless Retention Science is enabled!");
|
513 |
}
|
app/code/community/RetentionScience/Waves/Model/rs_get_save_config.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
define('MAGENTO', realpath(dirname(__FILE__)));
|
3 |
+
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
4 |
+
// require_once '/Users/--/Sites/magento/app/Mage.php';
|
5 |
+
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
6 |
+
|
7 |
+
//umask(0);
|
8 |
+
$store_id = $argv[1];
|
9 |
+
$get_save = $argv[2];
|
10 |
+
$key = $argv[3];
|
11 |
+
|
12 |
+
try {
|
13 |
+
Mage::app()->setCurrentStore($store_id);
|
14 |
+
|
15 |
+
$result = '';
|
16 |
+
if ($get_save == 'GET'){
|
17 |
+
$result = Mage::getStoreConfig($key);
|
18 |
+
} else if ($get_save == 'SAVE'){
|
19 |
+
$val = $argv[4];
|
20 |
+
|
21 |
+
$result = Mage::getModel('core/config')->saveConfig($key, $val);
|
22 |
+
}
|
23 |
+
echo $result;
|
24 |
+
die(0);
|
25 |
+
} catch (Exception $e){
|
26 |
+
Mage::logException($e);
|
27 |
+
die(1);
|
28 |
+
}
|
29 |
+
|
app/code/community/RetentionScience/Waves/Model/rs_send_categories.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
define('MAGENTO', realpath(dirname(__FILE__)));
|
3 |
+
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
4 |
+
// require_once '/Users/--/Sites/magento/app/Mage.php';
|
5 |
+
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
6 |
+
|
7 |
+
//umask(0);
|
8 |
+
$store_id = $argv[1];
|
9 |
+
$timestamp = $argv[2];
|
10 |
+
|
11 |
+
try {
|
12 |
+
Mage::app()->setCurrentStore($store_id);
|
13 |
+
$observer = new RetentionScience_Waves_Model_Observer();
|
14 |
+
$categorytree = Mage::getModel('waves/source_categorytree')->getAllOptions();
|
15 |
+
|
16 |
+
foreach($categorytree as $category){
|
17 |
+
$parentId = ($category->getParentId())?$category->getParentId():null;
|
18 |
+
$categoryId = $category->getEntityId();
|
19 |
+
$categoryName = $category->getName();
|
20 |
+
$categoryDescription = $category->getDescripton();
|
21 |
+
$category_array = array('name' => $categoryName, 'description' => $categoryDescription, 'parent_record_id' => $parentId);
|
22 |
+
$observer->writeBulkUploadFile(array($categoryId => $category_array), 'categories', $timestamp);
|
23 |
+
}
|
24 |
+
die(0);
|
25 |
+
} catch (Exception $e){
|
26 |
+
Mage::logException($e);
|
27 |
+
die(1);
|
28 |
+
}
|
app/code/community/RetentionScience/Waves/Model/rs_send_orders.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
define('MAGENTO', realpath(dirname(__FILE__)));
|
4 |
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
5 |
-
// require_once '/Users
|
6 |
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
7 |
|
8 |
|
2 |
|
3 |
define('MAGENTO', realpath(dirname(__FILE__)));
|
4 |
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
5 |
+
// require_once '/Users/-/Sites/magento/app/Mage.php';
|
6 |
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
7 |
|
8 |
|
app/code/community/RetentionScience/Waves/Model/rs_send_users.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
define('MAGENTO', realpath(dirname(__FILE__)));
|
4 |
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
5 |
-
// require_once '/Users
|
6 |
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
7 |
|
8 |
|
2 |
|
3 |
define('MAGENTO', realpath(dirname(__FILE__)));
|
4 |
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
5 |
+
// require_once '/Users/-/Sites/magento/app/Mage.php';
|
6 |
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
7 |
|
8 |
|
app/code/community/RetentionScience/Waves/Model/rs_sync_data.php
CHANGED
@@ -3,49 +3,94 @@
|
|
3 |
define('MAGENTO', dirname(__FILE__));
|
4 |
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
5 |
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
6 |
-
// require_once '/Users
|
7 |
|
8 |
$last_processed_order_record_id;
|
9 |
$last_processed_user_entity_id;
|
10 |
$last_processed_product_entity_id;
|
11 |
|
12 |
-
$phpBin = Mage::getStoreConfig('waves/rs_sync_advanced/rs_php_bin');
|
13 |
-
$sendBulkUpload = true;
|
14 |
-
$useBulkCompression = true;
|
15 |
-
$useExec = false;
|
16 |
-
$removeFileAfterSend = false;
|
17 |
-
$logToFile = false;
|
18 |
-
$elementsPerPage = 2000;
|
19 |
-
$apiClient;
|
20 |
$timestamp = date("YmdHis");
|
21 |
-
$store_id =
|
22 |
$observer = new RetentionScience_Waves_Model_Observer();
|
|
|
|
|
23 |
|
24 |
// Scripts
|
25 |
$send_orders_script = escapeshellarg(dirname(__FILE__) . "/rs_send_orders.php");
|
26 |
$send_products_script = escapeshellarg(dirname(__FILE__) . "/rs_send_products.php");
|
27 |
$send_users_script = escapeshellarg(dirname(__FILE__) . "/rs_send_users.php");
|
|
|
|
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
if(stristr($syncDataStatus, "running")){
|
31 |
// Already running
|
32 |
die(1);
|
33 |
}
|
34 |
|
35 |
-
//
|
36 |
-
try{
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
40 |
$orderCollection = Mage::getModel('sales/order')->getCollection();
|
41 |
if($last_order_record_id>0){
|
42 |
$orderCollection->addFieldToFilter('entity_id', array('gt' => $last_order_record_id));
|
43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
# this will be updated as we iterate
|
46 |
$last_processed_order_record_id = $last_order_record_id;
|
47 |
-
|
48 |
-
$num_orders_to_send = $orderCollection->getSize(); // Don't use count()
|
49 |
$pages = ceil($num_orders_to_send / $elementsPerPage);
|
50 |
$page_counter = 1;
|
51 |
|
@@ -65,23 +110,14 @@ try{
|
|
65 |
|
66 |
} catch(Exception $e) {
|
67 |
Mage::logException($e);
|
68 |
-
|
69 |
}
|
70 |
|
71 |
// Export Users
|
72 |
try {
|
73 |
-
|
74 |
|
75 |
-
$last_user_record_id = (int) Mage::getStoreConfig('waves/rs_sync_advanced/last_user_record_id');
|
76 |
-
$userCollection = Mage::getModel('customer/customer')
|
77 |
-
->getCollection()
|
78 |
-
->addAttributeToSelect('name')
|
79 |
-
->addAttributeToSelect('*');
|
80 |
-
if($last_user_record_id>0){
|
81 |
-
$userCollection->addFieldToFilter('entity_id', array('gt' => $last_user_record_id));
|
82 |
-
}
|
83 |
|
84 |
-
$num_users_to_send = $userCollection->getSize(); // Don't use count()
|
85 |
$pages = ceil($num_users_to_send / $elementsPerPage);
|
86 |
$page_counter = 1;
|
87 |
|
@@ -100,16 +136,13 @@ try {
|
|
100 |
}
|
101 |
} catch (Exception $e){
|
102 |
Mage::logException($e);
|
103 |
-
|
104 |
}
|
105 |
|
106 |
// Export Products
|
107 |
try{
|
108 |
-
|
109 |
|
110 |
-
$productCollection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
|
111 |
-
|
112 |
-
$num_products_to_send = $productCollection->getSize();
|
113 |
$pages = ceil($num_products_to_send / $elementsPerPage);
|
114 |
$page_counter = 1;
|
115 |
|
@@ -126,26 +159,25 @@ try{
|
|
126 |
}
|
127 |
} catch (Exception $e){
|
128 |
Mage::logException($e);
|
129 |
-
|
130 |
}
|
131 |
|
132 |
// Export Categories
|
133 |
try {
|
134 |
-
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
$
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
}
|
146 |
} catch (Exception $e) {
|
147 |
Mage::logException($e);
|
148 |
-
|
149 |
}
|
150 |
|
151 |
// Send to rsapi
|
@@ -153,10 +185,10 @@ try {
|
|
153 |
$observer->sendDataSyncFiles($timestamp);
|
154 |
} catch (Exception $e) {
|
155 |
Mage::logException($e);
|
156 |
-
|
157 |
}
|
158 |
|
159 |
// Update last exported IDs and status
|
160 |
-
|
161 |
-
|
162 |
-
|
3 |
define('MAGENTO', dirname(__FILE__));
|
4 |
require_once MAGENTO . '/../../../../../../app/Mage.php';
|
5 |
// require_once '/Applications/MAMP/htdocs/magento/app/Mage.php';
|
6 |
+
// require_once '/Users/-/Sites/magento/app/Mage.php';
|
7 |
|
8 |
$last_processed_order_record_id;
|
9 |
$last_processed_user_entity_id;
|
10 |
$last_processed_product_entity_id;
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
$timestamp = date("YmdHis");
|
13 |
+
$store_id = $argv[1];
|
14 |
$observer = new RetentionScience_Waves_Model_Observer();
|
15 |
+
$phpBin = $observer->getPhpBin();
|
16 |
+
$elementsPerPage = $observer->elementsPerPage();
|
17 |
|
18 |
// Scripts
|
19 |
$send_orders_script = escapeshellarg(dirname(__FILE__) . "/rs_send_orders.php");
|
20 |
$send_products_script = escapeshellarg(dirname(__FILE__) . "/rs_send_products.php");
|
21 |
$send_users_script = escapeshellarg(dirname(__FILE__) . "/rs_send_users.php");
|
22 |
+
$rs_send_categories_script = escapeshellarg(dirname(__FILE__) . "/rs_send_categories.php");
|
23 |
+
$get_save_config_script = escapeshellarg(dirname(__FILE__) . "/rs_get_save_config.php");
|
24 |
|
25 |
+
// get / save Config
|
26 |
+
function getStoreConfig($key) {
|
27 |
+
global $phpBin;
|
28 |
+
global $get_save_config_script;
|
29 |
+
global $store_id;
|
30 |
+
$output = array();
|
31 |
+
$return_val = null;
|
32 |
+
$cmd = "$phpBin $get_save_config_script $store_id GET '" . $key . "'";
|
33 |
+
exec($cmd, $output, $return_val);
|
34 |
+
return $output[0];
|
35 |
+
}
|
36 |
+
|
37 |
+
function saveStoreConfig($key, $val) {
|
38 |
+
global $phpBin;
|
39 |
+
global $get_save_config_script;
|
40 |
+
global $store_id;
|
41 |
+
$output = array();
|
42 |
+
$return_val = null;
|
43 |
+
$cmd = "$phpBin $get_save_config_script $store_id SAVE '" . $key . "' '" . $val . "'";
|
44 |
+
exec($cmd, $output, $return_val);
|
45 |
+
return $output[0];
|
46 |
+
}
|
47 |
+
|
48 |
+
$syncDataStatus = getStoreConfig('waves/rs_sync_settings/sync_data_status');
|
49 |
if(stristr($syncDataStatus, "running")){
|
50 |
// Already running
|
51 |
die(1);
|
52 |
}
|
53 |
|
54 |
+
// Perform all counts up front, so we don't need to make any further MySQL connections in this script
|
55 |
+
try {
|
56 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[running] Calculating counts at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
57 |
+
|
58 |
+
// Count Orders
|
59 |
+
$last_order_record_id = (int) getStoreConfig('waves/rs_sync_advanced/last_order_record_id');
|
60 |
$orderCollection = Mage::getModel('sales/order')->getCollection();
|
61 |
if($last_order_record_id>0){
|
62 |
$orderCollection->addFieldToFilter('entity_id', array('gt' => $last_order_record_id));
|
63 |
}
|
64 |
+
$num_orders_to_send = $orderCollection->getSize(); // Don't use count()
|
65 |
+
|
66 |
+
// Count Users
|
67 |
+
$last_user_record_id = (int) getStoreConfig('waves/rs_sync_advanced/last_user_record_id');
|
68 |
+
$userCollection = Mage::getModel('customer/customer')
|
69 |
+
->getCollection()
|
70 |
+
->addAttributeToSelect('name')
|
71 |
+
->addAttributeToSelect('*');
|
72 |
+
if($last_user_record_id>0){
|
73 |
+
$userCollection->addFieldToFilter('entity_id', array('gt' => $last_user_record_id));
|
74 |
+
}
|
75 |
+
$num_users_to_send = $userCollection->getSize(); // Don't use count()
|
76 |
+
|
77 |
+
// Count Products
|
78 |
+
$productCollection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
|
79 |
+
$num_products_to_send = $productCollection->getSize();
|
80 |
+
|
81 |
+
|
82 |
+
} catch(Exception $e) {
|
83 |
+
Mage::logException($e);
|
84 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[stopped] error performing counts at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
85 |
+
}
|
86 |
+
|
87 |
+
// Export Orders
|
88 |
+
try{
|
89 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[running] exporting orders - last updated at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
90 |
|
91 |
# this will be updated as we iterate
|
92 |
$last_processed_order_record_id = $last_order_record_id;
|
93 |
+
|
|
|
94 |
$pages = ceil($num_orders_to_send / $elementsPerPage);
|
95 |
$page_counter = 1;
|
96 |
|
110 |
|
111 |
} catch(Exception $e) {
|
112 |
Mage::logException($e);
|
113 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[stopped] error on orders at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
114 |
}
|
115 |
|
116 |
// Export Users
|
117 |
try {
|
118 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[running] exporting users - last updated at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
|
|
121 |
$pages = ceil($num_users_to_send / $elementsPerPage);
|
122 |
$page_counter = 1;
|
123 |
|
136 |
}
|
137 |
} catch (Exception $e){
|
138 |
Mage::logException($e);
|
139 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[stopped] error on users at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
140 |
}
|
141 |
|
142 |
// Export Products
|
143 |
try{
|
144 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[running] exporting products - last updated at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
145 |
|
|
|
|
|
|
|
146 |
$pages = ceil($num_products_to_send / $elementsPerPage);
|
147 |
$page_counter = 1;
|
148 |
|
159 |
}
|
160 |
} catch (Exception $e){
|
161 |
Mage::logException($e);
|
162 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[stopped] error on products at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
163 |
}
|
164 |
|
165 |
// Export Categories
|
166 |
try {
|
167 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[running] exporting categories - last updated at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
168 |
|
169 |
+
$output = array();
|
170 |
+
$return_val = null;
|
171 |
+
$cmd = "$phpBin $rs_send_categories_script $store_id $timestamp";
|
172 |
+
exec($cmd, $output, $return_val);
|
173 |
+
if ($return_val != 0){
|
174 |
+
var_dump($output);
|
175 |
+
throw new Exception('Send categories script returned with non-zero return code.');
|
176 |
+
}
|
177 |
+
|
|
|
178 |
} catch (Exception $e) {
|
179 |
Mage::logException($e);
|
180 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[stopped] error on categories at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())) );
|
181 |
}
|
182 |
|
183 |
// Send to rsapi
|
185 |
$observer->sendDataSyncFiles($timestamp);
|
186 |
} catch (Exception $e) {
|
187 |
Mage::logException($e);
|
188 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[stopped] error on upload at: ' . date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())) );
|
189 |
}
|
190 |
|
191 |
// Update last exported IDs and status
|
192 |
+
saveStoreConfig('waves/rs_sync_advanced/last_order_record_id', $last_processed_order_record_id);
|
193 |
+
saveStoreConfig('waves/rs_sync_advanced/last_user_record_id', $last_processed_user_record_id);
|
194 |
+
saveStoreConfig('waves/rs_sync_settings/sync_data_status', '[stopped] last run at: '. date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
app/code/community/RetentionScience/Waves/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<RetentionScience_Waves>
|
5 |
-
<version>2.1.
|
6 |
</RetentionScience_Waves>
|
7 |
</modules>
|
8 |
<global>
|
@@ -99,4 +99,4 @@
|
|
99 |
</core_block_abstract_to_html_after>
|
100 |
</events>
|
101 |
</adminhtml>
|
102 |
-
</config>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<RetentionScience_Waves>
|
5 |
+
<version>2.1.3</version>
|
6 |
</RetentionScience_Waves>
|
7 |
</modules>
|
8 |
<global>
|
99 |
</core_block_abstract_to_html_after>
|
100 |
</events>
|
101 |
</adminhtml>
|
102 |
+
</config>
|
app/design/frontend/base/default/template/waves/waves.phtml
CHANGED
@@ -7,6 +7,10 @@ $status = $this->isEnable();
|
|
7 |
$actionName = $this->getRequest()->getActionName();
|
8 |
|
9 |
?>
|
|
|
|
|
|
|
|
|
10 |
<script type='text/javascript'> (function() { var iBx = document.createElement('script'); iBx.type = 'text/javascript'; iBx.async =
|
11 |
true; iBx.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'waves.retentionscience.com/w.js';
|
12 |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(iBx); })();
|
@@ -24,8 +28,7 @@ $status = $this->isEnable();
|
|
24 |
?>
|
25 |
rsci_wave.add_item(<?php echo json_encode($productId)?>);
|
26 |
<?php }
|
27 |
-
|
28 |
-
if($moduleName=="checkout" && $controllerName=="cart" && $actionName=="index"){ ?>
|
29 |
rsci_wave.set_action('shopping_cart');
|
30 |
// has 1 or more items in shopping cart
|
31 |
<?php
|
@@ -39,7 +42,8 @@ $status = $this->isEnable();
|
|
39 |
<?php }
|
40 |
}
|
41 |
|
42 |
-
|
|
|
43 |
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
44 |
$order = $this->getOrder(); ?>
|
45 |
|
7 |
$actionName = $this->getRequest()->getActionName();
|
8 |
|
9 |
?>
|
10 |
+
<!-- lmca <?php echo $loggedIn ?> | <?php echo $moduleName ?> | <?php echo $controllerName ?> | <?php echo $actionName ?> -->
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
<script type='text/javascript'> (function() { var iBx = document.createElement('script'); iBx.type = 'text/javascript'; iBx.async =
|
15 |
true; iBx.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'waves.retentionscience.com/w.js';
|
16 |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(iBx); })();
|
28 |
?>
|
29 |
rsci_wave.add_item(<?php echo json_encode($productId)?>);
|
30 |
<?php }
|
31 |
+
if(($moduleName=="checkout" && $controllerName=="cart" && $actionName=="index") || ($moduleName=="rangepricing" && $controllerName=="checkout_cart" && $actionName=="index" ) ){ ?>
|
|
|
32 |
rsci_wave.set_action('shopping_cart');
|
33 |
// has 1 or more items in shopping cart
|
34 |
<?php
|
42 |
<?php }
|
43 |
}
|
44 |
|
45 |
+
|
46 |
+
if(($moduleName=="checkout" && $controllerName=="onepage" && $actionName=="success") || ($moduleName=="onestepcheckout" && $controllerName=="index" && $actionName=="success")){
|
47 |
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
48 |
$order = $this->getOrder(); ?>
|
49 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>RetentionScience_Waves</name>
|
4 |
-
<version>2.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License 2.0</license>
|
7 |
<channel>community</channel>
|
@@ -16,11 +16,11 @@ We leverage big data analytics and machine learning to optimize retention strate
|
|
16 |
Our technology enables your store to leverage massive social media, demographic, and behavioral datasets - powerful information sources to help you drive sales. 
|
17 |

|
18 |
Notes: This extension interfaces with Retention Science, and communicates through the Retention Science API. For more information, and to sign up for API access, please see http://retentionscience.com.</description>
|
19 |
-
<notes>
|
20 |
<authors><author><name>Retention Science</name><user>auto-converted</user><email>support@retentionscience.com</email></author></authors>
|
21 |
-
<date>2013-02-
|
22 |
-
<time>
|
23 |
-
<contents><target name="magecommunity"><dir name="RetentionScience"><dir name="Waves"><dir name="Block"><dir name="Adminhtml"><file name="Rscore.php" hash="93919181411e46af838c6cfb872d3f31"/><file name="Syncbutton.php" hash="7cd56fdacd5c9da7e126ab059f568ab2"/></dir><file name="Waves.php" hash="a2c0c64d0dbbb9d458f6d0a8ec854f75"
|
24 |
<compatible/>
|
25 |
<dependencies/>
|
26 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>RetentionScience_Waves</name>
|
4 |
+
<version>2.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License 2.0</license>
|
7 |
<channel>community</channel>
|
16 |
Our technology enables your store to leverage massive social media, demographic, and behavioral datasets - powerful information sources to help you drive sales. 
|
17 |

|
18 |
Notes: This extension interfaces with Retention Science, and communicates through the Retention Science API. For more information, and to sign up for API access, please see http://retentionscience.com.</description>
|
19 |
+
<notes>Saving state is handled via new connection</notes>
|
20 |
<authors><author><name>Retention Science</name><user>auto-converted</user><email>support@retentionscience.com</email></author></authors>
|
21 |
+
<date>2013-02-13</date>
|
22 |
+
<time>03:25:19</time>
|
23 |
+
<contents><target name="magecommunity"><dir name="RetentionScience"><dir name="Waves"><dir name="Block"><dir name="Adminhtml"><file name="Rscore.php" hash="93919181411e46af838c6cfb872d3f31"/><file name="Syncbutton.php" hash="7cd56fdacd5c9da7e126ab059f568ab2"/></dir><file name="Waves.php" hash="a2c0c64d0dbbb9d458f6d0a8ec854f75"/></dir><dir name="Helper"><file name="Data.php" hash="90490af254a670d4795b744c1ef4319e"/></dir><dir name="Model"><dir name="Source"><dir name="Cron"><file name="Frequency.php" hash="027feb7796f79b7cf811c4236ad7b87a"/><file name="Hours.php" hash="0ab9157003d5e7efed402ed401a46134"/></dir><file name="Categorytree.php" hash="58ca152ea2a34c7992460ece01b12bd8"/><file name="Cronconfig.php" hash="d8ae966b08bad48e68618343f7a27569"/><file name="Rscoredata.php" hash="a60f52a76b6097cdc0fb64e7218939dc"/></dir><file name="Observer.php" hash="dc37f925488d5c9aa25fe8e9c49c52e5"/><file name="retention_science_api.php" hash="37f1fecd276c1e5290e94c2fa50e0931"/><file name="rs_get_save_config.php" hash="853c8dcea094437bfa4143c85727037b"/><file name="rs_send_categories.php" hash="ade0f294be0ac6bf064432716014a83a"/><file name="rs_send_orders.php" hash="f985a357e74fc7977fd74252a31f5a73"/><file name="rs_send_products.php" hash="365385b0245e30b50020c0810caa8f08"/><file name="rs_send_users.php" hash="78b93a344e67493dec5f76b0ce42a31e"/><file name="rs_sync_data.php" hash="81845fa42ad0d9cc2be6e5235c286e27"/></dir><dir name="controllers"><file name="AdminController.php" hash="69a9da4bcd7e607569bb73429dfc500a"/><file name="IndexController.php" hash="e59004d457861772704554903b90566f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1378650fdb7ecc596f9881d7eefca868"/><file name="config.xml" hash="3ccb5d6e92a3c21f7e3a9b5cddb339d1"/><file name="system.xml" hash="05cb4a30064730fa982fbe8307e7926b"/></dir></dir><file name=".DS_Store" hash="128e595394427daa0503e6d824d6b4ef"/></dir></target><target name="mageweb"><dir name="js"><dir name="RetentionScience"><dir name="RetentionScience"><file name="retention_science_wave.js" hash="2a2584125f96c48c061a6fed5d1e0653"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="waves.xml" hash="7f62bec7d87da48c0e554fc1cf3a9802"/></dir><dir name="template"><dir name="waves"><file name="waves.phtml" hash="344da482b414ab5722c4a8c29b9ec6de"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="waves"><file name="rscore.phtml" hash="4f6af3dd918b23a009bb559e12f23c05"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RetentionScience_Waves.xml" hash="9dc27ff12e5834f576b22a72a60d02e7"/></dir></target></contents>
|
24 |
<compatible/>
|
25 |
<dependencies/>
|
26 |
</package>
|