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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.1.js

Код файла
Версия от 04.12.2026, 04:03:55 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
7101		Array.prototype.forEach.call(document.querySelectorAll('.js-store-product'), function (product) {7102			product.setAttribute('data-product-lid', edition.uid);7103			product.setAttribute('data-product-uid', edition.uid);7104			product.setAttribute('data-product-url', window.location);7105			product.setAttribute('data-product-img', edition.img);7106		});7107 7108		setTimeout(function () {7109			t_store_product_updateEdition_moveSlider(recid, el_product, edition);7110		}, 200);7111 
История файла и сравнение версий
  • 04.12.2026, 04:03:55 · 56c3b845
7112
// If edition was passed as URL param, update hidden select only
7113 Array.prototype.forEach.call(product.editionOptions, function (curOption) {
7114 var value = edition[curOption.name];
7115 var el_select = t_store_product_getEditionSelectEl(el_product, curOption);
7116 if (el_select) {
7117 var variant = el_select.querySelector('.js-product-edition-option-variants');
7118 if (variant && variant.value !== value) {
7119 variant.value = (value || '').replace(/&gt;/g, '>').replace(/&lt;/g, '<');
7120 /* A timeout of 1 second for custom select */
7121 setTimeout(function () {
7122 t_store_triggerEvent(variant, 'change');
7123 });
7124 }
7125 }
7126 });
7127 }
7128
7129 var storePriceWrapper = el_product.querySelector('.js-store-price-wrapper');
7130 var storeCardPrice;
7131 var storeProdPrice;
7132 var storeProdPriceVal;
7133 var productPrice;
7134 if (storePriceWrapper) {
7135 storeCardPrice = storePriceWrapper.querySelector('.t-store__card__price');
7136 storeProdPrice = storePriceWrapper.querySelector('.js-store-prod-price');
7137 storeProdPriceVal = storePriceWrapper.querySelector('.js-store-prod-price-val');
7138 productPrice = storePriceWrapper.querySelector('.js-product-price');
7139 }
7140
7141 // change price
7142 if (edition.price && parseFloat(edition.price) !== 0) {
7143 var formattedPrice = t_store__getFormattedPrice(options, edition.price);
7144 var formattedPriceRange = t_store__getFormattedPriceRange(options, product);
7145 if (options.price) {
7146 var priceRangeDesign = options.price.priceRange;
7147 if (formattedPriceRange && priceRangeDesign === 'range') {
7148 formattedPrice = formattedPriceRange;
7149 }
7150
7151 if (formattedPriceRange && priceRangeDesign === 'from') {
7152 var minPrice = t_store__getFormattedMinPrice(options, product);
7153 if (minPrice !== null) {
7154 formattedPrice = minPrice;
7155 }
7156 }
7157 }
7158 if (storeProdPriceVal) {
7159 storeProdPriceVal.textContent = formattedPrice;
7160 }
7161 if (storeCardPrice) {
7162 storeCardPrice.style.display = '';
7163 }
7164 if (storeProdPrice) {
7165 storeProdPrice.style.display = '';
7166 }
7167 if (storePriceWrapper) {
7168 storePriceWrapper.style.visibility = '';
7169 }
7170
7171 var cleanPrice = t_store__cleanPrice(edition.price);
7172 if (productPrice) {
7173 productPrice.setAttribute('data-product-price-def', cleanPrice);
7174 productPrice.setAttribute('data-product-price-def-str', cleanPrice);
7175 }
7176
7177 Array.prototype.forEach.call(el_product.querySelectorAll('.t-store__prod__price-portion'), function (portion) {
7178 t_store__removeElement(portion);
7179 });
7180 if (product.unit && product.portion > 0) {
7181 var str =
7182 '<div class="t-store__prod__price-portion"><span class="t-store__prod__price-portion-slash">/</span>';
7183 if (product.portion !== '1') {
7184 str += +product.portion + ' ';
7185 }
7186 str += window.tStoreDict[product.unit] + '</div>';
7187
7188 var arrayPriceClasses = [
7189 // сетка товаров
7190 '.t-store__card__price-currency + .js-product-price',
7191 '.t-store__card__price-currency + .js-store-prod-price-old-val',
7192 '.js-product-price + .t-store__card__price-currency',
7193 '.js-store-prod-price-old-val + .t-store__card__price-currency',
7194 // попап
7195 '.t-store__prod-popup__price-currency + .js-product-price',
7196 '.js-product-price + .t-store__prod-popup__price-currency',
7197 '.t-store__prod-popup__price-currency + .js-store-prod-price-old-val',
7198 '.js-store-prod-price-old-val + .t-store__prod-popup__price-currency',
7199 // одиночные блоки
7200 '.js-product-price-currency + .js-product-price',
Предыдущие 100 строкСледующие 100 строк