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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.2.js

Код файла
Версия от 05.12.2026, 07:01:02 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
7801		el_product = el_product[0];7802	}7803 7804	if (!edition) {7805		// TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)7806		// @ts-expect-error ST-2949_17807		product.editions.forEach(function (cur) {7808			// @ts-expect-error ST-2949_17809			if (cur.uid === urlSearch.editionuid) {7810				edition = cur;7811			}7812		});
История файла и сравнение версий
  • 05.12.2026, 07:01:02 · 56c3b845
7813 }
7814
7815 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
7816 // @ts-expect-error ST-2949_1
7817 if (urlSearch.editionuid === edition.uid) {
7818 Array.prototype.forEach.call(document.querySelectorAll('.js-catalog-product'), function (product) {
7819 // @ts-expect-error ST-2949_1
7820 product.setAttribute('data-product-uid', edition.uid || '');
7821 product.setAttribute('data-product-url', window.location);
7822 // @ts-expect-error ST-2949_1
7823 product.setAttribute('data-product-img', edition.img);
7824 });
7825
7826 setTimeout(function () {
7827 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
7828 // @ts-expect-error ST-2949_5
7829 t_catalog_product_updateEdition_moveSlider(recid, el_product, edition);
7830 }, 200);
7831 }
7832
7833 var storePriceWrapper = el_product.querySelector('.js-catalog-price-wrapper');
7834 var storeCardPrice;
7835 var storeProdPrice;
7836 var storeProdPriceVal;
7837 var productPrice;
7838 if (storePriceWrapper) {
7839 storeCardPrice = storePriceWrapper.querySelector('.t-catalog__card__price');
7840 storeProdPrice = storePriceWrapper.querySelector('.js-catalog-prod-price');
7841 storeProdPriceVal = storePriceWrapper.querySelector('.js-catalog-prod-price-val');
7842 productPrice = storePriceWrapper.querySelector('.js-product-price');
7843 }
7844
7845 // change price
7846 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
7847 // @ts-expect-error ST-2949_1
7848 if (edition.price && parseFloat(edition.price) !== 0) {
7849 // @ts-expect-error ST-2949_1
7850 var formattedPrice = t_catalog__getFormattedPrice(options, edition.price);
7851 var formattedPriceRange = t_catalog__getFormattedPriceRange(options, product);
7852 // @ts-expect-error ST-2949_1
7853 if (options.price) {
7854 // @ts-expect-error ST-2949_1
7855 var priceRangeDesign = options.price.priceRange;
7856 if (formattedPriceRange && priceRangeDesign === 'range') {
7857 formattedPrice = formattedPriceRange;
7858 }
7859
7860 if (formattedPriceRange && priceRangeDesign === 'from') {
7861 var minPrice = t_catalog__getFormattedMinPrice(options, product);
7862 if (minPrice !== null) {
7863 formattedPrice = minPrice;
7864 }
7865 }
7866 }
7867 if (storeProdPriceVal) {
7868 storeProdPriceVal.textContent = formattedPrice;
7869 }
7870 if (storeCardPrice) {
7871 // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)
7872 // @ts-expect-error ST-2949_1
7873 storeCardPrice.style.display = '';
7874 }
7875 if (storeProdPrice) {
7876 // @ts-expect-error ST-2949_1
7877 storeProdPrice.style.display = '';
7878 }
7879 if (storePriceWrapper) {
7880 // @ts-expect-error ST-2949_1
7881 storePriceWrapper.style.visibility = '';
7882 }
7883
7884 // @ts-expect-error ST-2949_1
7885 var cleanPrice = t_catalog__cleanPrice(edition.price);
7886 if (productPrice) {
7887 // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046)
7888 // @ts-expect-error ST-2949_5
7889 productPrice.setAttribute('data-product-price-def', cleanPrice);
7890 // @ts-expect-error ST-2949_5
7891 productPrice.setAttribute('data-product-price-def-str', cleanPrice);
7892 }
7893
7894 Array.prototype.forEach.call(
7895 el_product.querySelectorAll('.t-catalog__prod__price-portion'),
7896 function (portion) {
7897 t_catalog__removeElement(portion);
7898 }
7899 );
7900
Предыдущие 100 строкСледующие 100 строк