Version Notes
Optimisation on universal variable
Download this release
Release Info
Developer | nToklo |
Extension | ntoklo_recommendations |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
app/code/community/Ntoklo/Recommendations/Helper/Data.php
CHANGED
@@ -248,7 +248,7 @@ class Ntoklo_Recommendations_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
248 |
'action' => Mage::helper('ntoklo_recommendations')->getEventType($this->getPageCategory())
|
249 |
));
|
250 |
|
251 |
-
|
252 |
|
253 |
$tracker_id = Mage::helper('ntoklo_recommendations')->getTrackerId();
|
254 |
// Recommendation click events
|
@@ -452,15 +452,10 @@ class Ntoklo_Recommendations_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
452 |
$object->setProperties(array('category' => strtolower($category)));
|
453 |
}else{
|
454 |
|
455 |
-
$categoryNames = array();
|
456 |
if ($categories = $product->getCategoryIds()) {
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
}
|
461 |
-
|
462 |
-
if (!empty($categoryNames)) {
|
463 |
-
$object->setProperties(array('category' => end($categoryNames)));
|
464 |
}
|
465 |
}
|
466 |
|
@@ -476,6 +471,7 @@ class Ntoklo_Recommendations_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
476 |
public function getUvMapBasket() {
|
477 |
|
478 |
$cart = Mage::getSingleton('checkout/session');
|
|
|
479 |
if ($this->getPageCategory() == self::PAGE_CATEGORY_CHECKOUT) {
|
480 |
$cart = Mage::getSingleton('checkout/session');
|
481 |
}
|
@@ -521,9 +517,10 @@ class Ntoklo_Recommendations_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
521 |
private function _getUvMapLineItems($items) {
|
522 |
|
523 |
$object = array();
|
|
|
524 |
foreach ($items as $item) {
|
525 |
array_push($object, new Ntoklo_Recommendations_Model_UniversalVariable(array(
|
526 |
-
'product' => $this->getUvMapProduct(
|
527 |
'subtotal' => (float) $item->getRowTotalInclTax(),
|
528 |
'total_discount' => (float) $item->getDiscountAmount(),
|
529 |
'quantity' => ($this->getPageCategory() == self::PAGE_CATEGORY_CONFIRMATION) ? (float)$item->getQtyOrdered() : (float)$item->getQty(),
|
248 |
'action' => Mage::helper('ntoklo_recommendations')->getEventType($this->getPageCategory())
|
249 |
));
|
250 |
|
251 |
+
array_push($object, $item);
|
252 |
|
253 |
$tracker_id = Mage::helper('ntoklo_recommendations')->getTrackerId();
|
254 |
// Recommendation click events
|
452 |
$object->setProperties(array('category' => strtolower($category)));
|
453 |
}else{
|
454 |
|
|
|
455 |
if ($categories = $product->getCategoryIds()) {
|
456 |
+
$categoryId = end($categories);
|
457 |
+
$categoryNames = strtolower(Mage::getModel('catalog/category')->load($categoryId)->getName());
|
458 |
+
$object->setProperties(array('category' => $categoryNames));
|
|
|
|
|
|
|
|
|
459 |
}
|
460 |
}
|
461 |
|
471 |
public function getUvMapBasket() {
|
472 |
|
473 |
$cart = Mage::getSingleton('checkout/session');
|
474 |
+
|
475 |
if ($this->getPageCategory() == self::PAGE_CATEGORY_CHECKOUT) {
|
476 |
$cart = Mage::getSingleton('checkout/session');
|
477 |
}
|
517 |
private function _getUvMapLineItems($items) {
|
518 |
|
519 |
$object = array();
|
520 |
+
|
521 |
foreach ($items as $item) {
|
522 |
array_push($object, new Ntoklo_Recommendations_Model_UniversalVariable(array(
|
523 |
+
'product' => $this->getUvMapProduct($item->getProduct()),
|
524 |
'subtotal' => (float) $item->getRowTotalInclTax(),
|
525 |
'total_discount' => (float) $item->getDiscountAmount(),
|
526 |
'quantity' => ($this->getPageCategory() == self::PAGE_CATEGORY_CONFIRMATION) ? (float)$item->getQtyOrdered() : (float)$item->getQty(),
|
app/code/community/Ntoklo/Recommendations/etc/config.xml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
<config>
|
21 |
<modules>
|
22 |
<Ntoklo_Recommendations>
|
23 |
-
<version>1.1.
|
24 |
</Ntoklo_Recommendations>
|
25 |
</modules>
|
26 |
<global>
|
20 |
<config>
|
21 |
<modules>
|
22 |
<Ntoklo_Recommendations>
|
23 |
+
<version>1.1.3</version>
|
24 |
</Ntoklo_Recommendations>
|
25 |
</modules>
|
26 |
<global>
|
js/ntoklo/util.js
CHANGED
@@ -89,7 +89,7 @@ var Ntoklo = Class.create({
|
|
89 |
}
|
90 |
},
|
91 |
|
92 |
-
|
93 |
loadEvent: function() {
|
94 |
window.universal_variable = this.mergeUv();
|
95 |
this.submitUv();
|
89 |
}
|
90 |
},
|
91 |
|
92 |
+
|
93 |
loadEvent: function() {
|
94 |
window.universal_variable = this.mergeUv();
|
95 |
this.submitUv();
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ntoklo_recommendations</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/OSL-3.0">open sofetware license</license>
|
7 |
<channel>community</channel>
|
@@ -11,14 +11,11 @@
|
|
11 |
2. Uses the Open Data Alliance Universal Variable - Generats UniversalVariable JSON object and submits it to nToklo for processing to leverage user behaviour.
|
12 |
3. Utilises native widgets to render personalised product recommendations and trending product charts through nToklo API’s.
|
13 |
4. Integrates with your store CMS to account for product categories</description>
|
14 |
-
<notes>
|
15 |
-
Recommendation displaying on category pages
|
16 |
-
New style to recommendation.
|
17 |
-
</notes>
|
18 |
<authors><author><name>nToklo</name><user>nToklo</user><email>fu.hoang@ntoklo.com</email></author></authors>
|
19 |
-
<date>2015-01-
|
20 |
-
<time>
|
21 |
-
<contents><target name="magecommunity"><dir name="Ntoklo"><dir name="Recommendations"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Registration.php" hash="6454d0327fb5881aba96beaed86005ac"/></dir></dir></dir></dir><dir name="Widget"><dir name="Date"><file name="Helper.php" hash="29592c951ce694efb69397141a679226"/></dir><dir name="Type"><file name="Helper.php" hash="af54dfb2a4dd16295484e2f07ba0df6c"/></dir></dir></dir><file name="Chart.php" hash="d361ab19d9781fb12ace06e0b1df1f15"/><file name="UniversalVariable.php" hash="5d152104f7b251062ce9827ad05945cc"/></dir><dir name="Helper"><file name="Data.php" hash="
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ntoklo_recommendations</name>
|
4 |
+
<version>1.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/OSL-3.0">open sofetware license</license>
|
7 |
<channel>community</channel>
|
11 |
2. Uses the Open Data Alliance Universal Variable - Generats UniversalVariable JSON object and submits it to nToklo for processing to leverage user behaviour.
|
12 |
3. Utilises native widgets to render personalised product recommendations and trending product charts through nToklo API’s.
|
13 |
4. Integrates with your store CMS to account for product categories</description>
|
14 |
+
<notes>Optimisation on universal variable</notes>
|
|
|
|
|
|
|
15 |
<authors><author><name>nToklo</name><user>nToklo</user><email>fu.hoang@ntoklo.com</email></author></authors>
|
16 |
+
<date>2015-01-26</date>
|
17 |
+
<time>13:56:42</time>
|
18 |
+
<contents><target name="magecommunity"><dir name="Ntoklo"><dir name="Recommendations"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Registration.php" hash="6454d0327fb5881aba96beaed86005ac"/></dir></dir></dir></dir><dir name="Widget"><dir name="Date"><file name="Helper.php" hash="29592c951ce694efb69397141a679226"/></dir><dir name="Type"><file name="Helper.php" hash="af54dfb2a4dd16295484e2f07ba0df6c"/></dir></dir></dir><file name="Chart.php" hash="d361ab19d9781fb12ace06e0b1df1f15"/><file name="UniversalVariable.php" hash="5d152104f7b251062ce9827ad05945cc"/></dir><dir name="Helper"><file name="Data.php" hash="718eb5931043324bfc563591f06f957e"/></dir><dir name="Model"><dir name="Cache"><file name="UniversalVariable.php" hash="761f465d4fda0e3d48541fc67af5c4b1"/></dir><file name="Observer.php" hash="573f0925408a41f8e0b4032d45fbc301"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="c76b856838d10860a74c2ec08d47bc87"/></dir></dir><file name="Service.php" hash="b3069931305471dd87298c7023b6de70"/><file name="UniversalVariable.php" hash="7744caef59b5c3f056f89577c108e0f5"/><dir name="Widget"><file name="Color.php" hash="03dc0047eb5914c18e97b84e244077c3"/><file name="Type.php" hash="f399f8084a0c9c270c92e5fccd74e50f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="aff0945a94da77aab01ef814d14309d5"/><file name="cache.xml" hash="9be6ef2826f8e880e0c2db016787cacf"/><file name="config.xml" hash="a65f757ba5419fc654e50e5bfd91907f"/><file name="system.xml" hash="d90aad78d74273219bbeb6bd3b38e477"/><file name="widget.xml" hash="03208ca9c734ff7b9641e7501197c081"/></dir><dir name="sql"><dir name="ntoklo_setup"><file name="mysql4-install-1.0.7.php" hash="96c7c0734c5290210b09dbb96f5cfa34"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ntoklo_Recommendations.xml" hash="d809f1cc3329034ac5d3ffcc4fe40d4c"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ntoklo_recommendations.xml" hash="b6649abad9f507fdf0e7b48d11d9a594"/></dir><dir name="template"><dir name="ntoklo"><dir name="recommendations"><file name="universal_variable.phtml" hash="a825bae10ea9f4bd603fa233d2681f93"/><dir name="widget"><file name="chart_horisontal.phtml" hash="e3632d4b2bb366e6b9691a9098b8f0d0"/><file name="chart_review_short.phtml" hash="25a789e2e031e33e6e82fcd8fd73aa23"/><file name="chart_vertical.phtml" hash="2844c4746e3e5588770dce1ff2d00180"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="documentation"><file name="readme.html" hash="76a9aa7ea09fbb80af24ce340f498d13"/><dir name="skin"><dir><dir name="img"><file name="cc.png" hash="83f629e3f2c6e94df256a92a0d826079"/><file name="config.png" hash="a0f8540c37bbaa614a6e6818c52b9b1e"/><file name="disablec1.png" hash="3b7a509db5f2228c1187dd169c8a7c34"/><file name="disablec2.png" hash="ce25b484b08735a1890a4871eefd23ef"/><file name="logo.png" hash="5bbc2b3e56f571eb96923185485c3a27"/><file name="widgets_1.png" hash="61c6c6acc64e9bad49e2546d43032767"/><file name="widgets_2.png" hash="a357562e6cb535458c30f8a6c53bd44d"/><file name="widgets_3.png" hash="cc6ec6b496b03e516c29eb8ed63aa7a9"/><file name="widgets_4.png" hash="1feb96648e38c0e95629bf897baeb26b"/></dir></dir><file name="style.css" hash="f544a9e3edc200affa0a9be9af98e878"/></dir></dir><dir name="js"><dir name="ntoklo"><file name="util.js" hash="b863ded59e043b9b3f3a88a41efd867d"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="ntoklo"><file name="global.css" hash="7f19dc85e84f0aadcc46a3bc1d66314a"/><file name="widget.css" hash="7fc7256efc75e136b97b2ec8cb09cfd0"/></dir></dir></dir></dir></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
21 |
</package>
|