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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.1.js

Код файла
Версия от 04.12.2026, 04:03:55 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
4101function t_store_generateUrl(product) {4102	var currentProtocol = window.location.protocol;4103	var currentHost = window.location.host;4104	var relativeProductPath;4105 4106	relativeProductPath = product.url.split('://')[1];4107	relativeProductPath = relativeProductPath.split('/');4108	relativeProductPath.shift();4109	relativeProductPath = relativeProductPath.join('/');4110 4111	return currentProtocol + '//' + currentHost + '/' + relativeProductPath;4112
История файла и сравнение версий
  • 04.12.2026, 04:03:55 · 56c3b845
}
4113
4114function t_store_drawProdPopup(recid, el_popup, product, options, fromPopup) {
4115 el_popup.scrollTop = 0;
4116 var el_product = el_popup.querySelector('.js-store-product.js-product');
4117 el_product.setAttribute('data-card-size', 'large');
4118 t_store_drawProdPopup_drawGallery(recid, el_popup, product, options);
4119 if (!window.tStoreDefPackObj) {
4120 window.tStoreDefPackObj = {};
4121 }
4122 var storeProduct = el_popup.querySelector('.js-store-product');
4123 storeProduct.setAttribute('data-product-lid', product.uid);
4124 storeProduct.setAttribute('data-product-uid', product.uid);
4125 storeProduct.setAttribute('data-product-gen-uid', product.uid);
4126
4127 var storeProdName = el_popup.querySelector('.js-store-prod-name');
4128 if (product.title) {
4129 storeProdName.innerHTML = product.title;
4130 storeProdName.style.display = '';
4131 } else {
4132 storeProdName.innerHTML = '';
4133 storeProdName.style.display = 'none';
4134 }
4135
4136 var partuids = [];
4137 try {
4138 partuids = JSON.parse(product.partuids);
4139 } catch (error) {
4140 console.error(error);
4141 }
4142
4143 storeProduct.setAttribute('data-product-part-uid', partuids.join(','));
4144
4145 // links for size chart
4146 if (options.linksSizeChart && partuids.length > 0) {
4147 var str = '';
4148 var linksAdded = [];
4149 for (var i = 0; i < partuids.length; i++) {
4150 var uid = partuids[i];
4151 if (
4152 options.linksSizeChart[uid] &&
4153 options.linksSizeChart[uid].infotext &&
4154 options.linksSizeChart[uid].infourl
4155 ) {
4156 if (linksAdded.indexOf(options.linksSizeChart[uid].infourl) === -1) {
4157 str += '<div class="t-store__prod-popup__link t-descr t-descr_xxs">';
4158 str +=
4159 '<a href="' +
4160 options.linksSizeChart[uid].infourl.replace(/"/g, '&quot;') +
4161 '" target="_blank">';
4162 str += options.linksSizeChart[uid].infotext;
4163 str += '</a>';
4164 str += '</div>';
4165
4166 linksAdded.push(options.linksSizeChart[uid].infourl);
4167 }
4168 }
4169 }
4170 el_popup.querySelector('.t-store__prod-popup__links-wrapper').innerHTML = str;
4171 } else {
4172 el_popup.querySelector('.t-store__prod-popup__links-wrapper').innerHTML = '';
4173 }
4174
4175 t_store_initTextAndCharacteristics(el_popup, product);
4176
4177 var onPopupReady = function () {
4178 // t_store_initTextAndCharacteristics(el_popup, product);
4179 t_store_addProductOptions(recid, product, el_product, options);
4180 t_store_option_handleOnChange(el_product);
4181 t_store_option_handleOnChange_custom(recid, el_product, options);
4182 t_store_onFuncLoad('t_prod__initProduct', function () {
4183 t_prod__initProduct(el_product, options);
4184 });
4185 t_store_notifyButton_applyEffects(el_popup);
4186
4187 window.t_store_prodPopup_updateGalleryThumbsEvent = function () {
4188 t_store_prodPopup_updateGalleryThumbs(recid, el_popup, product, options);
4189 };
4190 if (fromPopup) {
4191 window.removeEventListener('resize', window.t_store_prodPopup_updateGalleryThumbsEvent);
4192 }
4193 window.addEventListener('resize', window.t_store_prodPopup_updateGalleryThumbsEvent);
4194 };
4195
4196 onPopupReady();
4197
4198 // Draw tabs
4199 if (options.tabs) {
4200 t_store_onFuncLoad('t_store_tabs_init', function () {
Предыдущие 100 строкСледующие 100 строк