9601var uid = urlParams.editionuid;9602if (uid && el_product.getAttribute('data-product-uid') !== uid) {9603console.info('show product by uid from url = ' + uid);9604/* find data for edition */9605var edObj = '';9606product.editions.forEach(function (edtn) {9607if (edtn.uid === parseInt(uid, 10)) {9608edObj = edtn;9609}9610});9611if (!edObj) {9612
return; } t_store_product_updateEdition(recid, el_product, edObj, product, options); var isSoldOut = parseInt(edObj.quantity) === 0; t_store_product_triggerSoldOutMsg(recid, el_product, isSoldOut, options); } } catch (error) { console.error('Error decode url:' + error); }}function t_store_moveSearhSort(recid, opts) { // sidebar у ST320 может быть пустым, его функция должна находиться всегда в каталоге var rec = document.getElementById('rec' + recid); if (!rec) return; var searchSort = rec.querySelector('.t-store__filter__search-and-sort'); // If search was hidden on mobile, show it again on window resize // console.log($(searchSort).is(':hidden')); // console.log(window.getComputedStyle(searchSort).display); if (window.innerWidth > 960 && searchSort && window.getComputedStyle(searchSort).display === 'none') { searchSort.style.display = ''; } // TODO: else on mobile // For blocks with sidebars // If filters are in sidebar check position in DOM and replace properly // No worries, it works only once on window.width > or < 960 if (!opts.sidebar) return; var controlsWrapper = rec.querySelector('.t-store__filter__controls-wrapper'); var contWithFiler = rec.querySelector('.js-store-cont-w-filter'); if (searchSort) { var isSearchOnTop = searchSort.parentNode.classList.contains('js-store-cont-w-filter'); if (window.innerWidth < 960) { if (isSearchOnTop) { t_store__removeElement(searchSort); controlsWrapper.insertAdjacentElement('beforeend', searchSort); } } else if (!isSearchOnTop) { t_store__removeElement(searchSort); contWithFiler.insertAdjacentElement('afterbegin', searchSort); } }}/* for block ST330 */function t_store_get_productCard_horizontalStructure(product, edition, options, link, isRelevantsShow, rec) { var str = ''; if ( ((product.gallery[0] && product.gallery[0] !== '') || (product.gallery[0] && product.gallery[0] !== '')) && options.prodCard && options.prodCard.hasImg ) { str += '<div class="t-store__card__imgwrapper_column"' + (options.imageWidth && options.imageWidth !== '0' ? ' style="width: ' + options.imageWidth + 'px;"' : '') + '>' + link.open + t_store_get_productCard_img_html(product, options) + link.close + '</div>'; } str += '<div class="t-store__card__contentwrapper">' + t_store_get_horizontalProductCard_txt_html(product, options, link, edition, isRelevantsShow, rec) + t_store_get_horizontalProductCard_priceAndButtons(product, options, edition, isRelevantsShow, rec) + '</div>'; return str;}function t_store_get_horizontalProductCard_txt_html(product, options, link, edition) { var titleName = product.title; if (options.isTitleClip) { titleName = product.title.length > 50 ? product.title.slice(0, 50) + '...' : product.title; } var title; if (product.title) { title = '<div class="t-store__card__title t-typography__title t-name t-name_md js-store-prod-name js-product-name"' + (!options.title_typo && Object.prototype.hasOwnProperty.call(options.typo, 'title')