RetentionScience_Waves - Version 2.1.5

Version Notes

Added store selection in config

Download this release

Release Info

Developer Magento Core Team
Extension RetentionScience_Waves
Version 2.1.5
Comparing to
See all releases


Code changes from version 2.1.4 to 2.1.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/Helper/Storeselect.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class RetentionScience_Waves_Helper_Storeselect {
4
+ public function toOptionArray()
5
+ {
6
+ $stores = Mage::app()->getStores();
7
+ $options = array(array('value' => null, 'label' => "Select a Store"));
8
+ foreach ($stores as $store_id => $store) {
9
+ array_push($options, array('value' => $store_id, 'label' => $store->getWebsite()->getName() . " - " . $store->getName()));
10
+ }
11
+ return $options;
12
+ }
13
+ }
app/code/community/RetentionScience/Waves/Model/Observer.php CHANGED
@@ -505,9 +505,15 @@ class RetentionScience_Waves_Model_Observer
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
  }
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
+
509
+ $store_id = Mage::getStoreConfig('waves/retentionscience_settings/store_id');
510
+ $valid_store_ids = array_keys(Mage::app()->getStores());
511
+
512
+ if (in_array($store_id, $valid_store_ids)) {
513
+ exec("$phpbin $sync_data_script $store_id > /dev/null &");
514
+ } else {
515
+ Mage::getSingleton('core/session')->addError("You must select a valid Store ID!");
516
+ }
517
  } else {
518
  Mage::getSingleton('core/session')->addError("You can't sync data unless Retention Science is enabled!");
519
  }
app/code/community/RetentionScience/Waves/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <RetentionScience_Waves>
5
- <version>2.1.4</version>
6
  </RetentionScience_Waves>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <RetentionScience_Waves>
5
+ <version>2.1.5</version>
6
  </RetentionScience_Waves>
7
  </modules>
8
  <global>
app/code/community/RetentionScience/Waves/etc/system.xml CHANGED
@@ -84,11 +84,21 @@
84
  <site_id translate="label">
85
  <label>Site ID</label>
86
  <frontend_type>text</frontend_type>
87
- <sort_order>30</sort_order>
88
  <show_in_default>1</show_in_default>
89
  <show_in_website>1</show_in_website>
90
  <show_in_store>1</show_in_store>
91
  </site_id>
 
 
 
 
 
 
 
 
 
 
92
  </fields>
93
  </retentionscience_settings>
94
 
84
  <site_id translate="label">
85
  <label>Site ID</label>
86
  <frontend_type>text</frontend_type>
87
+ <sort_order>25</sort_order>
88
  <show_in_default>1</show_in_default>
89
  <show_in_website>1</show_in_website>
90
  <show_in_store>1</show_in_store>
91
  </site_id>
92
+
93
+ <store_id translate="label">
94
+ <label>Store</label>
95
+ <frontend_type>select</frontend_type>
96
+ <source_model>RetentionScience_Waves_Helper_Storeselect</source_model>
97
+ <sort_order>30</sort_order>
98
+ <show_in_default>1</show_in_default>
99
+ <show_in_website>1</show_in_website>
100
+ <show_in_store>1</show_in_store>
101
+ </store_id>
102
  </fields>
103
  </retentionscience_settings>
104
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>RetentionScience_Waves</name>
4
- <version>2.1.4</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,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. &#xD;
17
  &#xD;
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>Minor bug fix</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>22:40:13</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"/><file name=".DS_Store" hash="9d0f8114c9a54f73944ba316a2c47467"/></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="059b40a9f24ba8991caedf65fa762ea8"/><file name="system.xml" hash="05cb4a30064730fa982fbe8307e7926b"/></dir><file name=".DS_Store" hash="a6f34ab378b9fd006734d37a270e82f1"/></dir><file name=".DS_Store" hash="128e595394427daa0503e6d824d6b4ef"/></dir></target><target name="mageweb"><dir name="js"><dir name="RetentionScience"><file name="retention_science_wave.js" hash="2a2584125f96c48c061a6fed5d1e0653"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>RetentionScience_Waves</name>
4
+ <version>2.1.5</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. &#xD;
17
  &#xD;
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>Added store selection in config</notes>
20
  <authors><author><name>Retention Science</name><user>auto-converted</user><email>support@retentionscience.com</email></author></authors>
21
+ <date>2013-02-16</date>
22
+ <time>03:48:33</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"/><file name="Storeselect.php" hash="dbfeb7a4e9e1f5c52fdbc2eac9370fcf"/></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="7000c831bcb7fac68a7d422954268978"/><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="3bb8d0eeee043af07dca4f5adede2858"/><file name="system.xml" hash="d5eaf4f8ac236c6f46109f5a9a8bac4c"/></dir></dir><file name=".DS_Store" hash="128e595394427daa0503e6d824d6b4ef"/></dir></target><target name="mageweb"><dir name="js"><dir name="RetentionScience"><file name="retention_science_wave.js" hash="2a2584125f96c48c061a6fed5d1e0653"/></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>