1window.ymCCount = window.ymCCount || 0; 2 3function agec_init_ordersteps(items){ 4 // console.log('agec_init_ordersteps', items); 5 6 var deliveryInputs = document.querySelectorAll("[name=DELIVERY_ID]"); 7 if(deliveryInputs.length){ 8 deliveryInputs.forEach(function(item){ 9 var clickItem = item.parentElement; 10 if(!clickItem.classList.contains('agec_init')){ 11 clickItem.classList.add('agec_init'); 12 13 BX.bind(clickItem, "click", function(){ 14 var deliveryID = this.querySelector('input').value; 15 16 BX.ajax.runAction('arturgolubev:ecommerce.Ajax.getDeliveryName', { 17 data: {'deliveryID': deliveryID} 18 }).then(function (response) { 19 var agec_add_shipping_info = {"shipping_tier": response.data.delivery_name, "items": items}; 20 gtag("event", "add_shipping_info", agec_add_shipping_info); 21 // console.log("EC cart: google - add_shipping_info", agec_add_shipping_info); 22 }, function (response) { 23 // console.log('arturgolubev.ecommerce Request Error', $response); 24 }); 25 }); 26 } 27 }); 28 } 29 30 // payment 31 var paymentInputs = document.querySelectorAll("[name=PAY_SYSTEM_ID]"); 32 if(paymentInputs.length){ 33 paymentInputs.forEach(function(item){ 34 var clickItem = item.parentElement; 35 if(!clickItem.classList.contains('agec_init')){ 36 clickItem.classList.add('agec_init'); 37 38 BX.bind(clickItem, "click", function(){ 39 var paymentID = this.querySelector('input').value; 40 41 BX.ajax.runAction('arturgolubev:ecommerce.Ajax.getPayName', { 42 data: {'paymentID': paymentID} 43 }).then(function (response) { 44 let agec_add_payment_info = {"payment_type": response.data.payment_name, "items": items}; 45 gtag("event", "add_payment_info", agec_add_payment_info); 46 // console.log("EC cart: google - add_payment_info", agec_add_payment_info); 47 }, function (response) { 48 // console.log('arturgolubev.ecommerce Request Error', $response); 49 }); 50 }); 51 } 52 }); 53 } 54} 55 56function ymChecker(callback, obj){ 57 if(obj == 'ym') 58 var work = (typeof ym == "undefined"); 59 else 60 var work = (typeof Ya == "undefined"); 61 62 if(work){ 63 window.ymCCount = window.ymCCount + 1; 64 if(window.ymCCount <= 30){ 65 setTimeout(function(){ 66 ymChecker(callback, obj); 67 }, 500); 68 } 69 }else{ 70 callback(); 71 } 72} 73 74function agec_ym_goal(goal, debug){ 75 ymChecker(function(){ 76 Ya._metrika.getCounters().forEach(function(el){ 77 ym(el.id, "reachGoal", goal); 78 79 if(debug){ 80 console.log('EC debug: ya send goal '+goal); 81 } 82 }); 83 }, 'ya'); 84}
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.