8601}86028603t_store_option_handleOnChange(el_product);86048605// Add events8606t_store_option_handleOnChange_custom(recid, el_product, options);8607}86088609function t_store_oneProduct_successMsg_show(recid, product, options) {8610if (!options.previewmode) {8611var el_rec = document.getElementById('rec' + recid);8612var text =
window.tStoreBrowserLang === 'RU' ? 'Товар успешно связан с каталогом. Название товара в каталоге: ' : 'Product is connected to catalog. Product name in catalog is '; text += '<b>' + product.title + '</b>'; t_store_showMsgInRedactor(el_rec, text, 'success'); }}function t_store_oneProduct_error_show(recid, opts) { if (!opts.previewmode) { var el_rec = document.getElementById('rec' + recid); var errorText = window.tStoreBrowserLang === 'RU' ? 'Не удается получить товар из каталога. Возможно он был удален или отключен. Пожалуйста, проверьте, что товар с таким ID существует.' : "Can't find a product in the catalog. It may have been deleted or disabled. Please check that the product with this ID exists."; t_store_showMsgInRedactor(el_rec, errorText, 'error'); }}function t_store_showMsgInRedactor(el_rec, text, type) { var storeMsg = el_rec.querySelector('.js-store-msg'); t_store__removeElement(storeMsg); var textColor = type === 'success' ? '#fff' : '#000'; var bgColor = type === 'success' ? '#62C584' : 'yellow'; var msgHtml = ''; msgHtml += '<div class="js-store-msg" style="margin: 0;text-align: left; font-family: tfutura,Arial,sans-serif; color: ' + textColor + ';">'; msgHtml += ' <div style="background: ' + bgColor + '; padding: 16px 20px; box-sizing: border-box; margin-bottom: 30px; position: relative;" class="t-container">'; msgHtml += ' <div style="width: 40px; height: 40px; position: absolute; left: 20px; bottom: -40px;">'; msgHtml += ' <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="40px" width="40px"><polygon fill="' + bgColor + '" stroke="' + bgColor + '" stroke-width="0" points="0,0 40,0 0,20 0,0"></polygon></svg>'; msgHtml += ' </div>'; msgHtml += text; msgHtml += ' </div>'; msgHtml += '</div>'; el_rec.insertAdjacentHTML('afterbegin', msgHtml);}function t_store_isQueryInAddressBar(queryString) { var currentLocationSearch; try { currentLocationSearch = decodeURI(window.location.href); } catch (error) { console.error(error); currentLocationSearch = window.location.href; } if (!currentLocationSearch) { return false; } return currentLocationSearch.indexOf(queryString) !== -1;}function t_store_getColumnWidth(size) { var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var mediaQuery = windowWidth > 1200 ? 'minWidth1200' : 'maxWidth1200'; var gridSizes = { minWidth1200: { col_1: 60, col_2: 160, col_3: 260, col_4: 360, col_5: 460, col_6: 560, col_7: 660, col_8: 760, col_9: 860, col_10: 960, col_11: 1060, col_12: 1160, }, maxWidth1200: { col_1: 60, col_2: 140, col_3: 220, col_4: 300, col_5: 380, col_6: 460,