Rees46_Personalization - Version 3.3.3

Version Notes

Solve issues with jQuery in version Magento 1.7

Download this release

Release Info

Developer REES46
Extension Rees46_Personalization
Version 3.3.3
Comparing to
See all releases


Code changes from version 3.3.2 to 3.3.3

app/code/community/Rees46/Personalization/controllers/BlockController.php CHANGED
@@ -26,6 +26,7 @@ class Rees46_Personalization_BlockController extends Mage_Core_Controller_Front_
26
  {
27
  $this->loadLayout();
28
  $product_ids = $this->getRequest()->getParam('ids');
 
29
  $recommender_type = $this->getRequest()->getParam('type');
30
  $minimum_recommended_products = intval($this->getRequest()->getParam('minimum'));
31
  $products = array();
@@ -51,6 +52,7 @@ class Rees46_Personalization_BlockController extends Mage_Core_Controller_Front_
51
  $block_title = Mage::helper('rees46_personalization')->__($recommender_type);
52
  if($this->getRequest()->getParam('block_title')) {
53
  $block_title = $this->getRequest()->getParam('block_title');
 
54
  }
55
 
56
  $html = '<div class="rees46 rees46-recommend"><div class="recommender-block-title">' . $block_title . '</div><div class="recommended-items">';
26
  {
27
  $this->loadLayout();
28
  $product_ids = $this->getRequest()->getParam('ids');
29
+ $product_ids = explode(',', $product_ids);
30
  $recommender_type = $this->getRequest()->getParam('type');
31
  $minimum_recommended_products = intval($this->getRequest()->getParam('minimum'));
32
  $products = array();
52
  $block_title = Mage::helper('rees46_personalization')->__($recommender_type);
53
  if($this->getRequest()->getParam('block_title')) {
54
  $block_title = $this->getRequest()->getParam('block_title');
55
+ $block_title = urldecode($block_title);
56
  }
57
 
58
  $html = '<div class="rees46 rees46-recommend"><div class="recommender-block-title">' . $block_title . '</div><div class="recommended-items">';
app/code/community/Rees46/Personalization/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Rees46_Personalization>
5
- <version>3.3.2</version>
6
  </Rees46_Personalization>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Rees46_Personalization>
5
+ <version>3.3.3</version>
6
  </Rees46_Personalization>
7
  </modules>
8
  <global>
app/design/frontend/base/default/template/rees46/personalization/init.phtml CHANGED
@@ -88,7 +88,7 @@
88
  // @todo: update settings – include parameter for limit minimum recommended items
89
  var min_products = 1;
90
  if(data.length >= min_products) {
91
- jQuery.get(
92
  '/personalization/block',
93
  {
94
  ids: data,
@@ -103,7 +103,55 @@
103
  }
104
  );
105
  }
106
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
 
109
  });
88
  // @todo: update settings – include parameter for limit minimum recommended items
89
  var min_products = 1;
90
  if(data.length >= min_products) {
91
+ REES46RENDER(
92
  '/personalization/block',
93
  {
94
  ids: data,
103
  }
104
  );
105
  }
106
+ };
107
+
108
+ /**
109
+ * @param url
110
+ * @param attributes
111
+ * @param callback
112
+ * @returns {*}
113
+ * @constructor
114
+ */
115
+ function REES46RENDER (url, attributes, callback) {//Функция должна всегда получать URL (без параметров) и отдельно params независимо от: POST или GET запрос
116
+
117
+ var params = "ids=" + attributes.ids.join(',') + "&block_title=" + attributes.block_title + "&minimum=" + attributes.minimum + "&type=" + attributes.type;
118
+
119
+ //Обработка результата запроса
120
+ var handler = function () {
121
+ if (_xml.readyState == 4) {
122
+ if (_xml.status == 200) {
123
+ if (typeof(callback) == 'function') {
124
+ callback(_xml.responseText);
125
+ }
126
+ }
127
+ }
128
+ };
129
+
130
+ var handlerIE = function () {
131
+ if (typeof(callback) == 'function') {
132
+ callback(_xml.responseText);
133
+ }
134
+ };
135
+
136
+ try {
137
+ var XHR = window.XDomainRequest || window.XMLHttpRequest;
138
+ var _xml = new XHR();
139
+ _xml.withCredentials = "true";
140
+ _xml.open('GET', url + '?' + params, true);
141
+ if (XHR == window.XDomainRequest) {
142
+ _xml.onload = handlerIE;
143
+ } else {
144
+ _xml.onload = handler;
145
+ }
146
+ _xml.send(null);
147
+ this._xml = _xml;
148
+ return this._xml;
149
+ } catch( e ) {
150
+ console.log(e);
151
+ }
152
+
153
+ return true;
154
+ };
155
 
156
 
157
  });
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rees46_Personalization</name>
4
- <version>3.3.2</version>
5
  <stability>stable</stability>
6
  <license>GNU</license>
7
  <channel>community</channel>
@@ -21,11 +21,11 @@ Then REES46 recommends appropriate products to every individual customer using b
21
  - People Buying It Right Now.&#xD;
22
  &#xD;
23
  REES46 increases efficiency of e-commerce website up to 24% (in revenue).</description>
24
- <notes>Speed up events tracking</notes>
25
  <authors><author><name>REES46</name><user>mkechinov</user><email>kechinoff@gmail.com</email></author></authors>
26
- <date>2015-06-24</date>
27
- <time>14:45:44</time>
28
- <contents><target name="magecommunity"><dir name="Rees46"><dir name="Personalization"><dir name="Helper"><file name="Admin.php" hash="2d31ca47bba5404e8b9d777027f70f48"/><file name="Data.php" hash="eecf1cab557b61ff3de492ca8d768ff2"/><file name="Event.php" hash="12f1e1ef5c3842f8752d34b18e3d0e6b"/></dir><dir name="Model"><file name="Observer.php" hash="3ca0fda3cf704eb3a82bc2935fb33640"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PersonalizationController.php" hash="83cf76649e36fdf635836098c73b1310"/></dir><file name="BlockController.php" hash="c31001fb23ec7ba70e2bddcc70119022"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7d8c44125849ee7ba71b633604ee70ff"/><file name="config.xml" hash="f099788edbabada44b7be9388036f89c"/><file name="system.xml" hash="4f47eecc2d1e161ae906cb511c5a2aff"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="rees46_personalization.xml" hash="55c2cd3a5a293270896c3c1e4ad3b677"/></dir><dir name="template"><dir name="rees46"><dir name="personalization"><file name="index.phtml" hash="87026c52a8d199d83d065c576679ebb6"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="rees46_personalization.xml" hash="55c2cd3a5a293270896c3c1e4ad3b677"/></dir><dir name="template"><dir name="rees46"><dir name="personalization"><dir name="blocks"><file name="cart.phtml" hash="ec4da21b7600e045494d8544cac02c06"/><file name="category.phtml" hash="56d802fa13893b477e5fcd81bf2d34a7"/><file name="home.phtml" hash="3a9812cb402d496f172870940df6a919"/><file name="product.phtml" hash="ac84646b85cd406af59ec65a0fdf1a7a"/></dir><file name="css.phtml" hash="dfe94f4cff6e314de18ce791ddb20455"/><file name="init.phtml" hash="9bc97d76c482cafe68d3dbe29e4c40d3"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rees46_Personalization.xml" hash="67bdc8c38ce74e98dda5d70a0943f2fe"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Rees46_Personalization.csv" hash="0169f9749d80016235f9c69c245f0976"/></dir><dir name="ru_RU"><file name="Rees46_Personalization.csv" hash="9a71f4c9cb704beb7bf698595ee9db13"/></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.2.1</min><max>6.0.0</max></php></required></dependencies>
31
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Rees46_Personalization</name>
4
+ <version>3.3.3</version>
5
  <stability>stable</stability>
6
  <license>GNU</license>
7
  <channel>community</channel>
21
  - People Buying It Right Now.&#xD;
22
  &#xD;
23
  REES46 increases efficiency of e-commerce website up to 24% (in revenue).</description>
24
+ <notes>Solve issues with jQuery in version Magento 1.7</notes>
25
  <authors><author><name>REES46</name><user>mkechinov</user><email>kechinoff@gmail.com</email></author></authors>
26
+ <date>2015-06-27</date>
27
+ <time>13:05:45</time>
28
+ <contents><target name="magecommunity"><dir name="Rees46"><dir name="Personalization"><dir name="Helper"><file name="Admin.php" hash="2d31ca47bba5404e8b9d777027f70f48"/><file name="Data.php" hash="eecf1cab557b61ff3de492ca8d768ff2"/><file name="Event.php" hash="12f1e1ef5c3842f8752d34b18e3d0e6b"/></dir><dir name="Model"><file name="Observer.php" hash="3ca0fda3cf704eb3a82bc2935fb33640"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PersonalizationController.php" hash="83cf76649e36fdf635836098c73b1310"/></dir><file name="BlockController.php" hash="675cc79707363685d6eae422332fd002"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7d8c44125849ee7ba71b633604ee70ff"/><file name="config.xml" hash="a44c857825fab00939c03a84e23674cc"/><file name="system.xml" hash="4f47eecc2d1e161ae906cb511c5a2aff"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="rees46_personalization.xml" hash="55c2cd3a5a293270896c3c1e4ad3b677"/></dir><dir name="template"><dir name="rees46"><dir name="personalization"><file name="index.phtml" hash="87026c52a8d199d83d065c576679ebb6"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="rees46_personalization.xml" hash="55c2cd3a5a293270896c3c1e4ad3b677"/></dir><dir name="template"><dir name="rees46"><dir name="personalization"><dir name="blocks"><file name="cart.phtml" hash="ec4da21b7600e045494d8544cac02c06"/><file name="category.phtml" hash="56d802fa13893b477e5fcd81bf2d34a7"/><file name="home.phtml" hash="3a9812cb402d496f172870940df6a919"/><file name="product.phtml" hash="ac84646b85cd406af59ec65a0fdf1a7a"/></dir><file name="css.phtml" hash="dfe94f4cff6e314de18ce791ddb20455"/><file name="init.phtml" hash="8a1bf7c9245e66542438503e37d808e8"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Rees46_Personalization.xml" hash="67bdc8c38ce74e98dda5d70a0943f2fe"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Rees46_Personalization.csv" hash="0169f9749d80016235f9c69c245f0976"/></dir><dir name="ru_RU"><file name="Rees46_Personalization.csv" hash="9a71f4c9cb704beb7bf698595ee9db13"/></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.2.1</min><max>6.0.0</max></php></required></dependencies>
31
  </package>