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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
4701			// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)4702			// @ts-expect-error ST-2949_24703			if (!window.tStoreDetailEvent[productObj.id ? productObj.id : productObj.uid]) {4704				// TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)4705				// @ts-expect-error ST-2949_44706				Tilda.sendEcommerceEvent('detail', [4707					{4708						id: '' + (productObj.id ? productObj.id : productObj.uid),4709						uid: '' + productObj.uid,4710						price: '' + (productObj.price_min ? productObj.price_min : productObj.price),4711
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
sku: productObj.sku ? productObj.sku : '',
4712 name: productObj.title,
4713 },
4714 ]);
4715
4716 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
4717 // @ts-expect-error ST-2949_2
4718 window.tStoreDetailEvent[productObj.id ? productObj.id : productObj.uid] = true;
4719 }
4720 }
4721
4722 // read title for analytics, when we add data to popup
4723 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)
4724 // @ts-expect-error ST-2949_4
4725 if (Tilda.sendEventToStatistics) {
4726 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
4727 // @ts-expect-error ST-2949_3
4728 var analytics = el_popup.getAttribute('data-track-popup');
4729 if (analytics) {
4730 var virtTitle = 'Popup: ' + productObj.title;
4731
4732 // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)
4733 // @ts-expect-error ST-2949_4
4734 Tilda.sendEventToStatistics(analytics, virtTitle, '', 0);
4735 }
4736 }
4737 }
4738
4739 if (options.isPublishedPage && !fromHistory) {
4740 t_catalog_changeUrl(recid, productObj, isRelevantsShow, options);
4741 }
4742
4743 // TODO: move code into function
4744 if (showRelevants && !isSnippet && !isTemplatePopup) {
4745 var relevantsLabel = {
4746 cc: 'current_category',
4747 all: 'all_categories',
4748 };
4749 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
4750 // @ts-expect-error ST-2949_2
4751 var relevantsMethod = relevantsLabel[showRelevants] || 'category_' + showRelevants;
4752 var relevantsSort = 'random';
4753 var relevantsQuantity = options.relevants_quantity || 4;
4754 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
4755 // @ts-expect-error ST-2949_5
4756 t_catalog_loadProducts('relevants', recid, options, false, {
4757 currentProductUid: productObj.uid,
4758 relevantsQuantity: relevantsQuantity,
4759 relevantsMethod: relevantsMethod,
4760 relevantsSort: relevantsSort,
4761 });
4762 }
4763
4764 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)
4765 // @ts-expect-error ST-2949_3
4766 if (window.lazy === 'y' || document.getElementById('allrecords').getAttribute('data-tilda-lazy') === 'yes') {
4767 t_catalog_popup_updLazyOnScroll(recid);
4768 }
4769
4770 var isSoldOut = parseInt(productObj.quantity, 10) <= 0;
4771 if (!isSoldOut && (options.showStoreBtnQuantity === 'both' || options.showStoreBtnQuantity === 'popup')) {
4772 // create quantity input for popup
4773 var el_product = document.querySelector('#rec' + recid + ' .t-popup .js-catalog-product');
4774 t_catalog_addProductQuantity(el_product, productObj, options);
4775 }
4776
4777 t_catalog_hoverZoom_init(recid);
4778
4779 // update animation after transition: opacity ease-in-out .3s
4780 if (options.itemsAnim && options.previewmode) {
4781 setTimeout(function () {
4782 t_catalog_onFuncLoad('t_animate__setAnimationStateChains', function () {
4783 // animChainsBlocks contains elements, which are animated as a chain, row by row
4784 var allBlocks = document.querySelectorAll('.r');
4785 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
4786 // @ts-expect-error ST-2949_2
4787 var animChainsBlocks = [];
4788 Array.prototype.forEach.call(allBlocks, function (block) {
4789 if (block.querySelector('.t-animate[data-animate-chain=yes]')) {
4790 animChainsBlocks.push(block);
4791 }
4792 });
4793 if (animChainsBlocks.length) {
4794 // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)
4795 // @ts-expect-error ST-2949_2
4796 t_animate__setAnimationStateChains(animChainsBlocks);
4797 }
4798 });
4799 }, 300);
4800 }
Предыдущие 100 строкСледующие 100 строк