701// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)702// @ts-expect-error ST-2949_1703if (storeProdSKU && storeProdSKU.style.display !== 'none') {704// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)705// @ts-expect-error ST-2949_3706storeProdSKU.insertAdjacentHTML('beforebegin', window.tCatalogDict['sku'] + ': ');707}708709// add gen-uid (for discounts) if this product has parent product710// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)711// @ts-expect-error ST-2949_3
el_product.setAttribute('data-product-gen-uid', product.uid); // add part-uid (for discounts) if this product has parts // @ts-expect-error ST-2949_3 el_product.setAttribute('data-product-part-uid', product.partuids ? product.partuids.join(',') : ''); if (options.tabs) { t_catalog__loadTildaCatalogTabs().then(() => { // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) // @ts-expect-error ST-2949_4 t_catalog_tabs_initSnippet(recid, options, el_product, product); addOptionsAndChooseEdition(); }); } else { // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 t_catalog_initTextAndCharacteristics(el_product, product); addOptionsAndChooseEdition(); } t_catalog_triggerEvent(document.body, 'twishlist_addbtn'); if (!options.relevants_slider) { // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 var mobileRow = rec.querySelector('.t-catalog__relevants-grid-cont.t-catalog__grid-cont_mobile-one-row'); if (mobileRow) { var handIcon = t_catalog_get_handIcon_html(recid, options.horizontalScrollHint); mobileRow.insertAdjacentHTML('beforebegin', handIcon); } } if (options.popup_opts.fixedButton) { t_catalog_fixedPopupButton(recid, options); } t_catalog_applyButtonStyles(recid, options); t_catalog_renderSnippetButtonIcon(recid, options); t_catalog_hoverZoom_init(recid); t_catalog_get_productPopup_closeIcon_color(recid, options); // отправка данных в Tilda об открытии страницы с товаром setTimeout(function () { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (!window.tCatalogIsSearchBot && window.Tilda && typeof Tilda.sendEcommerceEvent === 'function') { // @ts-expect-error ST-2949_1 if (!urlSearch.editionuid) { // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) // @ts-expect-error ST-2949_4 Tilda.sendEcommerceEvent('detail', [ { id: '' + (product.id ? product.id : product.uid), uid: '' + product.uid, price: '' + (product.price_min ? product.price_min : product.price), sku: product.sku ? product.sku : '', name: product.title, }, ]); } else { // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) // @ts-expect-error ST-2949_2 product.editions.forEach(function (cur) { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (cur.uid === urlSearch.editionuid) { // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) // @ts-expect-error ST-2949_4 Tilda.sendEcommerceEvent('detail', [ { id: '' + cur.uid, uid: '' + cur.uid, price: '' + cur.price, sku: cur.sku ? cur.sku : '', name: product.title, }, ]); } }); } } }, 3000);}/** * This function is called when the user clicks on a product in the product list. * It stores the product data in the browser's history.