Version Notes
Added support for the new Behavioural Targeting Service
Download this release
Release Info
Developer | BrainSINS |
Extension | Brainsins_Recommender |
Version | 1.6.4 |
Comparing to | |
See all releases |
Code changes from version 1.6.3 to 1.6.4
app/code/community/Brainsins/Recsins/Block/Recsins.php
CHANGED
@@ -210,12 +210,15 @@ class Brainsins_Recsins_Block_Recsins extends Mage_Core_Block_Abstract {
|
|
210 |
|
211 |
//end captured events
|
212 |
|
|
|
|
|
213 |
if ($page == 'cms') {
|
214 |
$pageId = Mage::getSingleton('cms/page')->getIdentifier();
|
215 |
$current_page = "cms->" . $pageId;
|
216 |
$url = Mage::helper('core/url')->getCurrentUrl();
|
217 |
|
218 |
if ($pageId == 'home') {
|
|
|
219 |
$recScript = $this->getJSRecommendations('brainsins/BS_HOME_RECOMMENDER', 'home_recommendations', $userId, null);
|
220 |
}
|
221 |
} else if ($page == 'catalog') {
|
@@ -224,13 +227,14 @@ class Brainsins_Recsins_Block_Recsins extends Mage_Core_Block_Abstract {
|
|
224 |
$category = Mage::registry('current_category');
|
225 |
|
226 |
if (isset($product) && $product) {
|
227 |
-
|
228 |
$productId = $product->getId();
|
229 |
$store = Mage::app()->getStore();
|
230 |
$url = $product->getUrlModel()->getUrl($product, array('_ignore_category' => true)) . "?___store=" . Mage::app()->getStore()->getCode();
|
231 |
|
232 |
$recScript = $this->getJSRecommendations('brainsins/BS_PRODUCT_RECOMMENDER', 'product_recommendations', $userId, $productId);
|
233 |
} else if(isset($category) && $category) {
|
|
|
234 |
$categoryId = $category->getId();
|
235 |
$recScript = $this->getJSRecommendations('brainsins/BS_CATEGORY_RECOMMENDER', 'category_recommendations', $userId, $categoryId);
|
236 |
} else {
|
@@ -240,19 +244,23 @@ class Brainsins_Recsins_Block_Recsins extends Mage_Core_Block_Abstract {
|
|
240 |
$request = Mage::app()->getFrontController()->getRequest();
|
241 |
|
242 |
if ($request->getControllerName() == "cart") {
|
|
|
243 |
$recScript = $this->getJSRecommendations('brainsins/BS_CART_RECOMMENDER', 'cart_recommendations', $userId, null);
|
244 |
} else if ($request->getControllerName() == "onepage" || $request->getControllerName() == "multishipping") {
|
245 |
if ($request->getActionName() == "success") {
|
|
|
246 |
$recScript = $this->getJSRecommendations('brainsins/BS_CHECKOUT_RECOMMENDER', 'checkout_recommendations', $userId, null);
|
247 |
}
|
248 |
}
|
249 |
}
|
|
|
|
|
|
|
250 |
|
251 |
//track page url
|
252 |
$product = Mage::registry('current_product');
|
253 |
if (isset($product) && $product) {
|
254 |
-
|
255 |
-
|
256 |
$pid = $product->getId();
|
257 |
$name = $product->getName();
|
258 |
$name = str_replace("\r\n", " ", $name);
|
210 |
|
211 |
//end captured events
|
212 |
|
213 |
+
$btPage = "any";
|
214 |
+
|
215 |
if ($page == 'cms') {
|
216 |
$pageId = Mage::getSingleton('cms/page')->getIdentifier();
|
217 |
$current_page = "cms->" . $pageId;
|
218 |
$url = Mage::helper('core/url')->getCurrentUrl();
|
219 |
|
220 |
if ($pageId == 'home') {
|
221 |
+
$btPage = "home";
|
222 |
$recScript = $this->getJSRecommendations('brainsins/BS_HOME_RECOMMENDER', 'home_recommendations', $userId, null);
|
223 |
}
|
224 |
} else if ($page == 'catalog') {
|
227 |
$category = Mage::registry('current_category');
|
228 |
|
229 |
if (isset($product) && $product) {
|
230 |
+
$btPage = "product";
|
231 |
$productId = $product->getId();
|
232 |
$store = Mage::app()->getStore();
|
233 |
$url = $product->getUrlModel()->getUrl($product, array('_ignore_category' => true)) . "?___store=" . Mage::app()->getStore()->getCode();
|
234 |
|
235 |
$recScript = $this->getJSRecommendations('brainsins/BS_PRODUCT_RECOMMENDER', 'product_recommendations', $userId, $productId);
|
236 |
} else if(isset($category) && $category) {
|
237 |
+
$btPage = "category";
|
238 |
$categoryId = $category->getId();
|
239 |
$recScript = $this->getJSRecommendations('brainsins/BS_CATEGORY_RECOMMENDER', 'category_recommendations', $userId, $categoryId);
|
240 |
} else {
|
244 |
$request = Mage::app()->getFrontController()->getRequest();
|
245 |
|
246 |
if ($request->getControllerName() == "cart") {
|
247 |
+
$btPage = "cart";
|
248 |
$recScript = $this->getJSRecommendations('brainsins/BS_CART_RECOMMENDER', 'cart_recommendations', $userId, null);
|
249 |
} else if ($request->getControllerName() == "onepage" || $request->getControllerName() == "multishipping") {
|
250 |
if ($request->getActionName() == "success") {
|
251 |
+
$btPage = "checkout";
|
252 |
$recScript = $this->getJSRecommendations('brainsins/BS_CHECKOUT_RECOMMENDER', 'checkout_recommendations', $userId, null);
|
253 |
}
|
254 |
}
|
255 |
}
|
256 |
+
|
257 |
+
//Set up page type for behavioural targeting
|
258 |
+
$script .= 'BrainSINSTracker.setPageType("' . $btPage . '");' . PHP_EOL;
|
259 |
|
260 |
//track page url
|
261 |
$product = Mage::registry('current_product');
|
262 |
if (isset($product) && $product) {
|
263 |
+
|
|
|
264 |
$pid = $product->getId();
|
265 |
$name = $product->getName();
|
266 |
$name = str_replace("\r\n", " ", $name);
|
app/code/community/Brainsins/Recsins/sql/recsins_setup/mysql4-upgrade-1.6.3-1.6.4.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* BrainSINS' Magento Extension allows to integrate the BrainSINS
|
5 |
+
* personalized product recommendations into a Magento Store.
|
6 |
+
* Copyright (c) 2011 Social Gaming Platform S.R.L.
|
7 |
+
*
|
8 |
+
* This file is part of BrainSINS' Magento Extension.
|
9 |
+
*
|
10 |
+
* BrainSINS' Magento Extension is free software: you can redistribute it
|
11 |
+
* and/or modify it under the terms of the GNU General Public License
|
12 |
+
* as published by the Free Software Foundation, either version 3 of the
|
13 |
+
* License, or (at your option) any later version.
|
14 |
+
*
|
15 |
+
* Foobar is distributed in the hope that it will be useful,
|
16 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
+
* GNU General Public License for more details.
|
19 |
+
*
|
20 |
+
* You should have received a copy of the GNU General Public License
|
21 |
+
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
22 |
+
*
|
23 |
+
* Please do not hesitate to contact us at info@brainsins.com
|
24 |
+
*
|
25 |
+
*/
|
26 |
+
$installer = $this;
|
27 |
+
|
28 |
+
$table = $installer->getTable('recsins_recommender');
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
if (!$installer->tableExists($table)) {
|
33 |
+
$installer->run("
|
34 |
+
CREATE TABLE IF NOT EXISTS {$table} (
|
35 |
+
`id` int(10) unsigned NOT NULL,
|
36 |
+
`name` varchar(255),
|
37 |
+
`page` smallint(8),
|
38 |
+
PRIMARY KEY (`id`)
|
39 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Brainsins loaded Recommenders';
|
40 |
+
");
|
41 |
+
}
|
42 |
+
|
43 |
+
Mage::getModel('core/config')->saveConfig('brainsins/BS_VERSION', '1.6.4');
|
44 |
+
|
45 |
+
$installer->endSetup();
|
46 |
+
|
47 |
+
Mage::getConfig()->cleanCache();
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Brainsins_Recommender</name>
|
4 |
-
<version>1.6.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.brainsins.es/contrato-de-prestacion-de-servicios-brainsin-para-plugins/">GPL 3.0</license>
|
7 |
<channel>community</channel>
|
@@ -19,13 +19,13 @@ BrainSINS Recommender is offered as a software as a service. It processes the us
|
|
19 |
Increase your cross-sell, up-sell and Average Order Value (AOV) rates. Send personalized emails to your clients to increase the return to your store, and measure and control the effect of all the recommendations in your online store.
|
20 |

|
21 |
Install the plugin in a few minutes and offer more than 100 personalized recommenders in any web page of your online store in less than 24 hours. Choose the plan that better fits to your store at http://www.brainsins.es/tarifas/ and try it for Free 1 month, experimenting the benefits in your own online store without compromise.</description>
|
22 |
-
<notes>Added
|
23 |

|
24 |
</notes>
|
25 |
<authors><author><name>BrainSINS</name><user>acuevas</user><email>alejandro.cuevas@brainsins.com</email></author></authors>
|
26 |
-
<date>2013-
|
27 |
-
<time>
|
28 |
-
<contents><target name="magecommunity"><dir name="Brainsins"><dir name="Recsins"><dir name="Block"><dir name="Adminhtml"><dir name="Recsins"><dir name="Edit"><file name="Form.php" hash="0ee56464eba31db4e4fc9e4279a7d7ca"/><dir name="Tab"><file name="Form.php" hash="f50e327073f6db6f0b7aaf2e6018834b"/></dir><file name="Tabs.php" hash="da7477ceefd6cc473fb2fb2a307f0282"/></dir><file name="Edit.php" hash="942d16b49fca2566799c7c393ffdd4d2"/><file name="Grid.php" hash="bf34a0c320aeebfe1cc645dc4120b4aa"/><file name=".DS_Store" hash="b3a2141f78050b615c0cea14480334ac"/></dir><file name="Recsins.php" hash="f0bb580c8238818273726847917789f8"/><file name=".DS_Store" hash="8432a930c41259d8cdd9990c2540f153"/></dir><file name="Category.php" hash="fa64d544ad0020dfa651b6c27f95d734"/><file name="Checkout.php" hash="e6e523a465b52ff1d93dea497c15db5e"/><file name="Home.php" hash="26eb9d8e4f796bb0a2ba8ea90691c943"/><file name="Product.php" hash="648d439dc8729a8205449c6887175371"/><file name="Recsins.php" hash="
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
31 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Brainsins_Recommender</name>
|
4 |
+
<version>1.6.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.brainsins.es/contrato-de-prestacion-de-servicios-brainsin-para-plugins/">GPL 3.0</license>
|
7 |
<channel>community</channel>
|
19 |
Increase your cross-sell, up-sell and Average Order Value (AOV) rates. Send personalized emails to your clients to increase the return to your store, and measure and control the effect of all the recommendations in your online store.
|
20 |

|
21 |
Install the plugin in a few minutes and offer more than 100 personalized recommenders in any web page of your online store in less than 24 hours. Choose the plan that better fits to your store at http://www.brainsins.es/tarifas/ and try it for Free 1 month, experimenting the benefits in your own online store without compromise.</description>
|
22 |
+
<notes>Added support for the new Behavioural Targeting Service
|
23 |

|
24 |
</notes>
|
25 |
<authors><author><name>BrainSINS</name><user>acuevas</user><email>alejandro.cuevas@brainsins.com</email></author></authors>
|
26 |
+
<date>2013-03-11</date>
|
27 |
+
<time>15:00:32</time>
|
28 |
+
<contents><target name="magecommunity"><dir name="Brainsins"><dir name="Recsins"><dir name="Block"><dir name="Adminhtml"><dir name="Recsins"><dir name="Edit"><file name="Form.php" hash="0ee56464eba31db4e4fc9e4279a7d7ca"/><dir name="Tab"><file name="Form.php" hash="f50e327073f6db6f0b7aaf2e6018834b"/></dir><file name="Tabs.php" hash="da7477ceefd6cc473fb2fb2a307f0282"/></dir><file name="Edit.php" hash="942d16b49fca2566799c7c393ffdd4d2"/><file name="Grid.php" hash="bf34a0c320aeebfe1cc645dc4120b4aa"/><file name=".DS_Store" hash="b3a2141f78050b615c0cea14480334ac"/></dir><file name="Recsins.php" hash="f0bb580c8238818273726847917789f8"/><file name=".DS_Store" hash="8432a930c41259d8cdd9990c2540f153"/></dir><file name="Category.php" hash="fa64d544ad0020dfa651b6c27f95d734"/><file name="Checkout.php" hash="e6e523a465b52ff1d93dea497c15db5e"/><file name="Home.php" hash="26eb9d8e4f796bb0a2ba8ea90691c943"/><file name="Product.php" hash="648d439dc8729a8205449c6887175371"/><file name="Recsins.php" hash="a4a87d9f6264f9d40ffc902ab2bdc93a"/><file name=".DS_Store" hash="0047fe0bc161a58c6088a4e959de43a4"/><file name=".LCKRecsins.php~" hash="ed46e9b84acaa2b3b33539877109417b"/></dir><file name="COPYING.txt" hash="4fe869ee987a340198fb0d54c55c47f1"/><dir name="Entity"><file name="Setup.php" hash="02af74b02e083c4552762ecc9987a1a7"/></dir><dir name="Helper"><file name="Data.php" hash="c117b4e42fef671651a78c8f4e01d0e5"/><file name="Recsins.php" hash="435d1402b9b860d906db3a3beb3c93de"/></dir><dir name="Model"><dir name="Api"><file name="Api.php" hash="93dc9bb52ecd977739361410c36f9881"/><file name="ProductsApi.php" hash="a27f255d708e54ded7961735c37ff9e7"/><file name=".DS_Store" hash="0a07c4bce01507c8a0b9e9a2a6018154"/></dir><file name="Cart.php" hash="d19925676d18f200f25b1c995f035300"/><file name="CartProduct.php" hash="fffddbe0a759335f89bbdbcec7b4d2eb"/><file name="Client.php" hash="54ab4289c332f4414761ba4256dc205e"/><dir name="Mysql4"><dir name="Recsins"><file name="Collection.php" hash="8c69337dee2f64516174e59805c6ec83"/></dir><file name="Recsins.php" hash="57256b85a9e1279e0875ea50cf8325d4"/></dir><file name="NewFile.xml" hash="93286b7fccf6f6092628ada8b85c0727"/><file name="Observer.php" hash="6c0ff3f353947cda424057117c5ba530"/><file name="Order.php" hash="b8dcb3adfe676725fe4f09acff84cd97"/><file name="OrderProduct.php" hash="1d33e879db0bb8557704ed3b66fb584d"/><file name="Product.php" hash="222db5151109eb9e6741cc1fe0d1ba7f"/><file name="Recommender.php" hash="12532b4efd6fdec560522a2ecf029ed9"/><file name="Recsins.php" hash="1a4d3ff6a94336a08a709f925cf0579c"/><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><dir name="Recommender"><file name="Collection.php" hash="6c36324bb84cba28f6a5bdb7eb0c2bce"/></dir><file name="Recommender.php" hash="f6857e56874c6480447b5c411aa7a066"/></dir></dir><file name="Setup.php" hash="02af74b02e083c4552762ecc9987a1a7"/><file name=".DS_Store" hash="543d39b6548d08343f3e54a5e2946d80"/></dir><file name="Status.php" hash="e3f1a39141d7a4aaa99252937f60ca8d"/><file name="User.php" hash="3244421d7331e5167e910f6fc3827361"/><file name=".DS_Store" hash="eb3f0e1b63168181a3c0a74df3d19df5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RecsinsController.php" hash="8c39d102612421ca0d7e584d00b7ef4f"/></dir><file name="IndexController.php" hash="f111c628424a8e5fb0b8b883b9fc72c5"/><file name=".DS_Store" hash="0047fe0bc161a58c6088a4e959de43a4"/></dir><dir name="etc"><file name="api.xml" hash="c82c8df487ba808a8851ea9f1a8fe197"/><file name="config.xml" hash="00bb9a4058be1798f9e463dd7d10f4e5"/><file name="widget.xml" hash="c4f1829fa161f1119d817b64878f3b2f"/></dir><dir name="sql"><dir name="recsins_setup"><file name="mysql4-install-1.4.0.php" hash="33ae9091e3066779c13e738beae3650c"/><file name="mysql4-upgrade-1.4.0-1.4.1.php" hash="b636f16be2575bff013c14c012b34625"/><file name="mysql4-upgrade-1.4.1-1.4.2.php" hash="e73c5189c851c1ddb94d8ce8acd6f1a6"/><file name="mysql4-upgrade-1.4.2-1.4.3.php" hash="2297a4e5670b28a24c1fcd3d5d47aca6"/><file name="mysql4-upgrade-1.4.3-1.4.4.php" hash="6c76f6d7ffe9da72ebabd44779d13bde"/><file name="mysql4-upgrade-1.4.4-1.4.5.php" hash="1b932c2afb4543c6e067a7b769d48eb8"/><file name="mysql4-upgrade-1.4.5-1.4.6.php" hash="a851ccc0fa73440b74828c0b2ee993d9"/><file name="mysql4-upgrade-1.4.6-1.4.7.php" hash="923d491257ad9836738c1586d494e12c"/><file name="mysql4-upgrade-1.4.7-1.4.8.php" hash="a2c96553909227f5f5bd7a685691c0ac"/><file name="mysql4-upgrade-1.4.8-1.4.9.php" hash="86b6da79f302790ecb6a072c4ef68fb0"/><file name="mysql4-upgrade-1.4.9-1.5.0.php" hash="b10dd9d0dc951f3b783da743558af5ca"/><file name="mysql4-upgrade-1.5.0-1.5.1.php" hash="7f86ed73d2d35dd2989528046772fa8b"/><file name="mysql4-upgrade-1.5.1-1.5.2.php" hash="da8251355aa4811a099e5b22c9debca3"/><file name="mysql4-upgrade-1.5.2-1.5.3.php" hash="5ad2385bec084bc29a0673ed2a97231c"/><file name="mysql4-upgrade-1.5.3-1.5.4.php" hash="bda831da9d0a842c16092e1900d17087"/><file name="mysql4-upgrade-1.5.4-1.5.5.php" hash="b04a5a6ea7a5ec0df04a42953bb97729"/><file name="mysql4-upgrade-1.5.5-1.5.6.php" hash="cd94c569ee573f51e3e6062cfa25cb7e"/><file name="mysql4-upgrade-1.5.6-1.5.7.php" hash="f724855eebffa49ad0cad4d0205542a7"/><file name="mysql4-upgrade-1.5.7-1.5.8.php" hash="86df5a8f3c858d4c1b29f67e28e9c2fc"/><file name="mysql4-upgrade-1.5.8-1.5.9.php" hash="823f2a9313beb4255ff6892ec8ab48c5"/><file name="mysql4-upgrade-1.5.9-1.6.0.php" hash="5e62474155c33938ada4f71a89b5e862"/><file name="mysql4-upgrade-1.6.0-1.6.1.php" hash="bcb7d8252a7f46dbf967283ae8d5819e"/><file name="mysql4-upgrade-1.6.1-1.6.2.php" hash="2f305a4413548147ce51e20b6e4163ac"/><file name="mysql4-upgrade-1.6.2-1.6.3.php" hash="e65b0f8b048932d97fdabb62b1a92557"/><file name="mysql4-upgrade-1.6.3-1.6.4.php" hash="9ea38b7fe95b3ca7ca2b2c7bd2391822"/></dir></dir><file name=".DS_Store" hash="ec572d2af92dd05fb67f970d531163cd"/></dir><file name=".DS_Store" hash="8432a930c41259d8cdd9990c2540f153"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="recsins.xml" hash="c2608f0c7f9f6efcbeb74bd5b1427206"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="recsins"><file name="cart.phtml" hash="04ee1833a0177a83644e4d1f3211c789"/><file name="category.phtml" hash="1979377cb8f06740a6b44a922e46dacd"/><file name="product.phtml" hash="3a623d6b48cceae14912b4daf5113ca2"/><file name="recsins.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name=".DS_Store" hash="f0948e76df06a209a9b7f51ff398fd60"/></dir></dir><dir name="layout"><file name="recsins.xml" hash="9185dc1897ec93c400edd2cd95b6533d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Brainsins_Recsins.xml" hash="54e1c94137477548911c4ebce7eb97fe"/></dir></target><target name="magelocale"><dir name="es_ES"><file name="Brainsins_Recsins.csv" hash="d99f88234cc136cd17db8d01988a9869"/></dir><dir name="en_US"><file name="Brainsins_Recsins.csv" hash="be1695a4f553aec7754fdcc02417b16c"/></dir></target></contents>
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
31 |
</package>
|