1 2function clearLocalCart() { 3 var cartTotal = JSON.parse(localStorage.getItem('cartTotal')); 4 localStorage.removeItem('cartTotal'); 5 updateNoti('0'); 6} 7 8function getLocalCart() { 9 //get cart number 10 $.ajax({ 11 type: "POST", 12 url: "/ex_classes/ex_getCart.php", 13 dataType: "JSON", 14 data: { 15 company_id: "22232", 16 }, 17 success(data) { 18 //update your storage here 19 updateNoti(data.totalItem); 20 let totalItem = data.totalItem; 21 localStorage.setItem('cartTotal', JSON.stringify({ 22 totalItem 23 })); 24 } 25 }) 26} 27function numWithComma(a) { 28 return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 29} 30 31function setLocalCartItem(totalItem){ 32 localStorage.setItem('cartTotal', JSON.stringify({ 33 totalItem 34 })); 35}
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.