7801el_product = el_product[0];7802}78037804if (!edition) {7805// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)7806// @ts-expect-error ST-2949_17807product.editions.forEach(function (cur) {7808// @ts-expect-error ST-2949_17809if (cur.uid === urlSearch.editionuid) {7810edition = cur;7811}7812});
} // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (urlSearch.editionuid === edition.uid) { Array.prototype.forEach.call(document.querySelectorAll('.js-catalog-product'), function (product) { // @ts-expect-error ST-2949_1 product.setAttribute('data-product-uid', edition.uid || ''); product.setAttribute('data-product-url', window.location); // @ts-expect-error ST-2949_1 product.setAttribute('data-product-img', edition.img); }); setTimeout(function () { // 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_product_updateEdition_moveSlider(recid, el_product, edition); }, 200); } var storePriceWrapper = el_product.querySelector('.js-catalog-price-wrapper'); var storeCardPrice; var storeProdPrice; var storeProdPriceVal; var productPrice; if (storePriceWrapper) { storeCardPrice = storePriceWrapper.querySelector('.t-catalog__card__price'); storeProdPrice = storePriceWrapper.querySelector('.js-catalog-prod-price'); storeProdPriceVal = storePriceWrapper.querySelector('.js-catalog-prod-price-val'); productPrice = storePriceWrapper.querySelector('.js-product-price'); } // change price // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 if (edition.price && parseFloat(edition.price) !== 0) { // @ts-expect-error ST-2949_1 var formattedPrice = t_catalog__getFormattedPrice(options, edition.price); var formattedPriceRange = t_catalog__getFormattedPriceRange(options, product); // @ts-expect-error ST-2949_1 if (options.price) { // @ts-expect-error ST-2949_1 var priceRangeDesign = options.price.priceRange; if (formattedPriceRange && priceRangeDesign === 'range') { formattedPrice = formattedPriceRange; } if (formattedPriceRange && priceRangeDesign === 'from') { var minPrice = t_catalog__getFormattedMinPrice(options, product); if (minPrice !== null) { formattedPrice = minPrice; } } } if (storeProdPriceVal) { storeProdPriceVal.textContent = formattedPrice; } if (storeCardPrice) { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 storeCardPrice.style.display = ''; } if (storeProdPrice) { // @ts-expect-error ST-2949_1 storeProdPrice.style.display = ''; } if (storePriceWrapper) { // @ts-expect-error ST-2949_1 storePriceWrapper.style.visibility = ''; } // @ts-expect-error ST-2949_1 var cleanPrice = t_catalog__cleanPrice(edition.price); if (productPrice) { // 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 productPrice.setAttribute('data-product-price-def', cleanPrice); // @ts-expect-error ST-2949_5 productPrice.setAttribute('data-product-price-def-str', cleanPrice); } Array.prototype.forEach.call( el_product.querySelectorAll('.t-catalog__prod__price-portion'), function (portion) { t_catalog__removeElement(portion); } );