1$(document).ready(function () { 2 $(document.body).on("click", "a[id*='prodpopimgbtn']", function (event) { 3 var prodid = $(this).attr('id'); 4 prodid = prodid.replace('prodpopimgbtn', ''); 5 6 $.ajax({ 7 type: 'GET', 8 url: '/PackUtils/GetProduct', 9 data: { productid: prodid }, 10 contentType: "application/json; charset=utf-8", 11 dataType: "json", 12 success: function (data) { 13 var url = window.location.href; 14 15 if (url.indexOf('PackFavorites') >= 0) { 16 $('#addtopackfavbtn').hide(); 17 } 18 else { 19 $('#deletefromcartbtn').hide(); 20 } 21 22 $('#prodname').text(data.prodname); 23 $('#prodimg').attr("src", "https://www.packdala.com/images/thumbs/smallsize/webp/" + data.prodsku + ".webp"); 24 $('#prodprice').text(data.prodprice); 25 $('#popcartqty').val('1'); 26 $('#poppackprodid').text(prodid); 27 $('#stockqtyspan').text('Stock Qty(' + data.prodstkqty + ')'); 28 $('#productpop').show(); 29 }, 30 failure: function (response) { 31 32 }, 33 error: function (response) { 34 35 } 36 }); 37 event.preventDefault(); 38 }); 39 40 $(document.body).on("click", "a[id*='prodpopnmbtn']", function (event) { 41 var prodid = $(this).attr('id'); 42 prodid = prodid.replace('prodpopnmbtn', ''); 43 44 $.ajax({
45 type: 'GET', 46 url: '/PackUtils/GetProduct', 47 data: { productid: prodid }, 48 contentType: "application/json; charset=utf-8", 49 dataType: "json", 50 success: function (data) { 51 var url = window.location.href; 52 53 if (url.indexOf('PackFavorites') >= 0) { 54 $('#addtopackfavbtn').hide(); 55 } 56 else { 57 $('#deletefromcartbtn').hide(); 58 } 59 60 $('#prodname').text(data.prodname); 61 $('#prodimg').attr("src", "https://www.packdala.com/images/thumbs/smallsize/webp/" + data.prodsku + ".webp"); 62 $('#prodprice').text(data.prodprice); 63 $('#popcartqty').val('1'); 64 $('#poppackprodid').text(prodid); 65 $('#stockqtyspan').text('Stock Qty(' + data.prodstkqty + ')'); 66 $('#productpop').show(); 67 }, 68 failure: function (response) { 69 70 }, 71 error: function (response) { 72 73 } 74 }); 75 event.preventDefault(); 76 }); 77 78 $(document.body).on("click", "#closeprodpop", function (event) { 79 $('#productpop').hide(); 80 event.preventDefault(); 81 }); 82 83 $(document.body).off("click", "#addtopackcartbtn").on("click", "#addtopackcartbtn", function (event) { 84 var prodid = $('#poppackprodid').text(); 85 var qty = $('#popcartqty').val(); 86 var price = $('#prodprice').text(); 87 88 $.ajax({
89 type: 'POST', 90 url: '/PackUtils/AddToCart?productid=' + prodid + "&quantity=" + qty + "&price=" + price + "&carttype=1&sessionid=0", 91 contentType: "application/json; charset=utf-8", 92 data: '', 93 dataType: "json", 94 success: function (data) { 95 if (data.result == 'notlogged') 96 alert('User is not logged in'); 97 else 98 $('#productpop').hide(); 99 }, 100 failure: function (response) { 101 102 }, 103 error: function (response) { 104 105 } 106 }); 107 event.preventDefault(); 108 }); 109 110 $(document.body).off("click", "#addtopackfavbtn").on("click", "#addtopackfavbtn", function (event) { 111 var prodid = $('#poppackprodid').text(); 112 var qty = $('#popcartqty').val(); 113 var price = $('#prodprice').text(); 114 115 $.ajax({ 116 type: 'POST', 117 url: '/PackUtils/AddToCart?productid=' + prodid + "&quantity=" + qty + "&price=" + price + "&carttype=2&sessionid=0", 118 contentType: "application/json; charset=utf-8", 119 data: '', 120 dataType: "json", 121 success: function (data) { 122 if (data.result == 'notlogged') 123 alert('User is not logged in'); 124 else 125 $('#productpop').hide(); 126 }, 127 failure: function (response) { 128 129 }, 130 error: function (response) { 131 132 } 133 }); 134 event.preventDefault(); 135 }); 136 137 $(document.body).off("click", "#deletefromcartbtn").on("click", "#deletefromcartbtn", function (event) { 138 var prodid = $('#poppackprodid').text(); 139 var qty = $('#popcartqty').val(); 140 var price = $('#prodprice').text(); 141 142 $.ajax({
143 type: 'POST', 144 url: '/PackUtils/RemoveFavorites?productid=' + prodid, 145 contentType: "application/json; charset=utf-8", 146 data: '', 147 dataType: "json", 148 success: function (data) { 149 $('#productpop').hide(); 150 151 window.location = '/PackFavorites'; 152 }, 153 failure: function (response) { 154 155 }, 156 error: function (response) { 157 158 } 159 }); 160 event.preventDefault(); 161 }); 162 163 $('a[id*="popplusbtn"]').on('click', function (event) { 164 var tmpqty = parseInt($('#popcartqty').val()); 165 tmpqty = tmpqty + 1; 166 $('#popcartqty').val(tmpqty) 167 event.preventDefault(); 168 }); 169 170 $('a[id*="popminusbtn"]').on('click', function (event) { 171 var tmpqty = parseInt($('#popcartqty').val()); 172 if (tmpqty <= 1) 173 tmpqty = 1; 174 else 175 tmpqty = tmpqty - 1; 176 177 $('#popcartqty').val(tmpqty) 178 event.preventDefault(); 179 }); 180 181 $('a[id*="sipopplusbtn"]').on('click', function (event) { 182 var tmpqty = parseInt($('#sipopcartqty').val()); 183 tmpqty = tmpqty + 1; 184 $('#sipopcartqty').val(tmpqty) 185 event.preventDefault(); 186 }); 187 188 $('a[id*="sipopminusbtn"]').on('click', function (event) { 189 var tmpqty = parseInt($('#sipopcartqty').val()); 190 if (tmpqty <= 1) 191 tmpqty = 1; 192 else 193 tmpqty = tmpqty - 1; 194 195 $('#sipopcartqty').val(tmpqty) 196 event.preventDefault(); 197 }); 198 199 //$('body').click(function (event) { 200 // // find the object on which the click event occured 201 // var $target = $(event.target); 202 203 // var tid = $target.prop('id'); 204 205 // if ($target.is("img") || $target.is("input") || $target.is("textarea") || $target.is("label") || 206 // $target.is("select") || $target.is("a") || $target.is("span") || $target.is("div")) { 207 // return; 208 // } 209 210 // if (tid != "productdatapop") 211 // $('#productpop').hide(); 212 213 // event.preventDefault(); 214 //}); 215});
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.