Favizone_Recommender - Version 1.0.4

Version Notes

*update product data tracking process

Download this release

Release Info

Developer Favizone
Extension Favizone_Recommender
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Favizone/Recommender/Helper/Common.php CHANGED
@@ -311,4 +311,24 @@ class Favizone_Recommender_Helper_Common extends Mage_Core_Helper_Abstract
311
  $sender->postRequest($data->getEndABTestUrl(), $data_to_send);
312
 
313
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
  }
311
  $sender->postRequest($data->getEndABTestUrl(), $data_to_send);
312
 
313
  }
314
+
315
+
316
+ /**
317
+ * reset extension's data for the given shop
318
+ *
319
+ * @param $store_id
320
+ * @return Array() the categories list
321
+ */
322
+ public function resetData(){
323
+ $transaction = Mage::getSingleton('core/resource')->getConnection('core_write');
324
+ try {
325
+ $transaction->beginTransaction();
326
+
327
+ $transaction->query('DELETE FROM favizone_recommender_access_key');
328
+
329
+ $transaction->commit();
330
+ } catch (Exception $e) {
331
+ $transaction->rollBack(); // if anything goes wrong, this will undo all changes you made to your database
332
+ }
333
+ }
334
  }
app/code/community/Favizone/Recommender/Model/Meta/Product.php CHANGED
@@ -363,10 +363,10 @@ class Favizone_Recommender_Model_Meta_Product extends Mage_Core_Model_Abstract{
363
  $groupPrices = $product->getData('group_price');
364
 
365
  if (is_null($groupPrices)) {
366
- $attribute = $ProductObject->getResource()->getAttribute('group_price');
367
  if ($attribute){
368
- $attribute->getBackend()->afterLoad($ProductObject);
369
- $groupPrices = $ProductObject->getData('group_price');
370
  }
371
  }
372
 
363
  $groupPrices = $product->getData('group_price');
364
 
365
  if (is_null($groupPrices)) {
366
+ $attribute = $product->getResource()->getAttribute('group_price');
367
  if ($attribute){
368
+ $attribute->getBackend()->afterLoad($product);
369
+ $groupPrices = $product->getData('group_price');
370
  }
371
  }
372
 
app/code/community/Favizone/Recommender/controllers/Adminhtml/FavizoneController.php CHANGED
@@ -132,6 +132,22 @@ class Favizone_Recommender_Adminhtml_FavizoneController extends Mage_Adminhtml_C
132
  }
133
  $this->getResponse()->setBody(json_encode($responseData));
134
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  /**
136
  * Returns the currently selected store view identifier.
137
  *
132
  }
133
  $this->getResponse()->setBody(json_encode($responseData));
134
  }
135
+
136
+ /**
137
+ * Reset data
138
+ */
139
+ public function resetDataAction(){
140
+ $this->getResponse()->setHeader('Content-type', 'application/json');
141
+ $store = Favizone_Recommender_Block_Common::getSelectedStore();
142
+ Mage::helper('favizone_recommender/common')->resetData();
143
+ //Preparing response
144
+ $responseData = array(
145
+
146
+ 'success' => true,
147
+ );
148
+ $this->getResponse()->setBody(json_encode($responseData));
149
+ }
150
+
151
  /**
152
  * Returns the currently selected store view identifier.
153
  *
app/code/community/Favizone/Recommender/etc/config.xml CHANGED
@@ -26,7 +26,7 @@
26
  names, with directory separators replaced by underscores
27
  -->
28
  <Favizone_Recommender>
29
- <version>1.0.3</version>
30
  </Favizone_Recommender>
31
  </modules>
32
  <global>
26
  names, with directory separators replaced by underscores
27
  -->
28
  <Favizone_Recommender>
29
+ <version>1.0.4</version>
30
  </Favizone_Recommender>
31
  </modules>
32
  <global>
app/design/adminhtml/default/default/template/favizonerecommender/adminconfig.phtml CHANGED
@@ -7,6 +7,9 @@
7
  <?php echo $this->getChildHtml('store_switcher'); ?>
8
  <?php endif;?>
9
  <div class="container-fluid">
 
 
 
10
  <?php if ($this->isAccessKeyLoaded() ): ?>
11
  <div class="row">
12
  <div class="panel panel-default">
@@ -19,7 +22,7 @@
19
  <div class="login-block">
20
  <a target="_blank" href="http://www.favizone.com/support" class="pull-right">
21
  <i class="fa fa-question-circle" ></i> <?php echo $this->__('Help');?>
22
- </a>
23
  <img class="img-logo" src="<?php echo $this->getSkinUrl('images/favizone/logo-favizone.png')?>">
24
  <div id="favizone_success_update" class="alert alert-success hide" role="alert">
25
  <?php echo $this->__('Data successfully updated.');?>
@@ -176,3 +179,11 @@
176
  </div>
177
  <?php endif;?>
178
  </div>
 
 
 
 
 
 
 
 
7
  <?php echo $this->getChildHtml('store_switcher'); ?>
8
  <?php endif;?>
9
  <div class="container-fluid">
10
+ <a style="color:#00aff0 !important" href="#" onclick="confirmWindow()" class="pull-right">
11
+ <i class="fa fa-refresh" ></i> <?php echo $this->__("Reset Favizone extension data");?>
12
+ </a><br>
13
  <?php if ($this->isAccessKeyLoaded() ): ?>
14
  <div class="row">
15
  <div class="panel panel-default">
22
  <div class="login-block">
23
  <a target="_blank" href="http://www.favizone.com/support" class="pull-right">
24
  <i class="fa fa-question-circle" ></i> <?php echo $this->__('Help');?>
25
+ </a>
26
  <img class="img-logo" src="<?php echo $this->getSkinUrl('images/favizone/logo-favizone.png')?>">
27
  <div id="favizone_success_update" class="alert alert-success hide" role="alert">
28
  <?php echo $this->__('Data successfully updated.');?>
179
  </div>
180
  <?php endif;?>
181
  </div>
182
+ <script type="text/javascript">
183
+ function confirmWindow() {
184
+ var url = "<?php echo $this->getUrl('*/*/resetData', array('isAjax' => true))?>";
185
+ if (confirm("<?php echo $this->__('This will remove all Favizone extension config data!');?>") == true) {
186
+ sendResetRequest(url);
187
+ }
188
+ }
189
+ </script>
app/design/frontend/base/default/template/favizonerecommender/renderer.phtml CHANGED
@@ -34,4 +34,4 @@
34
  }
35
 
36
  </script>
37
- <?php endif;?>
34
  }
35
 
36
  </script>
37
+ <?php endif;?>
app/locale/fr_FR/Favizone_Recommender.csv CHANGED
@@ -26,4 +26,6 @@
26
  "Error! Please refresh the the page and try again","Une erreur est produite! Veuillez rafraichir la page et essayez de nouveau"
27
  "You can contact our support for any information :","Vous pouvez contacter notre support pour toute information : "
28
  "Help","Aide"
29
- "Help to getting stared","Aide pour commencer"
 
 
26
  "Error! Please refresh the the page and try again","Une erreur est produite! Veuillez rafraichir la page et essayez de nouveau"
27
  "You can contact our support for any information :","Vous pouvez contacter notre support pour toute information : "
28
  "Help","Aide"
29
+ "Help to getting stared","Aide pour commencer"
30
+ "Reset Favizone extension data","Réinitialiser les données de l'extention Favizone"
31
+ "This will remove all Favizone extension config data!","Cette action va rénitialiser toutes des données de configuration de votre extention Favizone!"
js/favizone/internal-sender.js CHANGED
@@ -83,3 +83,22 @@ setVisibleElements = function(indicator , callStep){
83
  }
84
  }
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
  }
85
 
86
+ sendResetRequest = function(url){
87
+ try {
88
+
89
+ new Ajax.Request(url, {
90
+ method: "post",
91
+ parameters: "test=1",
92
+ onSuccess: function(response) {
93
+ window.location.reload();
94
+ }
95
+ });
96
+ return false;
97
+ }
98
+ catch(err) {
99
+
100
+ console.log(err);
101
+ return false;
102
+ }
103
+ }
104
+
package.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Favizone_Recommender</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Favizone</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Personalization for Magento</summary>
10
  <description>FavizonIncrease your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.e_Recommender</description>
11
- <notes>* Tracking product's description and short description.&#xD;
12
- * Tracking customer's first name &amp; last name</notes>
13
  <authors><author><name>Favizone</name><user>favizone</user><email>contact@favizone.com</email></author></authors>
14
- <date>2016-08-31</date>
15
- <time>08:46:22</time>
16
- <contents><target name="mageetc"><dir name="modules"><file name="Favizone_Recommender.xml" hash="7457b857a4a6fb30905081c9c87fee60"/></dir></target><target name="magecommunity"><dir name="Favizone"><dir name="Recommender"><dir name="Block"><dir name="Adminhtml"><file name="AdminConfig.php" hash="6c6b1589892a4c6b563de6fdeeece7fd"/></dir><file name="Common.php" hash="e53f8700fcf0fde9353a571d71272547"/><file name="Custom.php" hash="b904e161cc0100d7518f09bec7cf04ac"/><file name="Renderer.php" hash="6e97d9d908b47e7f59b288b35fe3d18d"/><file name="Tracker.php" hash="6323d4c56f5a5619c3488ea5f53fa022"/></dir><dir name="Helper"><file name="Account.php" hash="62eda9b2b7bb7db618e117d9ba002b7b"/><file name="Category.php" hash="930e778211cfd1a0bc53677e1b938ac1"/><file name="Common.php" hash="a63fc4200ba3f3293f7ba601b80dfb1d"/><file name="Customer.php" hash="d964c01b0feee83dd279115deaa8b209"/><file name="Data.php" hash="a191304d6e1eab96cc452873ab7b4b75"/><file name="Order.php" hash="d4023b65bf902b7ef202b91b7d0629e7"/><file name="Product.php" hash="7dde25dcb6bc03ed86c8c5786cafdc9e"/><file name="Sender.php" hash="24f9459a7eefcaa5f3a13e90f932dab2"/></dir><dir name="Model"><file name="AccessKey.php" hash="c0fabf3617b346543bcca6f36fe98e1a"/><dir name="Meta"><file name="Customer.php" hash="de62cf990ba2d3b1e83759919f6f9cfc"/><file name="Order.php" hash="9ebb1a57b41bee5db8c3463f241d872f"/><file name="Product.php" hash="3d81876977cded525ba79bffa5e42df4"/></dir><file name="Observer.php" hash="52a0fda50fe6425a417bfee83b0bb489"/><file name="Product.php" hash="728a1739e56c9b98ffbe5f94b27a2593"/><dir name="Resource"><dir name="AccessKey"><file name="Collection.php" hash="5255134124dc54701b4942cc0c29f018"/></dir><file name="AccessKey.php" hash="5e4d06afae4261e6f7e1da929a3c4d09"/><file name="Setup.php" hash="5e0685b4baad75a3e84223fad4c1e3b9"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FavizoneController.php" hash="af48ec32e3fcb06b6ae49b3cebbebc9a"/></dir><file name="IndexController.php" hash="b0085fe71c5a1ef53204f71d58620200"/></dir><dir name="etc"><file name="adminhtml.xml" hash="abe94fe89c2635eae6b0c46c27601982"/><file name="config.xml" hash="97bc32fd766b0c661984b91cd9585b47"/></dir><dir name="sql"><dir name="favizone_recommender_setup"><file name="mysql4-install-1.0.0.php" hash="b2b0bf8d6a50ea30808e284fe6e6d956"/><file name="mysql4-upgrade-1.0.0-1.0.3.php" hash="13a8f4614e43b2a65f854e6c51ae3e04"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="favizone"><file name="admin-custom-style.css" hash="b536ff43d9ed54fe48711d2eee0a4d37"/><file name="font-awesome.min.css" hash="7aa7a0865ce6f38d0e854d3dd4623e3d"/><dir name="fonts"><file name="FontAwesome.otf" hash="87d8ca3ddc57e7d2da6226e480f90457"/><file name="fontawesome-webfont.eot" hash="32400f4e08932a94d8bfd2422702c446"/><file name="fontawesome-webfont.svg" hash="f775f9cca88e21d45bebe185b27c0e5b"/><file name="fontawesome-webfont.ttf" hash="a3de2170e4e9df77161ea5d3f31b2668"/><file name="fontawesome-webfont.woff" hash="a35720c2fed2c7f043bc7e4ffb45e073"/><file name="fontawesome-webfont.woff2" hash="db812d8a70a4e88e888744c1c9a27e89"/></dir></dir><dir name="images"><dir name="favizone"><file name="close.png" hash="8177fd73492c9b00de9d8e39ce518352"/><file name="logo-favizone.png" hash="f4ba18ee390b6080b5660a0102c817e8"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="favizone"><file name="favizone-auto-appender.js" hash="e9db10590a34a99366d7478ed5cced3b"/><file name="favizone-helper.js" hash="a35f3d8e84122e019fc9c6339ac0a1a8"/><file name="favizone-preview-manager.js" hash="d46fce8590ce8d270a3da2a1282ae964"/><file name="favizone-renderer.js" hash="86f672087f479cc113f66bc97227e3aa"/><file name="favizone-tracker.js" hash="dbd2e4d131911b41f220ff880e1df23c"/><file name="internal-sender.js" hash="0ad40bf1dacbe7d567b0a1cdc08d26ce"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="favizonerecommender.xml" hash="accc4ea6c5ec649f9c990508196399f5"/></dir><dir name="template"><dir name="favizonerecommender"><file name="adminconfig.phtml" hash="e8a5a0443c108ccf3fa8dfcbc62e40f1"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="favizonerecommender.xml" hash="761e78aad6a8b28baba9ceb008755732"/></dir><dir name="template"><dir name="favizonerecommender"><file name="bottom.phtml" hash="1b66206acac162334c15d5c00bcc2e02"/><file name="common.phtml" hash="d9f906e6eb81892361b5bd5c0e88b8ed"/><file name="custom.phtml" hash="b4c5c3492a1eca27c59510b642a1f837"/><file name="event.phtml" hash="8c3135a51dc2a0270aef067e5a74443d"/><file name="footer.phtml" hash="f080c361ceff1aed3010e9aad9c07251"/><file name="index.phtml" hash="17e341f9b39c20030ce03bced05fd091"/><file name="preview.phtml" hash="27957d9403ac7faebbdbce862b3b573d"/><file name="renderer.phtml" hash="1508a5aadfe41e8452c2d015946cd254"/><file name="tracker.phtml" hash="d25622f1914c1460255b00f544d510dd"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Favizone_Recommender.csv" hash="9832f3a28ed8c6af16ddb29d23444131"/></dir><dir name="fr_FR"><file name="Favizone_Recommender.csv" hash="4db2aeec4c72f8308716587fb98643ae"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Favizone_Recommender</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Favizone</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Personalization for Magento</summary>
10
  <description>FavizonIncrease your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.e_Recommender</description>
11
+ <notes>*update product data tracking process</notes>
 
12
  <authors><author><name>Favizone</name><user>favizone</user><email>contact@favizone.com</email></author></authors>
13
+ <date>2016-09-27</date>
14
+ <time>17:07:21</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Favizone_Recommender.xml" hash="7457b857a4a6fb30905081c9c87fee60"/></dir></target><target name="magecommunity"><dir name="Favizone"><dir name="Recommender"><dir name="Block"><dir name="Adminhtml"><file name="AdminConfig.php" hash="6c6b1589892a4c6b563de6fdeeece7fd"/></dir><file name="Common.php" hash="e53f8700fcf0fde9353a571d71272547"/><file name="Custom.php" hash="b904e161cc0100d7518f09bec7cf04ac"/><file name="Renderer.php" hash="6e97d9d908b47e7f59b288b35fe3d18d"/><file name="Tracker.php" hash="6323d4c56f5a5619c3488ea5f53fa022"/></dir><dir name="Helper"><file name="Account.php" hash="62eda9b2b7bb7db618e117d9ba002b7b"/><file name="Category.php" hash="930e778211cfd1a0bc53677e1b938ac1"/><file name="Common.php" hash="3b5c8206d886aebdb54c9f0aae7f4cb7"/><file name="Customer.php" hash="d964c01b0feee83dd279115deaa8b209"/><file name="Data.php" hash="a191304d6e1eab96cc452873ab7b4b75"/><file name="Order.php" hash="d4023b65bf902b7ef202b91b7d0629e7"/><file name="Product.php" hash="7dde25dcb6bc03ed86c8c5786cafdc9e"/><file name="Sender.php" hash="24f9459a7eefcaa5f3a13e90f932dab2"/></dir><dir name="Model"><file name="AccessKey.php" hash="c0fabf3617b346543bcca6f36fe98e1a"/><dir name="Meta"><file name="Customer.php" hash="de62cf990ba2d3b1e83759919f6f9cfc"/><file name="Order.php" hash="9ebb1a57b41bee5db8c3463f241d872f"/><file name="Product.php" hash="a00ef501e8ea55986dd5ed49b821cce4"/></dir><file name="Observer.php" hash="52a0fda50fe6425a417bfee83b0bb489"/><file name="Product.php" hash="728a1739e56c9b98ffbe5f94b27a2593"/><dir name="Resource"><dir name="AccessKey"><file name="Collection.php" hash="5255134124dc54701b4942cc0c29f018"/></dir><file name="AccessKey.php" hash="5e4d06afae4261e6f7e1da929a3c4d09"/><file name="Setup.php" hash="5e0685b4baad75a3e84223fad4c1e3b9"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FavizoneController.php" hash="4914197150be118da9a061daeb4ec6d4"/></dir><file name="IndexController.php" hash="b0085fe71c5a1ef53204f71d58620200"/></dir><dir name="etc"><file name="adminhtml.xml" hash="abe94fe89c2635eae6b0c46c27601982"/><file name="config.xml" hash="02c708c115f76caebbbb4cdd6cba840e"/></dir><dir name="sql"><dir name="favizone_recommender_setup"><file name="mysql4-install-1.0.0.php" hash="b2b0bf8d6a50ea30808e284fe6e6d956"/><file name="mysql4-upgrade-1.0.0-1.0.3.php" hash="13a8f4614e43b2a65f854e6c51ae3e04"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="favizone"><file name="admin-custom-style.css" hash="b536ff43d9ed54fe48711d2eee0a4d37"/><file name="font-awesome.min.css" hash="7aa7a0865ce6f38d0e854d3dd4623e3d"/><dir name="fonts"><file name="FontAwesome.otf" hash="87d8ca3ddc57e7d2da6226e480f90457"/><file name="fontawesome-webfont.eot" hash="32400f4e08932a94d8bfd2422702c446"/><file name="fontawesome-webfont.svg" hash="f775f9cca88e21d45bebe185b27c0e5b"/><file name="fontawesome-webfont.ttf" hash="a3de2170e4e9df77161ea5d3f31b2668"/><file name="fontawesome-webfont.woff" hash="a35720c2fed2c7f043bc7e4ffb45e073"/><file name="fontawesome-webfont.woff2" hash="db812d8a70a4e88e888744c1c9a27e89"/></dir></dir><dir name="images"><dir name="favizone"><file name="close.png" hash="8177fd73492c9b00de9d8e39ce518352"/><file name="logo-favizone.png" hash="f4ba18ee390b6080b5660a0102c817e8"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="favizone"><file name="favizone-auto-appender.js" hash="e9db10590a34a99366d7478ed5cced3b"/><file name="favizone-helper.js" hash="a35f3d8e84122e019fc9c6339ac0a1a8"/><file name="favizone-preview-manager.js" hash="d46fce8590ce8d270a3da2a1282ae964"/><file name="favizone-renderer.js" hash="86f672087f479cc113f66bc97227e3aa"/><file name="favizone-tracker.js" hash="dbd2e4d131911b41f220ff880e1df23c"/><file name="internal-sender.js" hash="7d31265ace505e08f8500b697e90a059"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="favizonerecommender.xml" hash="accc4ea6c5ec649f9c990508196399f5"/></dir><dir name="template"><dir name="favizonerecommender"><file name="adminconfig.phtml" hash="8fb39cdaefc90c2fa2528f31fd93cea0"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="favizonerecommender.xml" hash="761e78aad6a8b28baba9ceb008755732"/></dir><dir name="template"><dir name="favizonerecommender"><file name="bottom.phtml" hash="1b66206acac162334c15d5c00bcc2e02"/><file name="common.phtml" hash="d9f906e6eb81892361b5bd5c0e88b8ed"/><file name="custom.phtml" hash="b4c5c3492a1eca27c59510b642a1f837"/><file name="event.phtml" hash="8c3135a51dc2a0270aef067e5a74443d"/><file name="footer.phtml" hash="f080c361ceff1aed3010e9aad9c07251"/><file name="index.phtml" hash="17e341f9b39c20030ce03bced05fd091"/><file name="preview.phtml" hash="27957d9403ac7faebbdbce862b3b573d"/><file name="renderer.phtml" hash="b269e1e7f9e4dfd57e6806e581e887f0"/><file name="tracker.phtml" hash="d25622f1914c1460255b00f544d510dd"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Favizone_Recommender.csv" hash="9832f3a28ed8c6af16ddb29d23444131"/></dir><dir name="fr_FR"><file name="Favizone_Recommender.csv" hash="0d5ecba05707f2fe63792e7afd042094"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>