Version Notes
Improved support for multi-currncy and multi-store sites.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Brainsins_Recommender |
Version | 1.5.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.2
- app/code/community/Brainsins/Recsins/Block/Recsins.php +4 -6
- app/code/community/Brainsins/Recsins/Model/Api/Api.php +5 -0
- app/code/community/Brainsins/Recsins/etc/api.xml +5 -0
- app/code/community/Brainsins/Recsins/etc/config.xml +1 -1
- app/code/community/Brainsins/Recsins/sql/recsins_setup/mysql4-upgrade-1.5.1-1.5.2.php +47 -0
- package.xml +5 -5
app/code/community/Brainsins/Recsins/Block/Recsins.php
CHANGED
@@ -397,7 +397,8 @@ class Brainsins_Recsins_Block_Recsins extends Mage_Core_Block_Abstract {
|
|
397 |
|
398 |
$currencySymbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
|
399 |
$currencyJs = "";
|
400 |
-
|
|
|
401 |
|
402 |
if ($currencySymbol == "$") {
|
403 |
$currencyJs .= "BrainSINSRecommender.setCurrencySymbol( BrainSINS.RecommenderConstants.dollar );" . PHP_EOL;
|
@@ -408,11 +409,7 @@ class Brainsins_Recsins_Block_Recsins extends Mage_Core_Block_Abstract {
|
|
408 |
$currencyJs .= "BrainSINSRecommender.setCurrencySymbolPosition( BrainSINS.RecommenderConstants.leftPosition );" . PHP_EOL;
|
409 |
$currencyJs .= "BrainSINSRecommender.setCurrencyDelimiter( '.' );" . PHP_EOL;
|
410 |
}
|
411 |
-
|
412 |
-
|
413 |
|
414 |
-
|
415 |
-
|
416 |
if ($placeKey == 'brainsins/BS_HOME_RECOMMENDER') {
|
417 |
$paintCallback = "typeof bsPaintHomeRecommendations == 'undefined' ? null : bsPaintHomeRecommendations";
|
418 |
} elseif ($placeKey == 'brainsins/BS_PRODUCT_RECOMMENDER') {
|
@@ -438,10 +435,11 @@ class Brainsins_Recsins_Block_Recsins extends Mage_Core_Block_Abstract {
|
|
438 |
$script .= '
|
439 |
<script type="text/javascript">
|
440 |
try{
|
|
|
441 |
var BrainSINSRecommender = BrainSINS.getRecommender( BrainSINSTracker );
|
442 |
' . $filter . '
|
443 |
' . $currencyJs . '
|
444 |
-
BrainSINSRecommender.loadWidget("' . $recommenderId . '",' . $prodId . ',"' .
|
445 |
}catch(err) { }
|
446 |
</script>
|
447 |
';
|
397 |
|
398 |
$currencySymbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
|
399 |
$currencyJs = "";
|
400 |
+
$currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
401 |
+
$langCode = Mage::app()->getStore()->getCode() . $currencyCode;
|
402 |
|
403 |
if ($currencySymbol == "$") {
|
404 |
$currencyJs .= "BrainSINSRecommender.setCurrencySymbol( BrainSINS.RecommenderConstants.dollar );" . PHP_EOL;
|
409 |
$currencyJs .= "BrainSINSRecommender.setCurrencySymbolPosition( BrainSINS.RecommenderConstants.leftPosition );" . PHP_EOL;
|
410 |
$currencyJs .= "BrainSINSRecommender.setCurrencyDelimiter( '.' );" . PHP_EOL;
|
411 |
}
|
|
|
|
|
412 |
|
|
|
|
|
413 |
if ($placeKey == 'brainsins/BS_HOME_RECOMMENDER') {
|
414 |
$paintCallback = "typeof bsPaintHomeRecommendations == 'undefined' ? null : bsPaintHomeRecommendations";
|
415 |
} elseif ($placeKey == 'brainsins/BS_PRODUCT_RECOMMENDER') {
|
435 |
$script .= '
|
436 |
<script type="text/javascript">
|
437 |
try{
|
438 |
+
BrainSINSTracker.setCustomAttribute("currencySymbol", "' . $currencySymbol . '");
|
439 |
var BrainSINSRecommender = BrainSINS.getRecommender( BrainSINSTracker );
|
440 |
' . $filter . '
|
441 |
' . $currencyJs . '
|
442 |
+
BrainSINSRecommender.loadWidget("' . $recommenderId . '",' . $prodId . ',"' . $langCode . '","' . $divId . '",' . $userId . ',' . $paintCallback . ');
|
443 |
}catch(err) { }
|
444 |
</script>
|
445 |
';
|
app/code/community/Brainsins/Recsins/Model/Api/Api.php
CHANGED
@@ -38,6 +38,11 @@ class Brainsins_Recsins_Model_Api_Api extends Mage_Api_Model_Resource_Abstract {
|
|
38 |
}
|
39 |
return $result;
|
40 |
}
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
public function productInfo($productId, $store = null, $options = array(), $filter = array()) {
|
43 |
|
38 |
}
|
39 |
return $result;
|
40 |
}
|
41 |
+
|
42 |
+
public function currencyList() {
|
43 |
+
$currencies = Mage::app()->getStore()->getAvailableCurrencyCodes(true);
|
44 |
+
return $currencies;
|
45 |
+
}
|
46 |
|
47 |
public function productInfo($productId, $store = null, $options = array(), $filter = array()) {
|
48 |
|
app/code/community/Brainsins/Recsins/etc/api.xml
CHANGED
@@ -16,6 +16,11 @@
|
|
16 |
<method>storeList</method>
|
17 |
<acl>catalog/product</acl>
|
18 |
</storeList>
|
|
|
|
|
|
|
|
|
|
|
19 |
<productInfo translate="title" module="brainsins_recsins">
|
20 |
<title>get product info</title>
|
21 |
<method>productInfo</method>
|
16 |
<method>storeList</method>
|
17 |
<acl>catalog/product</acl>
|
18 |
</storeList>
|
19 |
+
<currencyList translate="title" module="brainsins_recsins">
|
20 |
+
<title>get all the currencies</title>
|
21 |
+
<method>currencyList</method>
|
22 |
+
<acl>catalog/product</acl>
|
23 |
+
</currencyList>
|
24 |
<productInfo translate="title" module="brainsins_recsins">
|
25 |
<title>get product info</title>
|
26 |
<method>productInfo</method>
|
app/code/community/Brainsins/Recsins/etc/config.xml
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
<config>
|
27 |
<modules>
|
28 |
<Brainsins_Recsins>
|
29 |
-
<version>1.5.
|
30 |
</Brainsins_Recsins>
|
31 |
</modules>
|
32 |
<frontend>
|
26 |
<config>
|
27 |
<modules>
|
28 |
<Brainsins_Recsins>
|
29 |
+
<version>1.5.2</version>
|
30 |
</Brainsins_Recsins>
|
31 |
</modules>
|
32 |
<frontend>
|
app/code/community/Brainsins/Recsins/sql/recsins_setup/mysql4-upgrade-1.5.1-1.5.2.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.5.2');
|
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.5.
|
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,11 +19,11 @@ 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>
|
23 |
<authors><author><name>BrainSINS</name><user>auto-converted</user><email>alejandro.cuevas@brainsins.com</email></author></authors>
|
24 |
-
<date>2012-
|
25 |
-
<time>
|
26 |
-
<contents><target name="magecommunity"><dir name="Brainsins"><dir name="Recsins"><dir name="Block"><dir name="Adminhtml"><dir name="Recsins"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="f50e327073f6db6f0b7aaf2e6018834b"/><file name=".DS_Store" hash="47ab7c6331c785f3abe32e1d49659743"/></dir><file name="Form.php" hash="a756ab6cd49dbab82e1b5f3c28fcacdd"/><file name="Tabs.php" hash="da7477ceefd6cc473fb2fb2a307f0282"/><file name=".DS_Store" hash="dbfd4b859fae44d226584cc0de499414"/></dir><file name="Edit.php" hash="942d16b49fca2566799c7c393ffdd4d2"/><file name="Grid.php" hash="bf34a0c320aeebfe1cc645dc4120b4aa"/><file name=".DS_Store" hash="550ce861437446e70bb1b83296032d36"/></dir><file name="Recsins.php" hash="f0bb580c8238818273726847917789f8"/><file name=".DS_Store" hash="1b0ef8c354534e8683bfa107de6b5724"/></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="
|
27 |
<compatible/>
|
28 |
<dependencies/>
|
29 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Brainsins_Recommender</name>
|
4 |
+
<version>1.5.2</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>Improved support for multi-currncy and multi-store sites.</notes>
|
23 |
<authors><author><name>BrainSINS</name><user>auto-converted</user><email>alejandro.cuevas@brainsins.com</email></author></authors>
|
24 |
+
<date>2012-06-19</date>
|
25 |
+
<time>08:45:12</time>
|
26 |
+
<contents><target name="magecommunity"><dir name="Brainsins"><dir name="Recsins"><dir name="Block"><dir name="Adminhtml"><dir name="Recsins"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="f50e327073f6db6f0b7aaf2e6018834b"/><file name=".DS_Store" hash="47ab7c6331c785f3abe32e1d49659743"/></dir><file name="Form.php" hash="a756ab6cd49dbab82e1b5f3c28fcacdd"/><file name="Tabs.php" hash="da7477ceefd6cc473fb2fb2a307f0282"/><file name=".DS_Store" hash="dbfd4b859fae44d226584cc0de499414"/></dir><file name="Edit.php" hash="942d16b49fca2566799c7c393ffdd4d2"/><file name="Grid.php" hash="bf34a0c320aeebfe1cc645dc4120b4aa"/><file name=".DS_Store" hash="550ce861437446e70bb1b83296032d36"/></dir><file name="Recsins.php" hash="f0bb580c8238818273726847917789f8"/><file name=".DS_Store" hash="1b0ef8c354534e8683bfa107de6b5724"/></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="5d05e62a5c5c782ae83d51eda38e4253"/><file name=".DS_Store" hash="685d9658140adde8787312ba21575a63"/><file name=".LCKRecsins.php~" hash="ed46e9b84acaa2b3b33539877109417b"/></dir><dir name="Entity"><file name="Setup.php" hash="02af74b02e083c4552762ecc9987a1a7"/><file name=".DS_Store" hash="904a17b2e133ff00bc1c75992115b463"/></dir><dir name="Helper"><file name="Data.php" hash="c117b4e42fef671651a78c8f4e01d0e5"/><file name="Recsins.php" hash="435d1402b9b860d906db3a3beb3c93de"/><file name=".DS_Store" hash="c9075ec8f3a93c790032a41253f0410d"/></dir><dir name="Model"><dir name="Api"><dir name="ficheros"><file name="Api.php" hash="1ee860dbae5f6b13258a0d0645d5adf8"/><file name="ProductsApi.php" hash="935bed7774eabfeda9949810faa116b0"/><file name=".DS_Store" hash="014af3b68e1d3b96ec61219fe428ff22"/></dir><file name="Api.php" hash="0fbdc82b29aaa90ecf3a4c0da9b15e7d"/><file name="ProductsApi.php" hash="935bed7774eabfeda9949810faa116b0"/><file name="ficheros.zip" hash="aa99d1feccadf91c4e467075feb1a875"/><file name=".DS_Store" hash="ef6c115a2d11276a7d6f63bf02593722"/></dir><dir name="Mysql4"><dir name="Recsins"><file name="Collection.php" hash="8c69337dee2f64516174e59805c6ec83"/></dir><file name="Recsins.php" hash="57256b85a9e1279e0875ea50cf8325d4"/></dir><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"/></dir><file name="Cart.php" hash="d19925676d18f200f25b1c995f035300"/><file name="CartProduct.php" hash="fffddbe0a759335f89bbdbcec7b4d2eb"/><file name="Client.php" hash="29409d73f52481b78d68d2ad5b00998a"/><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="4d9b501cd6f3d4d454072f92e295b243"/><file name="Recsins_1.php" hash="310a9b224478749d35c5b59689ce1a07"/><file name="Status.php" hash="e3f1a39141d7a4aaa99252937f60ca8d"/><file name="User.php" hash="3244421d7331e5167e910f6fc3827361"/><file name=".DS_Store" hash="38ab06fd4b2c309496651dcb1f870251"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RecsinsController.php" hash="1c300e7678664231438a647ec30551db"/><file name=".DS_Store" hash="eb69d7bfb18ebe8966b63ac54b04d1c0"/></dir><file name="IndexController.php" hash="2c9f228ed4e43c347235ed327365a219"/><file name=".DS_Store" hash="b415ad11c2cfebb78e16adb17ca06bff"/></dir><dir name="etc"><file name="api.xml" hash="c82c8df487ba808a8851ea9f1a8fe197"/><file name="config.xml" hash="81f9445be76efd607e65d35ae0c34f4d"/><file name="widget.xml" hash="c4f1829fa161f1119d817b64878f3b2f"/><file name=".DS_Store" hash="05e296fc2705958a70855fe260ceb9e5"/></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=".DS_Store" hash="70fb1641ce88fc5fdb410744cb098089"/></dir><file name=".DS_Store" hash="fd4b270e5bdf8c2dbe56c9a98d4e6548"/></dir><file name="COPYING.txt" hash="4fe869ee987a340198fb0d54c55c47f1"/><file name="brainsins.js.js" hash="0ac34f45d12fd10332c812a8ea0702a5"/><file name=".DS_Store" hash="f65b37583bff29e0dec778d1dfe568ae"/></dir><file name=".DS_Store" hash="5bd3a9f57171f07c4687a7dd2595965c"/></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="7f731ae9e9faa8b003a63722ef3ce18a"/></dir><dir name="en_US"><file name="Brainsins_Recsins.csv" hash="6381582be5edc31cba54a052bb48b86d"/></dir></target></contents>
|
27 |
<compatible/>
|
28 |
<dependencies/>
|
29 |
</package>
|