1/* 2 ×ת××שק×ת ×¢× ×¤×××©× - ×¦× ×§×××× ×. 3 ×פ××§×¡× ××ס××¡× ×××××¢ ×-_Pixels.cshtml (×××× 1), ×-PageView × ×©×× ××× ×ª×× ×ת ×× ×¤×¨× (×××× 5), 4 ×××¢× ××£ ××צר שש××× ViewContent ×××§×××. 5 ת××¢××: https://flashy.app/docs/installation-pixels/ 6*/ 7 8function flashyIsReady() { 9 return typeof (window.flashy) == "function"; 10} 11 12/* 13 ×××× ×××צר ×פ×××©× - ×××× ××××ת ××× ××××× ×©××§××××: productId_variationId 14*/ 15function flashyContentId(productId, variationId) { 16 return productId + "_" + variationId; 17} 18 19/* 20 ViewContent ×©× ×××ר××צ×× ×ר×ש×× × ××¢××× ×××צר. 21*/ 22function flashyViewContent() { 23 if (!flashyIsReady()) { 24 return; 25 } 26 var button = $(".single-product-add-to-cart[data-product-id][data-variation-id]").first(); 27 if ($(button).length == 0) { 28 return; 29 } 30 flashy('ViewContent', { 31 'content_ids': [flashyContentId($(button).attr("data-product-id"), $(button).attr("data-variation-id"))] 32 }); 33} 34 35/* 36 UpdateCart ×¢× ×× ×××צר×× ××× ××××ר×× ×©×ס×. 37*/ 38function flashyUpdateCart(contentIds, value) { 39 if (!flashyIsReady() || !contentIds) { 40 return; 41 } 42 try { 43 flashy('UpdateCart', { 44 'content_ids': contentIds, 45 'value': value * 1, 46 'currency': 'ILS' 47 }); 48 } 49 catch (ex) { } 50} 51 52/* 53 ת××× ××¡× ××××ר ×תש××ת ×-AJAX ×©× ×¤×¢×××ת ××¡× (××ספ×, ש×× ×× ×××ת, ×סר×), 54 ××× ××ס×× ×§×¨××ת רשת × ×ספת. 55*/ 56function flashyUpdateCartFromResponse(moreData) { 57 if (typeof (moreData) == "undefined" || typeof (moreData.flashyContentIds) == "undefined") { 58 return; 59 } 60 flashyUpdateCart(flashySplitIds(moreData.flashyContentIds), moreData.flashyValue); 61} 62 63/* 64 ×××£ ××¡× ×ª××× ××¡× × ×§×¨× ×ש×ר×ת ××××××, ××× ×§×¨××× ×שרת. 65*/ 66function flashyUpdateCartFromDom() { 67 var rows = $(".basket-row[data-prodid][data-variation]"); 68 if ($(rows).length == 0) { 69 return; 70 } 71 var contentIds = []; 72 var total = 0; 73 $(rows).each(function () { 74 var id = flashyContentId($(this).attr("data-prodid"), $(this).attr("data-variation")); 75 if (contentIds.indexOf(id) < 0) { 76 contentIds.push(id); 77 } 78 total += parseFloat($(this).attr("data-row-sum")) || 0; 79 }); 80 flashyUpdateCart(contentIds, total); 81} 82 83function flashySplitIds(ids) { 84 return (ids || "").split(",").filter(function (id) { return id != ""; }); 85} 86 87/* 88 Purchase - × ×©×× ×××ר ×§××ת ×ספר ××××× × ××שרת ×××¤× × ×תש×××. 89*/ 90function flashyPurchase(orderNumber, contentIds, value) { 91 if (!flashyIsReady() || !orderNumber) { 92 return; 93 } 94 try { 95 flashy('Purchase', { 96 'order_id': "" + orderNumber, 97 'content_ids': contentIds, 98 'value': value * 1, 99 'currency': 'ILS' 100 }); 101 } 102 catch (ex) { } 103} 104 105/* 106 צ××עת ×××§××. × ×©×× ××× ××£ ×××§×× ××××ר, ××× ××× ×××ר ר×ש×× ×× ×ת××ר×ת. 107*/ 108function flashySetCustomer(email) { 109 if (!flashyIsReady() || !email) { 110 return; 111 } 112 try { 113 flashy('setCustomer', { "email": email }); 114 } 115 catch (ex) { } 116}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.