Каталог файловtilda-cart-1.1.js
2301 productInCart['price'] == productObj['price'] &&2302 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)2303 // @ts-expect-error ST-2949_12304 productInCart.portion == productObj.portion &&2305 // @ts-expect-error ST-2949_12306 productInCart.single == productObj.single2307 ) {2308 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)2309 // @ts-expect-error ST-2949_22310 if (typeof productInCart['options'] == 'object' && typeof productObj['options'] == 'object') {2311
История файла и сравнение версий
Array.prototype.forEach.call(productInCart['options'], function (option, index) {
2312 // @ts-expect-error ST-2949_2 2313 if (typeof option == 'object' && typeof productObj['options'][index] == 'object') { 2315 // @ts-expect-error ST-2949_2 2316 option['option'] !== productObj['options'][index]['option'] || 2317 // @ts-expect-error ST-2949_2 2318 option['variant'] !== productObj['options'][index]['variant'] || 2319 // @ts-expect-error ST-2949_2 2320 option['price'] !== productObj['options'][index]['price'] 2322 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 2323 // @ts-expect-error ST-2949_5 2324 return (isEqualOptions = false); 2326 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2327 // @ts-expect-error ST-2949_2 2328 } else if (option === undefined || productObj['options'][index] === undefined) { 2329 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) 2330 // @ts-expect-error ST-2949_5 2331 return (isEqualOptions = false); 2337 if (t_cart__isSameProduct(productInCart, productObj)) { 2338 isSameProduct = 'y'; 2339 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2340 // @ts-expect-error ST-2949_2 2341 } else if (productInCart['uid'] && productObj['uid'] && productInCart['uid'] === productObj['uid']) { 2342 productDataNeedsToBeUpdated = true; 2344 // @ts-expect-error ST-2949_2 2345 inv = parseInt(productObj['inv'], 10); 2346 // @ts-expect-error ST-2949_2 2347 quantityInCart = parseInt(window.tcart['products'][index]['quantity'], 10); 2348 if (quantityInCart === inv) { 2349 alert(tcart_dict('limitReached')); 2351 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2352 // @ts-expect-error ST-2949_2 2353 window.tcart['products'][index]['quantity']++; 2357 if (isEqualOptions === 'y' && isSameProduct === 'y') { 2358 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2359 // @ts-expect-error ST-2949_2 2360 inv = parseInt(productObj['inv'], 10); 2361 // @ts-expect-error ST-2949_2 2362 quantity = parseInt(productObj['quantity'], 10); 2363 // @ts-expect-error ST-2949_2 2364 quantityInCart = parseInt(window.tcart['products'][index]['quantity'], 10); 2366 if (quantityInCart === inv) { 2367 alert(tcart_dict('limitReached')); 2372 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2373 // @ts-expect-error ST-2949_2 2374 if (productObj['quantity'] !== undefined) { 2375 if (quantityInCart + quantity > inv) { 2376 alert(tcart_dict('limitReached')); 2378 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2379 // @ts-expect-error ST-2949_2 2380 window.tcart['products'][index]['quantity'] = inv; 2382 // @ts-expect-error ST-2949_2 2383 newQuantity = parseInt(window.tcart['products'][index]['quantity'], 10) + quantity; 2384 // @ts-expect-error ST-2949_2 2385 window.tcart['products'][index]['quantity'] = newQuantity; 2386 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 2387 // @ts-expect-error ST-2949_1 2388 tcart__showBubble(productObj.name + ' ' + tcart_dict('youAdd')); 2391 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2392 // @ts-expect-error ST-2949_2 2393 window.tcart['products'][index]['quantity']++; 2394 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) 2395 // @ts-expect-error ST-2949_1 2396 tcart__showBubble(productObj.name + ' ' + tcart_dict('youAdd')); 2399 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 2400 // @ts-expect-error ST-2949_2