(function($) { // KATEGORIE $('.category-perex').insertAfter('.category-title'); let drobky = $('.breadcrumbs'); drobky.prependTo('#content'); document.addEventListener('ShoptetDOMPageContentLoaded', function() { $('.category-perex').insertAfter('.category-title'); drobky.prependTo('#content'); }); $('.breadcrumbs').addClass('wrap-this'); $('.category-title').addClass('wrap-this'); $('.category-perex').addClass('wrap-this'); $('.wrap-this').wrapAll('
'); let categoryBlog = $('.category-blog-heading').parent().parent().parent().parent(); categoryBlog.removeClass('banner-wrapper').addClass('category-blog'); if ( $('.type-category .category-perex').length ) { categoryBlog.appendTo('.category-heading-wrapper'); categoryBlog.find('.category-blog-content').load('/blog') } else { categoryBlog.remove(); } $('.wrap-this').wrapAll(''); $('.site-msg.information').insertBefore( $('.overall-wrapper') ); $('#formSearchForm button').text(''); $('#formSearchForm input').attr('placeholder', 'Zadejte hledaný výraz'); $('.navigation-buttons a[data-target="cart"] .sr-only').text('Košík'); $('.top-navigation-contacts > strong').text('Máte dotaz?'); if (window.innerWidth > 767) { $('.top-navigation-tools a[data-target="login"].top-nav-button').prependTo('.navigation-buttons').text('Přihlásit'); } let cartPrice = $('.navigation-buttons a[data-target="cart"] .cart-price'); if ( $.trim(cartPrice.text()) === 'Prázdný košík' ) { cartPrice.text('0 Kč'); }; let openingHoursParent = $('.custom-footer .opening-hours').parent().parent().parent().parent(); $('.custom-footer .opening-hours').insertAfter( $('.top-navigation-contacts .project-phone') ); openingHoursParent.remove(); let categoryButton = $(document.createElement('a')); categoryButton.text('Kategorie').addClass('btn btn-conversion category-toggler'); categoryButton.click( function() { $('.sidebar').toggle(); $('body').toggleClass('sidebar-hidden'); }); categoryButton.prependTo( $('#navigation .navigation-in') ); $('.in-index .benefitBanner').addClass('container').insertAfter( $('#content-wrapper') ); $('.body-banners > div').removeClass('col-sm-4').removeClass('col-sm-8'); $('.products-block .product').each( function() { let availability = $(this).find('.availability'), priceFinal = $(this).find('.price-final'), priceStandard = $(this).find('.price-standard'), productBottomWrapper = $(document.createElement('div')), productBottomPrices = $(document.createElement('div')), productBottomAvailability = $(document.createElement('div')); priceStandard.appendTo(productBottomPrices); priceFinal.appendTo(productBottomPrices); productBottomPrices.appendTo(productBottomWrapper).addClass('product-bottom-prices'); availability.appendTo(productBottomAvailability); productBottomAvailability.appendTo(productBottomWrapper).addClass('product-bottom-availability'); productBottomWrapper.addClass('product-bottom-wrapper').appendTo($(this).find('.p-in')); }) let lastFooterBanner = $('.custom-footer > div:last-of-type'); lastFooterBanner.prev().children().appendTo($('.custom-footer > div:last-of-type')); lastFooterBanner.addClass('footer-side-banner container'); lastFooterBanner.insertBefore( $('.footer-bottom') ).wrapAll(''); $('.newsletter-header').append(`Maximálně 1x za měsíc od nás obdržíš e-mail, ve kterém budeme nabízet výrazné slevy, uvádět nové kolekce a soužeže o hodnotné ceny.
Nemusíš mít strach, z odběru se lze odhlásit jedním kliknutím. `); $('#formNewsletterWidget input').attr('placeholder', 'Sem napište váš e-mail'); $('.footer-bottom').wrapAll(''); $('.pagination-loader .load-products').text('Načíst další'); if ( $('.type-detail').length ) { $('.p-detail-inner-header').prependTo('.p-info-wrapper'); $('.p-detail-info .stars-wrapper').insertAfter('.p-detail-inner-header'); $('.p-detail-inner-header .p-code').insertAfter('.stars-wrapper'); $('.p-detail-info > div').insertAfter('.p-code'); let deliveryWrapper = $(document.createElement('div')), sideInfoWrapper = $(document.createElement('div')), addToCartWrapper = $(document.createElement('div')); deliveryWrapper.addClass('delivery-wrapper'); sideInfoWrapper.addClass('side-info-wrapper'); addToCartWrapper.addClass('add-to-cart-wrapper'); addToCartWrapper.insertBefore('.social-buttons-wrapper'); $('.p-info-wrapper .detail-parameters .delivery-time-label').appendTo(deliveryWrapper); $('.p-info-wrapper .detail-parameters .delivery-time').appendTo(deliveryWrapper) deliveryWrapper.prependTo(sideInfoWrapper); $('.p-info-wrapper .availability-value').prependTo(sideInfoWrapper); // sideInfoWrapper.prependTo('.add-to-cart'); sideInfoWrapper.prependTo(addToCartWrapper); // $('.p-info-wrapper .p-final-price-wrapper').prependTo('.add-to-cart'); $('.p-info-wrapper .p-final-price-wrapper').prependTo(addToCartWrapper); let shortDesc = $('.p-short-description'), moreInfo = shortDesc.next(); // shortDesc.insertBefore('.add-to-cart'); // moreInfo.insertBefore('.add-to-cart'); shortDesc.insertBefore(addToCartWrapper); moreInfo.insertBefore(addToCartWrapper); $('.add-to-cart').appendTo(addToCartWrapper); moreInfo.find('a').text('Celý popis'); $('.type-detail .benefitBanner').appendTo('#content-wrapper'); $('.type-detail #productsAlternative').insertAfter( $('#productsAlternative').parents('.p-detail-tabs-wrapper') ).removeClass('fade').prepend('