Comprar com um consultor `); /*Buy together */ $('.buy-together-container .buy-together-nav').remove(); $('.buy-together-container .buy-together-main-product').removeClass('mr-30 col-md-3'); $('.buy-together-container .buy-together-items').removeClass('col-md-6'); $('.buy-together-container .buy-together-buy-btn').removeClass('col-md-3'); $('.product-buy-together-price').prepend(`
${$('.page-product-product .product-title.title').text()}
`); let text = $('.buy-together-main-product .product-price-discount').text(); let newText = text.replace('ou', ''); $('.buy-together-main-product .product-price-discount').text(newText); $('.buy-together-items .owl-item').each((index, item) => { let text_ = $(item).find('.product-price .product-price-discount').text(); let newText_ = text_.replace('ou', ''); $(item).find('.product-price .product-price-discount').text(newText_); }); $('.buy-together-main-product').after(``); $('.buy-together-items-content') .addClass('swiper') .wrapInner(''); $('.buy-together').addClass('swiper-slide'); $('.buy-together-items-content').after(``); new Swiper('.buy-together-items-content', { slidesPerView: 1, navigation: { nextEl: '.buy-together-container .swiper-button-next', prevEl: '.buy-together-container .swiper-button-prev', }, pagination: { el: '.buy-together-container .swiper-pagination', clickable: true, type: "progressbar", }, loop: true, }); /*Buy together */ /*Product Options*/ const product_options = $('#product .product-prices-content .options-list'); if ($(product_options).find('input.uniqueInputValue').length && $(product_options).length == 1) { $(product_options).css("display", "none"); } /*Product Options*/ /* Related Products */ $('.products-related-content').insertAfter($('.product-informations')); $('.products-related-content .navigation').appendTo($('.products-related-content .heading-title')); /* Related Products */ /*Avaliações*/ $('.module-review-content').insertBefore($('.page-newsletter.newsletter-content')); /*Avaliações*/ }; /*PRODUCT*/ if (!is_home && $('.module-html-content-83').length) { $('.module-html-content-83').insertAfter($('.page-newsletter.newsletter-content')); } /* Search */ if (is_search) { if (screen.width > 1024) { $('.category-heading-title').insertBefore($('.product-categories-container #column-left')); } } /* Search */ }); /*INICIO FTE-12223*/ $(()=>{ $('.page-header-categories--desktop--level_3').each(function () { const itens = $(this).find('.page-header-categories__items'); itens.each(function () { const link = $(this).find('.page-header-categories--desktop__link a').attr('href'); const img = $(this).children('img'); img.wrap(``); }); }); }); /*FIM FTE-12223*/ /*INICIO FTE-12249*/ $(()=>{ const pageProduct =$('.page-product-product '); if(pageProduct.length){ let selectContent = $('#product .product-price-body .product-consult-content'); let product_notify = $('#product .product-notify-info'); let newDiv = $('Chamar no WhatsApp'); selectContent.append(newDiv); product_notify.append(newDiv); } }); /*FIM FTE-12249*/ $(() => { /* Função para ajustar prefixos de preço*/ function ajustarPrefixoPreco(selector, antigo, novo) { const elemento = $(selector); const textoOriginal = elemento.text(); const textoAjustado = textoOriginal.replace(antigo, novo); elemento.text(textoAjustado); } /* Agrupa ajustes de prefixo em uma função*/ function ajustarPrefixos() { ajustarPrefixoPreco( '.page-product-product #product .product-prices-content .product-price-body .product-price .product-price-new', 'Por', 'Por:' ); ajustarPrefixoPreco( '.page-product-product #product .product-prices-content .product-price-body .product-price .product-price-old', 'De', 'De:' ); } /* Executa na carga inicial*/ ajustarPrefixos(); /* Reexecuta ao alterar quantidade */ $('.product-buy-button-content .form-group.product-number .set_quantity').on('change', function () { setTimeout(ajustarPrefixos, 590); }); /* Corrige o seletor do botão do WhatsApp*/ $('.page-product-product .product-informations .custom_description_product .button_wpp').attr({ 'href':'https://loja.naturalfitness.com.br/formulario-2025-ecommerce', 'target': '_blank' }); }); /*FIM FTE-12252*/