Last active
December 21, 2015 19:19
-
-
Save vchub/6353443 to your computer and use it in GitHub Desktop.
Revisions
-
vchub revised this gist
Sep 4, 2013 . 2 changed files with 13 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ _gravity.push({type : 'recommendation', callback: callback_fn, numberLimit: 4, scenarioId: "CATEGORY_PAGE", currentItemId: "xxx", itemOnPage: [], // [] of itemIds already displayed on the page resultNames: ["itemId"], // фильтр по категории // т.е. мы хотим получить реко на товары из категории 1 categoryId: "1" }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ // Example of adding REC_CLICK event handling to reco-box // Just an idea, not suggestion for implementation -
vchub revised this gist
Aug 27, 2013 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,22 @@ // Example of adding REC_CLICK event handling to reco-box // Just an idea, not suggestion for implementation var i = 0; $("t20_goods_block").each(function(){ $(this).mousedown(function(){ _gravity = _gravity || []; _gravity.push({ type: 'event', eventType: 'REC_CLICK', // result is data received in recommendation request // for own reco-boxes that don't use gravity, a fixed value is used // e.g. recommendationId: "OWN_ITEM_PAGE", recommendationId: result.recommendationId, itemId: result.items[i].itemid, }); }); i++; }); -
vchub revised this gist
Aug 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ var i = 0; $(".t20_goods_block").each(function(){ $(this).mousedown(function(){ _gravity = _gravity || []; _gravity.push({ -
vchub revised this gist
Aug 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ var i = 0; $("t20_goods_block").each(function(){ $(this).mousedown(function(){ _gravity = _gravity || []; _gravity.push({ -
vchub created this gist
Aug 27, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ var i = 0; $("t20_goods_block a").each(function(){ $(this).mousedown(function(){ _gravity = _gravity || []; _gravity.push({ type: 'event', eventType: 'REC_CLICK', // result is data received in recommendation request // for own reco-boxes that don't use gravity, a fixed value is used // i.e.: // recommendationId: "komus", recommendationId: result.recommendationId, itemId: result.items[i].itemid, }); }); i++; });