Version Notes
Solve issues with minification.
Download this release
Release Info
Developer | REES46 |
Extension | Rees46_Personalization |
Version | 3.3.4 |
Comparing to | |
See all releases |
Code changes from version 3.3.3 to 3.3.4
- app/code/community/Rees46/Personalization/Helper/Event.php +0 -1
- app/code/community/Rees46/Personalization/Model/Observer.php +1 -1
- app/code/community/Rees46/Personalization/controllers/Adminhtml/PersonalizationController.php +1 -1
- app/code/community/Rees46/Personalization/controllers/BlockController.php +6 -6
- app/code/community/Rees46/Personalization/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/rees46_personalization.xml +1 -0
- app/design/frontend/base/default/template/rees46/personalization/blocks/cart.phtml +1 -1
- app/design/frontend/base/default/template/rees46/personalization/blocks/category.phtml +2 -3
- app/design/frontend/base/default/template/rees46/personalization/blocks/category_popular.phtml +3 -0
- app/design/frontend/base/default/template/rees46/personalization/blocks/home.phtml +3 -3
- app/design/frontend/base/default/template/rees46/personalization/blocks/product.phtml +3 -3
- app/design/frontend/base/default/template/rees46/personalization/init.phtml +5 -4
- package.xml +6 -6
app/code/community/Rees46/Personalization/Helper/Event.php
CHANGED
@@ -21,7 +21,6 @@ class Rees46_Personalization_Helper_Event extends Mage_Core_Helper_Abstract
|
|
21 |
'data' => $data
|
22 |
));
|
23 |
Mage::getSingleton('core/session')->setData(self::REES46_SESSION_KEY_IDENTIFIER, $events);
|
24 |
-
// var_dump($events);
|
25 |
}
|
26 |
|
27 |
|
21 |
'data' => $data
|
22 |
));
|
23 |
Mage::getSingleton('core/session')->setData(self::REES46_SESSION_KEY_IDENTIFIER, $events);
|
|
|
24 |
}
|
25 |
|
26 |
|
app/code/community/Rees46/Personalization/Model/Observer.php
CHANGED
@@ -104,7 +104,7 @@ class Rees46_Personalization_Model_Observer
|
|
104 |
'url' => null,
|
105 |
'image_url' => $image,
|
106 |
'tags' => null,
|
107 |
-
|
108 |
'recommended_by' => null
|
109 |
);
|
110 |
}
|
104 |
'url' => null,
|
105 |
'image_url' => $image,
|
106 |
'tags' => null,
|
107 |
+
/* @todo: do not forgot processing of recommender */
|
108 |
'recommended_by' => null
|
109 |
);
|
110 |
}
|
app/code/community/Rees46/Personalization/controllers/Adminhtml/PersonalizationController.php
CHANGED
@@ -13,7 +13,7 @@ class Rees46_Personalization_Adminhtml_PersonalizationController extends Mage_Ad
|
|
13 |
*/
|
14 |
protected function _initAction()
|
15 |
{
|
16 |
-
|
17 |
$this->loadLayout()
|
18 |
->_setActiveMenu('personalization/overview')
|
19 |
->_addBreadcrumb(
|
13 |
*/
|
14 |
protected function _initAction()
|
15 |
{
|
16 |
+
/* load layout, set active menu and breadcrumbs */
|
17 |
$this->loadLayout()
|
18 |
->_setActiveMenu('personalization/overview')
|
19 |
->_addBreadcrumb(
|
app/code/community/Rees46/Personalization/controllers/BlockController.php
CHANGED
@@ -37,7 +37,7 @@ class Rees46_Personalization_BlockController extends Mage_Core_Controller_Front_
|
|
37 |
->addAttributeToFilter('entity_id', array('in' => $product_ids))
|
38 |
->addAttributeToSelect($attributes);
|
39 |
|
40 |
-
|
41 |
foreach($product_ids as $id) {
|
42 |
foreach($collection as $product) {
|
43 |
if($product->getId() == $id) {
|
@@ -48,7 +48,7 @@ class Rees46_Personalization_BlockController extends Mage_Core_Controller_Front_
|
|
48 |
|
49 |
if( $minimum_recommended_products > 0 && count($products) >= $minimum_recommended_products ) {
|
50 |
|
51 |
-
|
52 |
$block_title = Mage::helper('rees46_personalization')->__($recommender_type);
|
53 |
if($this->getRequest()->getParam('block_title')) {
|
54 |
$block_title = $this->getRequest()->getParam('block_title');
|
@@ -58,10 +58,10 @@ class Rees46_Personalization_BlockController extends Mage_Core_Controller_Front_
|
|
58 |
$html = '<div class="rees46 rees46-recommend"><div class="recommender-block-title">' . $block_title . '</div><div class="recommended-items">';
|
59 |
foreach($products as $product) {
|
60 |
|
61 |
-
|
62 |
$productForImage = Mage::getModel('catalog/product')->load($product->getId());
|
63 |
|
64 |
-
|
65 |
$product_url = $product->getProductUrl(false);
|
66 |
if( strpos($product_url, '?') !== false ) {
|
67 |
$product_url = str_replace('?', '?recommended_by=' . $recommender_type . '& ', $product_url);
|
@@ -70,12 +70,12 @@ class Rees46_Personalization_BlockController extends Mage_Core_Controller_Front_
|
|
70 |
}
|
71 |
$html .= '<div class="recommended-item">
|
72 |
<div class="recommended-item-photo">
|
73 |
-
<a href="' . $product_url . '"><img src="' .
|
74 |
<div class="recommended-item-title">
|
75 |
<a href="' . $product_url . '">' . $product->getName() . '</a>
|
76 |
</div>
|
77 |
<div class="recommended-item-price">' . $product->getFormatedPrice() . '</div>
|
78 |
-
<div class="recommended-item-action"><a href="' . $product_url . '">' . Mage::helper('rees46_personalization')->__('More
|
79 |
</div>';
|
80 |
}
|
81 |
$html .= '</div></div>';
|
37 |
->addAttributeToFilter('entity_id', array('in' => $product_ids))
|
38 |
->addAttributeToSelect($attributes);
|
39 |
|
40 |
+
/* Sort items as REES46 returned */
|
41 |
foreach($product_ids as $id) {
|
42 |
foreach($collection as $product) {
|
43 |
if($product->getId() == $id) {
|
48 |
|
49 |
if( $minimum_recommended_products > 0 && count($products) >= $minimum_recommended_products ) {
|
50 |
|
51 |
+
/* Get block title - from locale or from front-end */
|
52 |
$block_title = Mage::helper('rees46_personalization')->__($recommender_type);
|
53 |
if($this->getRequest()->getParam('block_title')) {
|
54 |
$block_title = $this->getRequest()->getParam('block_title');
|
58 |
$html = '<div class="rees46 rees46-recommend"><div class="recommender-block-title">' . $block_title . '</div><div class="recommended-items">';
|
59 |
foreach($products as $product) {
|
60 |
|
61 |
+
/* Specific settings cause problems with large photos, so find it another way */
|
62 |
$productForImage = Mage::getModel('catalog/product')->load($product->getId());
|
63 |
|
64 |
+
/* Sometimes Magento adds special attributes to URL's, so add our attributes depending of this situation */
|
65 |
$product_url = $product->getProductUrl(false);
|
66 |
if( strpos($product_url, '?') !== false ) {
|
67 |
$product_url = str_replace('?', '?recommended_by=' . $recommender_type . '& ', $product_url);
|
70 |
}
|
71 |
$html .= '<div class="recommended-item">
|
72 |
<div class="recommended-item-photo">
|
73 |
+
<a href="' . $product_url . '"><img src="' . $productForImage->getThumbnailUrl(200, 200) . '"></a></div>
|
74 |
<div class="recommended-item-title">
|
75 |
<a href="' . $product_url . '">' . $product->getName() . '</a>
|
76 |
</div>
|
77 |
<div class="recommended-item-price">' . $product->getFormatedPrice() . '</div>
|
78 |
+
<div class="recommended-item-action"><a href="' . $product_url . '">' . Mage::helper('rees46_personalization')->__('More') . '</a></div>
|
79 |
</div>';
|
80 |
}
|
81 |
$html .= '</div></div>';
|
app/code/community/Rees46/Personalization/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Rees46_Personalization>
|
5 |
-
<version>3.3.
|
6 |
</Rees46_Personalization>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Rees46_Personalization>
|
5 |
+
<version>3.3.4</version>
|
6 |
</Rees46_Personalization>
|
7 |
</modules>
|
8 |
<global>
|
app/design/frontend/base/default/layout/rees46_personalization.xml
CHANGED
@@ -23,6 +23,7 @@
|
|
23 |
<!-- Category -->
|
24 |
<catalog_category_view translate="label">
|
25 |
<reference name="content">
|
|
|
26 |
<block type="core/template" name="rees46_category" after="category.products" template="rees46/personalization/blocks/category.phtml" />
|
27 |
</reference>
|
28 |
</catalog_category_view>
|
23 |
<!-- Category -->
|
24 |
<catalog_category_view translate="label">
|
25 |
<reference name="content">
|
26 |
+
<block type="core/template" name="rees46_category_popular" after="category.description" template="rees46/personalization/blocks/category_popular.phtml" />
|
27 |
<block type="core/template" name="rees46_category" after="category.products" template="rees46/personalization/blocks/category.phtml" />
|
28 |
</reference>
|
29 |
</catalog_category_view>
|
app/design/frontend/base/default/template/rees46/personalization/blocks/cart.phtml
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
-
<div class="rees46 rees46-recommend" data-type="see_also"
|
3 |
<?php endif; ?>
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
+
<div class="rees46 rees46-recommend" data-type="see_also"></div>
|
3 |
<?php endif; ?>
|
app/design/frontend/base/default/template/rees46/personalization/blocks/category.phtml
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
-
<div class="rees46 rees46-recommend" data-type="
|
3 |
-
<div class="rees46 rees46-recommend" data-type="
|
4 |
-
<div class="rees46 rees46-recommend" data-type="interesting" data-title="Возможно, вам это будет интересно"></div>
|
5 |
<?php endif; ?>
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
+
<div class="rees46 rees46-recommend" data-type="recently_viewed"></div>
|
3 |
+
<div class="rees46 rees46-recommend" data-type="interesting"></div>
|
|
|
4 |
<?php endif; ?>
|
app/design/frontend/base/default/template/rees46/personalization/blocks/category_popular.phtml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
+
<div class="rees46 rees46-recommend" data-type="popular" data-category="<?php echo Mage::registry('current_category')->getId() ?>">популярные</div>
|
3 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/rees46/personalization/blocks/home.phtml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
-
<div class="rees46 rees46-recommend" data-type="popular"
|
3 |
-
<div class="rees46 rees46-recommend" data-type="interesting"
|
4 |
-
<div class="rees46 rees46-recommend" data-type="recently_viewed"
|
5 |
<?php endif; ?>
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
+
<div class="rees46 rees46-recommend" data-type="popular"></div>
|
3 |
+
<div class="rees46 rees46-recommend" data-type="interesting"></div>
|
4 |
+
<div class="rees46 rees46-recommend" data-type="recently_viewed"></div>
|
5 |
<?php endif; ?>
|
app/design/frontend/base/default/template/rees46/personalization/blocks/product.phtml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
-
<div class="rees46 rees46-recommend" data-type="also_bought" data-
|
3 |
-
<div class="rees46 rees46-recommend" data-type="similar" data-
|
4 |
-
<div class="rees46 rees46-recommend" data-type="interesting" data-
|
5 |
<?php endif; ?>
|
1 |
<?php if (Mage::helper('rees46_personalization')->isExpertMode() != true): ?>
|
2 |
+
<div class="rees46 rees46-recommend" data-type="also_bought" data-item="<?php echo Mage::registry('current_product')->getId() ?>"></div>
|
3 |
+
<div class="rees46 rees46-recommend" data-type="similar" data-item="<?php echo Mage::registry('current_product')->getId() ?>"></div>
|
4 |
+
<div class="rees46 rees46-recommend" data-type="interesting" data-item="<?php echo Mage::registry('current_product')->getId() ?>"></div>
|
5 |
<?php endif; ?>
|
app/design/frontend/base/default/template/rees46/personalization/init.phtml
CHANGED
@@ -85,7 +85,7 @@
|
|
85 |
});
|
86 |
|
87 |
function REES46_Recommender_Callback(recommenderType, block, data) {
|
88 |
-
|
89 |
var min_products = 1;
|
90 |
if(data.length >= min_products) {
|
91 |
REES46RENDER(
|
@@ -94,7 +94,7 @@
|
|
94 |
ids: data,
|
95 |
type: recommenderType,
|
96 |
minimum: min_products,
|
97 |
-
block_title: block.data('title')
|
98 |
},
|
99 |
function(response) {
|
100 |
if(response) {
|
@@ -106,17 +106,18 @@
|
|
106 |
};
|
107 |
|
108 |
/**
|
|
|
109 |
* @param url
|
110 |
* @param attributes
|
111 |
* @param callback
|
112 |
* @returns {*}
|
113 |
* @constructor
|
114 |
*/
|
115 |
-
function REES46RENDER (url, attributes, callback) {
|
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) {
|
85 |
});
|
86 |
|
87 |
function REES46_Recommender_Callback(recommenderType, block, data) {
|
88 |
+
/* @todo: update settings – include parameter for limit minimum recommended items */
|
89 |
var min_products = 1;
|
90 |
if(data.length >= min_products) {
|
91 |
REES46RENDER(
|
94 |
ids: data,
|
95 |
type: recommenderType,
|
96 |
minimum: min_products,
|
97 |
+
block_title: ( block.data('title') || '' )
|
98 |
},
|
99 |
function(response) {
|
100 |
if(response) {
|
106 |
};
|
107 |
|
108 |
/**
|
109 |
+
* Функция должна всегда получать URL (без параметров) и отдельно params независимо от: POST или GET запрос
|
110 |
* @param url
|
111 |
* @param attributes
|
112 |
* @param callback
|
113 |
* @returns {*}
|
114 |
* @constructor
|
115 |
*/
|
116 |
+
function REES46RENDER (url, attributes, callback) {
|
117 |
|
118 |
var params = "ids=" + attributes.ids.join(',') + "&block_title=" + attributes.block_title + "&minimum=" + attributes.minimum + "&type=" + attributes.type;
|
119 |
|
120 |
+
/* Обработка результата запроса */
|
121 |
var handler = function () {
|
122 |
if (_xml.readyState == 4) {
|
123 |
if (_xml.status == 200) {
|
package.xml
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Rees46_Personalization</name>
|
4 |
-
<version>3.3.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>REES46 is
|
10 |
<description>Personal recommendations for e-commerce and e-mail notifications. Increases conversion rate and revenue without changing costs for advertisement. Automatically.
|
11 |

|
12 |
Behaviour analysis: analyzes activity of every your customer an stores it anonymously. REES46 collects these actions: product view, product added or removed from cart, order created.
|
@@ -21,11 +21,11 @@ Then REES46 recommends appropriate products to every individual customer using b
|
|
21 |
- People Buying It Right Now.
|
22 |

|
23 |
REES46 increases efficiency of e-commerce website up to 24% (in revenue).</description>
|
24 |
-
<notes>Solve issues with
|
25 |
<authors><author><name>REES46</name><user>mkechinov</user><email>kechinoff@gmail.com</email></author></authors>
|
26 |
-
<date>
|
27 |
-
<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="
|
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.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>REES46 is the professional recommender system for e-commerce, with personalized merchandising, trigger and digest mailings, search personalization, etc. analyzes customers activity and recommend them best goods they are willing to buy for greater conversion and ARPPU.</summary>
|
10 |
<description>Personal recommendations for e-commerce and e-mail notifications. Increases conversion rate and revenue without changing costs for advertisement. Automatically.
|
11 |

|
12 |
Behaviour analysis: analyzes activity of every your customer an stores it anonymously. REES46 collects these actions: product view, product added or removed from cart, order created.
|
21 |
- People Buying It Right Now.
|
22 |

|
23 |
REES46 increases efficiency of e-commerce website up to 24% (in revenue).</description>
|
24 |
+
<notes>Solve issues with minification.</notes>
|
25 |
<authors><author><name>REES46</name><user>mkechinov</user><email>kechinoff@gmail.com</email></author></authors>
|
26 |
+
<date>2016-03-10</date>
|
27 |
+
<time>12:23:31</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="b556b383c49d1ce32e75a34739c0ec80"/></dir><dir name="Model"><file name="Observer.php" hash="46514b2c3bebbf55a375df6eef73b01d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PersonalizationController.php" hash="223eb514006587a194e969487e650b6d"/></dir><file name="BlockController.php" hash="af21b92af9fb8c8aacc60f41cf40b54c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7d8c44125849ee7ba71b633604ee70ff"/><file name="config.xml" hash="f4f233cd13b12f859e2bb16e133ddad7"/><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="b1a6845c76cc0e3efbf901bb5a6a0322"/></dir><dir name="template"><dir name="rees46"><dir name="personalization"><dir name="blocks"><file name="cart.phtml" hash="c594f670a1b069c5c8418db41a89e4a7"/><file name="category.phtml" hash="ddaa3e5542058a6091ada3565e32b085"/><file name="category_popular.phtml" hash="db6f2d7df16ab69b76030eb008df9b22"/><file name="home.phtml" hash="3ca3dff9140e0bb0d850b456f9bf8640"/><file name="product.phtml" hash="8e5621b3897e374fe34436326f2132e9"/></dir><file name="css.phtml" hash="dfe94f4cff6e314de18ce791ddb20455"/><file name="init.phtml" hash="d77df5f096dc430a58a13baaf027958c"/></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>
|