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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.1.js

Код файла
Версия от 04.12.2026, 04:03:55 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
8601	}8602 8603	t_store_option_handleOnChange(el_product);8604 8605	// Add events8606	t_store_option_handleOnChange_custom(recid, el_product, options);8607}8608 8609function t_store_oneProduct_successMsg_show(recid, product, options) {8610	if (!options.previewmode) {8611		var el_rec = document.getElementById('rec' + recid);8612		var text =
История файла и сравнение версий
  • 04.12.2026, 04:03:55 · 56c3b845
8613 window.tStoreBrowserLang === 'RU'
8614 ? 'Товар успешно связан с каталогом. Название товара в каталоге: '
8615 : 'Product is connected to catalog. Product name in catalog is ';
8616 text += '<b>' + product.title + '</b>';
8617 t_store_showMsgInRedactor(el_rec, text, 'success');
8618 }
8619}
8620
8621function t_store_oneProduct_error_show(recid, opts) {
8622 if (!opts.previewmode) {
8623 var el_rec = document.getElementById('rec' + recid);
8624 var errorText =
8625 window.tStoreBrowserLang === 'RU'
8626 ? 'Не удается получить товар из каталога. Возможно он был удален или отключен. Пожалуйста, проверьте, что товар с таким ID существует.'
8627 : "Can't find a product in the catalog. It may have been deleted or disabled. Please check that the product with this ID exists.";
8628 t_store_showMsgInRedactor(el_rec, errorText, 'error');
8629 }
8630}
8631
8632function t_store_showMsgInRedactor(el_rec, text, type) {
8633 var storeMsg = el_rec.querySelector('.js-store-msg');
8634 t_store__removeElement(storeMsg);
8635 var textColor = type === 'success' ? '#fff' : '#000';
8636 var bgColor = type === 'success' ? '#62C584' : 'yellow';
8637 var msgHtml = '';
8638 msgHtml +=
8639 '<div class="js-store-msg" style="margin: 0;text-align: left; font-family: tfutura,Arial,sans-serif; color: ' +
8640 textColor +
8641 ';">';
8642 msgHtml +=
8643 ' <div style="background: ' +
8644 bgColor +
8645 '; padding: 16px 20px; box-sizing: border-box; margin-bottom: 30px; position: relative;" class="t-container">';
8646 msgHtml += ' <div style="width: 40px; height: 40px; position: absolute; left: 20px; bottom: -40px;">';
8647 msgHtml +=
8648 ' <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="40px" width="40px"><polygon fill="' +
8649 bgColor +
8650 '" stroke="' +
8651 bgColor +
8652 '" stroke-width="0" points="0,0 40,0 0,20 0,0"></polygon></svg>';
8653 msgHtml += ' </div>';
8654 msgHtml += text;
8655 msgHtml += ' </div>';
8656 msgHtml += '</div>';
8657 el_rec.insertAdjacentHTML('afterbegin', msgHtml);
8658}
8659
8660function t_store_isQueryInAddressBar(queryString) {
8661 var currentLocationSearch;
8662 try {
8663 currentLocationSearch = decodeURI(window.location.href);
8664 } catch (error) {
8665 console.error(error);
8666 currentLocationSearch = window.location.href;
8667 }
8668 if (!currentLocationSearch) {
8669 return false;
8670 }
8671 return currentLocationSearch.indexOf(queryString) !== -1;
8672}
8673
8674function t_store_getColumnWidth(size) {
8675 var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
8676
8677 var mediaQuery = windowWidth > 1200 ? 'minWidth1200' : 'maxWidth1200';
8678
8679 var gridSizes = {
8680 minWidth1200: {
8681 col_1: 60,
8682 col_2: 160,
8683 col_3: 260,
8684 col_4: 360,
8685 col_5: 460,
8686 col_6: 560,
8687 col_7: 660,
8688 col_8: 760,
8689 col_9: 860,
8690 col_10: 960,
8691 col_11: 1060,
8692 col_12: 1160,
8693 },
8694 maxWidth1200: {
8695 col_1: 60,
8696 col_2: 140,
8697 col_3: 220,
8698 col_4: 300,
8699 col_5: 380,
8700 col_6: 460,
Предыдущие 100 строкСледующие 100 строк