Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
701	// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)702	// @ts-expect-error ST-2949_1703	if (storeProdSKU && storeProdSKU.style.display !== 'none') {704		// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)705		// @ts-expect-error ST-2949_3706		storeProdSKU.insertAdjacentHTML('beforebegin', window.tCatalogDict['sku'] + ': ');707	}708 709	// 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
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
712 el_product.setAttribute('data-product-gen-uid', product.uid);
713 // add part-uid (for discounts) if this product has parts
714 // @ts-expect-error ST-2949_3
715 el_product.setAttribute('data-product-part-uid', product.partuids ? product.partuids.join(',') : '');
716
717 if (options.tabs) {
718 t_catalog__loadTildaCatalogTabs().then(() => {
719 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)
720 // @ts-expect-error ST-2949_4
721 t_catalog_tabs_initSnippet(recid, options, el_product, product);
722 addOptionsAndChooseEdition();
723 });
724 } else {
725 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
726 // @ts-expect-error ST-2949_5
727 t_catalog_initTextAndCharacteristics(el_product, product);
728 addOptionsAndChooseEdition();
729 }
730
731 t_catalog_triggerEvent(document.body, 'twishlist_addbtn');
732
733 if (!options.relevants_slider) {
734 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
735 // @ts-expect-error ST-2949_3
736 var mobileRow = rec.querySelector('.t-catalog__relevants-grid-cont.t-catalog__grid-cont_mobile-one-row');
737 if (mobileRow) {
738 var handIcon = t_catalog_get_handIcon_html(recid, options.horizontalScrollHint);
739 mobileRow.insertAdjacentHTML('beforebegin', handIcon);
740 }
741 }
742
743 if (options.popup_opts.fixedButton) {
744 t_catalog_fixedPopupButton(recid, options);
745 }
746
747 t_catalog_applyButtonStyles(recid, options);
748
749 t_catalog_renderSnippetButtonIcon(recid, options);
750
751 t_catalog_hoverZoom_init(recid);
752
753 t_catalog_get_productPopup_closeIcon_color(recid, options);
754
755 // отправка данных в Tilda об открытии страницы с товаром
756 setTimeout(function () {
757 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
758 // @ts-expect-error ST-2949_1
759 if (!window.tCatalogIsSearchBot && window.Tilda && typeof Tilda.sendEcommerceEvent === 'function') {
760 // @ts-expect-error ST-2949_1
761 if (!urlSearch.editionuid) {
762 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)
763 // @ts-expect-error ST-2949_4
764 Tilda.sendEcommerceEvent('detail', [
765 {
766 id: '' + (product.id ? product.id : product.uid),
767 uid: '' + product.uid,
768 price: '' + (product.price_min ? product.price_min : product.price),
769 sku: product.sku ? product.sku : '',
770 name: product.title,
771 },
772 ]);
773 } else {
774 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
775 // @ts-expect-error ST-2949_2
776 product.editions.forEach(function (cur) {
777 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
778 // @ts-expect-error ST-2949_1
779 if (cur.uid === urlSearch.editionuid) {
780 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)
781 // @ts-expect-error ST-2949_4
782 Tilda.sendEcommerceEvent('detail', [
783 {
784 id: '' + cur.uid,
785 uid: '' + cur.uid,
786 price: '' + cur.price,
787 sku: cur.sku ? cur.sku : '',
788 name: product.title,
789 },
790 ]);
791 }
792 });
793 }
794 }
795 }, 3000);
796}
797
798/**
799 * This function is called when the user clicks on a product in the product list.
800 * It stores the product data in the browser's history.
Предыдущие 100 строкСледующие 100 строк