Broca Serra Copo Videa Para Alvenaria e Concreto 35mm
  • Broca Serra Copo Videa Para Alvenaria e Concreto 35mm
  • Broca Serra Copo Videa Para Alvenaria e Concreto 35mm

Broca Serra Copo Videa Para Alvenaria e Concreto 35mm

  • Marca: Lotus
  • Ref.: 17067-FE
  • Disponibilidade: Pronta Entrega

R$22,52

2x de R$11,26 sem juros
Calcule o frete Não sei meu CEP

DETALHES DO PRODUTO

Broca Serra Copo Videa Para Alvenaria e Concreto 35mm

*não acompanha haste, comprar separadamente.

').appendTo('.product-single .product-preview'); $('.product-single .product-image-area').hide(); } } } else { $('#youtube-video').removeClass('open-video'); $('.product-single .product-preview #input-iframe').hide().remove(); $('.product-single .product-image-area').attr('data-zoom-image', el.attr('data-zoom')); $('.product-single .product-image-area').show(function(){ if(screen.width >= 992){ $('.zoomContainer').remove(); $(".product-single .product-image-area").elevateZoom({backgroundImage: el.attr('data-zoom'), zoomType: "inner", cursor: "crosshair"}); } }); } } if(window.matchMedia("(min-width: 768px)").matches) { var no_zoom = 1; if(no_zoom == 0){ function zoomProductImg(e){ counter = 0; pagination = 0; current_id = $('.product-thumbnails li.active').attr('data-image-id'); if ($(".zoomContainer > div").length) { if ($('div.product-options-list .custom-product-stock-image-label > img.current-img').length && ($(".zoomContainer > div").css('background-image').replace('url("', '').replace('")', '') == $('div.product-options-list .custom-product-stock-image-label > img.current-img').attr('data-original-image'))) { current_id = $('div.product-options-list .custom-product-stock-image-label > img.current-img').attr('data-original-image'); } } else { if ($('div.product-options-list .custom-product-stock-image-label > img.current-img').length && ($(".product-preview > img").attr('src') == $('div.product-options-list .custom-product-stock-image-label > img.current-img').attr('data-original-image'))) { current_id = $('div.product-options-list .custom-product-stock-image-label > img.current-img').attr('data-original-image'); } } $('#modal-thumbnails').remove(); e.preventDefault(); let html = '

'; html +='
'; $('body').append(html); $('#modal-thumbnails').modal('show'); loadGallery(true, 'a.thumbnail'); updateGallery($('[data-image-id="' + current_id + '"]')); if ($(".zoomContainer > div").length) { if ($('div.product-options-list .custom-product-stock-image-label > img.current-img').length && ($(".zoomContainer > div").css('background-image').replace('url("', '').replace('")', '') == $('div.product-options-list .custom-product-stock-image-label > img.current-img').attr('data-original-image'))) { $('#image-gallery-image').attr('src', current_id); } } else { if ($('div.product-options-list .custom-product-stock-image-label > img.current-img').length && ($(".product-preview > img").attr('src') == $('div.product-options-list .custom-product-stock-image-label > img.current-img').attr('data-original-image'))) { $('#image-gallery-image').attr('src', current_id); } } } $('.product-preview > .product-image-area').click(function(e){ zoomProductImg(e); }); $('.product-preview > .product_carousel_mobile').click(function(e){ zoomProductImg(e); }); } } function updateGallery(selector) { current_image = selector.data('image-id'); if($('.product_stock_image.active').length) { if($('#preview').attr('src').trim() == $('.product_stock_image.active').attr('data-original-image').trim()) { $('#image-gallery-image').attr('src', $('.product_stock_image.active').attr('data-original-image')); } else { $('#image-gallery-image').attr('src', $('[data-image-id="' + current_image + '"]').attr('data-large-image')); } } else { $('#image-gallery-image').attr('src', $('[data-image-id="' + current_image + '"]').attr('data-large-image')); } disableButtons(counter, current_image); } function disableButtons(counter_max, counter_current){ $('#show-previous-image, #show-next-image').show(); if(counter_max == 1){ $('#show-next-image').hide(); $('#show-previous-image').hide(); } else if(counter_max == counter_current){ $('#show-next-image').hide(); } else if (counter_current == 1){ $('#show-previous-image').hide(); } } function loadGallery(setIDs, setClickAttr){ var current_image = $('.product-thumbnails li.active').attr('data-image-id'), selector; $('#show-next-image, #show-previous-image').click(function(){ if($(this).attr('id') == 'show-previous-image'){ if(current_id > 1){ current_id--; } } else { current_id++; } selector = $('[data-image-id="' + current_id + '"]'); updateGallery(selector); }); if(setIDs == true){ $('[data-image-id]').each(function(){ counter++; $(this).attr('data-image-id',counter).attr('src'); }); } $(setClickAttr).on('click',function(){ updateGallery($(this)); }); } $(document).ready(function (e) { $('.dateInput').mask('00/00/0000'); $('input[name=postcode]').mask('99999-999'); $('input[data-option-name=\'Comprimento (milímetros)\'], input[data-option-name=\'Largura (milímetros)\']').mask({thousands: '.', decimal: ',', precision: 2}); changeImage($('.product-thumbnails .active img')); $('.product-thumbnails img').on('click', function(){ changeImage($(this)); }); $('[data-product-option-id]').click(function(){ $('.added-option-price').remove(); $('.price').removeClass('animated rubberBand'); }); function priceOptionClick() { $('#simulator_payments_board').hide(); $('.product-single .product-price-attacked:not(.min-attacked)').hide(); if($('#input-quantity').length > 0){ var product_quantity = $('#input-quantity').val(); } else { var product_quantity = 1; } var total_price_option = 0; var rule_price_type = false; var option_price = 0; $('#product select[id^="options-graduation"], #product select[id^="input-option"], #product [data-toggle="popover"].selected, #product [type="checkbox"][data-toggle="popover_change"]:checked').each(function () { if ($('#' + $(this).val()).attr('data-content') || $('#' + $(this).attr('id') + '[type="text"]').attr('data-content') || $(this).hasClass('selected') || $(this).is('checked') || $('.' + $(this).attr('class') + '[type="radio"]').attr('data-content')) { let att_price = false; if ($('#' + $(this).val()).attr('data-content')) { var price_option = $('#' + $(this).val()).attr('data-content').split("|"); if(price_option[1]) { att_price = true; } } else if($(this).hasClass('selected') && $(this).attr('data-content')){ var price_option = $(this).attr('data-content').split("|"); if(price_option[1]) { att_price = true; } } else if ($('#' + $(this).attr('id') + '[type="text"]').attr('data-content') || $('.' + $(this).attr('class') + '[type="radio"]').attr('data-content')) { var price_option = $(this).attr('data-content').split("|"); if (!$(this).val() == '') { att_price = true; } } if(att_price) { let additional_price = 0; if (price_option[0] == 'sub') { price_option[1] = "-" + price_option[1]; } if ($(this).hasClass('custom-price')) { additional_price = parseFloat($(this).siblings('.option-total').find('.option-total-value').text().replace(',', '.')); } else { additional_price = parseFloat(price_option[1]); } total_price_option += additional_price; if (additional_price && $(this).attr('data-rule-price-type') !== undefined) { rule_price_type = true; } } } }); option_price += total_price_option; $.ajax({ url: 'index.php?route=product/product/priceOption', type: 'post', data: 'product_id=3269&option_price=' + option_price + '&product_quantity=' + product_quantity + '&rule_price_type=' + rule_price_type, dataType: 'json', beforeSend: function () { $('#simulator_payments_board').before(''); }, success: function (json) { $('#simulator_payments_board').show(); $('.product-single .product-price-attacked:not(.min-attacked)').show(); $('.loading').remove(); $('#simulate_payment').html(json.simulate_payment_output); parcel_simulator = json.calculate_prices_output.parcel_simulator; special = json.calculate_prices_output.special; price = json.calculate_prices_output.price; price_simulator = json.calculate_prices_output.price_simulator; price_discount = json.calculate_prices_output.price_discount; special_discount = json.calculate_prices_output.special_discount; special_simulator = json.calculate_prices_output.special_simulator; show_interest_installment = json.calculate_prices_output.show_interest_installment; no_interest_installments = json.calculate_prices_output.no_interest_installments; show_in_cash_discount = json.calculate_prices_output.show_in_cash_discount; text_discount_avista_list_products = json.calculate_prices_output.text_discount_avista_list_products; special_porcent = Math.round(json.calculate_prices_output.special_porcent); if(show_interest_installment && parcel_simulator > no_interest_installments){ text_interest = 'com juros'; }else{ text_interest = 'sem juros'; } text_discount = ''; if (text_discount_avista_list_products) { text_discount = ' '+ text_discount_avista_list_products +''; } cash_discount = ''; cash_discount_alert = ''; if (show_in_cash_discount) { cash_discount = '
* Em compras à partir de '+ show_in_cash_discount +''; cash_discount_alert = '*'; } if(special){ $('.product-single .product-price-old').html('De ' + price); $('.product-single .product-price-new').html('Por ' + special); if(special_discount){ $('.product-single .product-price-discount').html('ou '+ special_discount +' à vista' + text_discount + cash_discount_alert + cash_discount); } $('.product-single .product-price-simulator').html(''+parcel_simulator+'x de '+price_simulator+' '+text_interest+''); }else{ $('.product-single .product-main-price').html(price); if(price_discount){ $('.product-single .product-price-discount').html('ou '+ price_discount +' à vista' + text_discount + cash_discount_alert + cash_discount); } $('.product-single .product-price-simulator').html(''+parcel_simulator+'x de '+price_simulator+' '+text_interest+''); } if(json.price_attacked && json.attacked_status){ $('.product-single .product-price-attacked:not(.min-attacked)').html('Preço de Atacado: ' + json.price_attacked + ''); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } $('[data-toggle="popover"]').click(function(){ priceOptionClick(); }); $('.grid_remove_selected').click(function () { $(this).parent().removeClass('selected'); $(this).parent().removeClass('grid_selected'); $(this).parent().find('input[name="quantity_grid"]').val(0); totalQuantity(); return false; }); /* Adição e Subtração */ $('#input-quantity').change(function() { priceOptionClick(); }); }); $('.product-number #input-quantity').blur(function(){ quantity_value = $('.product-number #input-quantity').val(); if(quantity_value <= 0 || quantity_value == ''){ $('.product-number #input-quantity').val(1); } }); var clear_time; $('#button-quote_product').on('click', function () { var quantity = $('input[type="number"][name="quantity"]').val(); if (!quantity) { quantity = 1; } var params = ""; params = params + "&postcode=" + $('input[name=\'postcode\']').val(); params = params + "&product_id=3269"; params = params + "&weight=0.5000"; params = params + "&width=10,00"; params = params + "&height=10,00"; params = params + "&days_stock=0"; params = params + "&price=22.52"; params = params + "&quantity_product=" + quantity; if($('input[name=postcode]').val().length < 8){ $('#modal-shipping').empty(); $('#button-quote_product').button('loading'); $('#modal-shipping').html('
 Cep Inválido. O Cep deve conter no mínimo 7 dígitos.
'); $('#button-quote_product').button('reset'); clearTimeout(clear_time); clear_time = setTimeout(function(){ $('#modal-shipping').fadeOut('slow', function(){ $(this).empty(); $(this).show(); }); }, 5000); } else { $.ajax({ url: 'index.php?route=module/shipping/simulate', type: 'post', data: params, dataType: 'json', beforeSend: function () { $('#button-quote_product').button('loading'); }, complete: function () { $('#button-quote_product').button('reset'); }, success: function (json) { $('#modal-shipping').empty(); $('#shipping-error').empty(); $('.alert, .text-danger, .simulate_shipping_methods, #shipping-error').remove(); if (json['error']) { if (json['error']['warning']) { $('#shipping-error').remove(); $('.postcode-inputs').append('
x
' + json['error']['warning'] + '
'); } if (json['error']['postcode']) { $('.postcode-inputs').append('
' + json['error']['postcode'] + '
'); } } if (json['shipping_method']) { html = '
'; html += '
x
'; html_error = ''; for (i in json['shipping_method']) { if (!json['shipping_method'][i]['error']) { for (j in json['shipping_method'][i]['quote']) { if(j == 'frete_rapido'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } } } else if (j == 'mandae'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'jadlog_api'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'melhor_envio'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } }else if (j == 'rodoe'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'frenet'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'data_frete') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'intelipost') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'smart_envios') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'kangu') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else if (j == 'rede_sul') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''; } } } else { html += '
'; html += ''; html += '
'; if(json['shipping_method'][j]['info']){ html += ''; } if(json['shipping_method'][i]['quote'][j]['code'] == 'pickup.pickup'){ for (k in json['shipping_method'][i]['locations']){ html += ''; } } } } } else { if ((i == 'sedex' || i == 'pac') && html_error.search(json['shipping_method'][i]['quote'][i]['msgErro']) == -1) { if (json['shipping_method']['sedex'] == undefined || json['shipping_method']['pac'] == undefined) { html_error += '
' + json['shipping_method'][i]['quote'][i]['msgErro'] + '
'; } else if (json['shipping_method']['sedex']['error'] && json['shipping_method']['pac']['error']) { html_error += '
' + json['shipping_method'][i]['quote'][i]['msgErro'] + '
'; } } else if (i === 'mandae' || i === 'carriersapí' && i != 'pickup') { console.log(json['shipping_method'][i]['error']); html += '
'; html += ''; html += '
'; } else if (i != 'sedex' && i != 'pac' && i != 'mandae' && i != 'carriersapí') { html_error += '
' + json['shipping_method'][i]['quote'][i]['msgErro'] + '
'; } } } html += html_error; html += '
'; $(html).insertAfter('.postcode-inputs'); } $('.product-shipping-form .simulate_shipping_methods .close-popup, .product-shipping-form #shipping-error .close-popup').on('click', function(){ $('.product-shipping-form .simulate_shipping_methods, .product-shipping-form #shipping-error').fadeOut('fast', function(){ $(this).remove(); }); }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } }); $('select[id^="options-graduation"], select[id^="input-option"], [type="checkbox"][data-toggle="popover_change"], #product input:radio').change(function () { if($(this).attr('data-product-option-id')){ var data_product_option_id = $(this).attr('data-product-option-id'); $("#preview_graduation" + data_product_option_id + " #img_value").remove(); if ($('#' + $(this).val()).data('image')) { $("#preview_graduation" + data_product_option_id).append("
"); } } if($('#input-quantity').length > 0){ var product_quantity = $('#input-quantity').val(); } else { var product_quantity = 1; } var total_price_option = 0; var rule_price_type = false; var option_price = 0; $('#product select[id^="options-graduation"], #product select[id^="input-option"], #product [data-toggle="popover"].selected, #product [type="checkbox"][data-toggle="popover_change"]:checked, #product input:radio:checked').each(function () { if ($('#' + $(this).val()).attr('data-content') || $('#' + $(this).attr('id') + '[type="text"]').attr('data-content') || $(this).hasClass('selected') || $(this).is('checked') || $('.' + $(this).attr('class') + '[type="radio"]').attr('data-content')) { let att_price = false; if ($('#' + $(this).val()).attr('data-content')) { var price_option = $('#' + $(this).val()).attr('data-content').split("|"); if(price_option[1]) { att_price = true; } } else if($(this).hasClass('selected') && $(this).attr('data-content')){ var price_option = $(this).attr('data-content').split("|"); if(price_option[1]) { att_price = true; } } else if ($('#' + $(this).attr('id') + '[type="text"]').attr('data-content') || $('.' + $(this).attr('class') + '[type="radio"]:checked').attr('data-content')) { var price_option = $(this).attr('data-content').split("|"); if (!$(this).val() == '') { att_price = true; } } if(att_price) { let additional_price = 0; if (price_option[0] == 'sub') { price_option[1] = "-" + price_option[1]; } if ($(this).hasClass('custom-price')) { additional_price = parseFloat($(this).siblings('.option-total').find('.option-total-value').text().replace(',', '.')); } else { additional_price = parseFloat(price_option[1]); } total_price_option += additional_price; if (additional_price && $(this).attr('data-rule-price-type') !== undefined) { rule_price_type = true; } } } }); option_price += total_price_option; $('#simulator_payments_board').hide(); $('.product-single .product-price-attacked:not(.min-attacked)').hide(); $.ajax({ url: 'index.php?route=product/product/priceOption', type: 'post', data: 'product_id=3269&option_price=' + option_price + '&product_quantity=' + product_quantity + '&rule_price_type=' + rule_price_type, dataType: 'json', beforeSend: function () { $('#simulator_payments_board').before(''); }, success: function (json) { $('#simulator_payments_board').show(); $('.product-single .product-price-attacked:not(.min-attacked)').show(); $('.loading').remove(); $('#simulate_payment').html(json.simulate_payment_output); parcel_simulator = json.calculate_prices_output.parcel_simulator; special = json.calculate_prices_output.special; price = json.calculate_prices_output.price; price_simulator = json.calculate_prices_output.price_simulator; price_discount = json.calculate_prices_output.price_discount; special_discount = json.calculate_prices_output.special_discount; special_simulator = json.calculate_prices_output.special_simulator; show_interest_installment = json.calculate_prices_output.show_interest_installment; no_interest_installments = json.calculate_prices_output.no_interest_installments; show_in_cash_discount = json.calculate_prices_output.show_in_cash_discount; text_discount_avista_list_products = json.calculate_prices_output.text_discount_avista_list_products; special_porcent = Math.round(json.calculate_prices_output.special_porcent); if(show_interest_installment && parcel_simulator > no_interest_installments){ text_interest = 'com juros'; }else{ text_interest = 'sem juros'; } text_discount = ''; if (text_discount_avista_list_products) { text_discount = ' '+ text_discount_avista_list_products +''; } cash_discount = ''; cash_discount_alert = ''; if (show_in_cash_discount) { cash_discount = '
* Em compras à partir de '+ show_in_cash_discount +''; cash_discount_alert = '*'; } if(special){ $('.product-single .product-price-old').html('De ' + price); $('.product-single .product-price-new').html('Por ' + special); if(special_discount){ $('.product-single .product-price-discount').html('ou '+ special_discount +' à vista' + text_discount + cash_discount_alert + cash_discount); } $('.product-single .product-price-simulator').html(''+parcel_simulator+'x de '+price_simulator+' '+text_interest+''); }else{ $('.product-single .product-main-price').html(price); if(price_discount){ $('.product-single .product-price-discount').html('ou '+ price_discount +' à vista' + text_discount + cash_discount_alert + cash_discount); } $('.product-single .product-price-simulator').html(''+parcel_simulator+'x de '+price_simulator+' '+text_interest+''); } if(json.price_attacked && json.attacked_status){ $('.product-single .product-price-attacked:not(.min-attacked)').html('Preço de Atacado: ' + json.price_attacked + ''); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); }); $('#button-consult').on('click', function () { $.ajax({ url: 'index.php?route=product/product/price_consult', type: 'post', data: 'product_id=3269', dataType: 'json', beforeSend: function () { $('#button-consult').button('loading'); }, complete: function () { $('#button-consult').button('reset'); }, success: function (json) { html = ''; $('.modal-price-consult').remove(); $('body').append(html); $('#modal-price-consult').modal('show'); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.responseText); } }); }); $('.buy-together select').on('change', function(){ $(this).parent().removeClass('has-error'); }); $('.button-cart').on('click', function () { var error_select_option = false; if($(".addBuyTogetherProduct").length){ $(".addBuyTogetherProduct").each(function(index, element) { var product_id = $(this).data("buyTogetherProductId"); if ($(".buy-together-" + product_id + " select").length) { $('.buy-together-' + product_id + " select").each(function (i, e) { if ($(this).val() == 0) { error_select_option = true; $(this).parent().addClass('has-error'); } }); } else { $('.buy-together-' + product_id + " .product_options_list").each(function (i, e) { if ($(this).find('input[type="hidden"]').val() == 0) { error_select_option = true; $(this).parent().addClass('has-error'); } }); } if(error_select_option){ $('#error-insert').remove(); $('.product-single .product-prices-content').after('
Você precisa selecionar algum tamanho!
'); clearTimeout(clear_time); clear_time = setTimeout("$('#error-insert').fadeOut();", 5000); } }); } if(!error_select_option){ if($('#input-quantity').hasClass('packageTrigger')){ $('.packageTrigger').trigger('click'); return; } addCart(); } }); $('button[id^=\'button-upload\']').on('click', function (event) { var node = $(this); var option_id = node.data('upload-option-id'); $('#form-upload').remove(); $('body').prepend(''); $('#form-upload input[name=\'file\']').trigger('click'); $('#form-upload').on('change', function(){ if ($('#form-upload input[name=\'file\']').val() != '') { $.ajax({ url: 'index.php?route=tool/upload&upload-option-id=' + node.data('upload-option-id'), type: 'post', dataType: 'json', data: new FormData($('#form-upload')[0]), cache: false, contentType: false, processData: false, beforeSend: function () { $(node).button('loading'); }, success: function (json) { $('.text-danger').remove(); $('.alert-success').remove(); if (json['error']) { $(node).button('reset'); $(node).parent().find('input').after('
' + json['error'] + '
'); } if (json['success']) { swal(json.success); var str = json.filename; var res = str.slice(-4); if(str.length > 30){ var res2 = str.slice(0, 15); } else{ var res2 = str.slice(0, (str.length / 2)); } $(node).html(res2 + '(...)' + res).addClass('btn btn-success').removeClass('disabled').removeAttr('disabled'); $(node).parent().find('input').attr('value', json['code']); } }, error: function (xhr, ajaxOptions, thrownError) { console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); } }); }); $('.options-list textarea, .options-list input[type="text"]').focusout(function(){ $(this).parent().removeClass('has-error'); $(this).siblings('.alert').remove(); $('.product-option-warning').remove(); }); function addCart(){ var package = ''; if($(".sizes").hasClass('packageTrigger selected') || $('#input-quantity').hasClass('packageTrigger')){ package = 'packageTrigger'; } $.ajax({ url: 'index.php?route=checkout/cart/add&package=' + package + '&v='+new Date().getTime(), type: 'post', data: $('#product input[type=\'text\'], #product input[type=\'hidden\']:not(.buy-together-opt), #product #input-quantity, #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select:not(.buy-together-opt), #product textarea'), dataType: 'json', beforeSend: function () { $('.button-cart').button('loading'); }, async: false, success: function (json) { $('.alert, .text-danger').remove(); $('.form-group').removeClass('has-error'); $('#product .product-option-warning').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { var element = $('#input-option' + i.replace('_', '-')); if (element.parent().hasClass('input-group')) { element.parent().after(''); } else { element.after(''); } } } if (json['error']['recurring']) { $('select[name=\'recurring_id\']').after(''); } if (json['error']['product']) { $('#button-cart').before(''); } if (json['error']['empty_option']) { $('#button-cart').before(''); } if($('#product .options-list').length){ $('html, body').animate({scrollTop: $('#product .options-list').offset().top - 60}, 700); } $('.text-danger').parent().addClass('has-error'); $('
Preencha os campos obrigatórios para prosseguir na compra.
').insertAfter('#product .product-prices-content'); $('.button-cart').button('reset'); } if (json['error_stock']) { $('.button-cart').button('reset'); html = ''; $(".top_modal").remove(); $('body').append(html); $('#modal-cart').modal('show'); } if (json.buy_permission) { $.each(json.buy_permission, function(index, value) { if((value == null) && (!json.error && !json.error_stock)){ $('#modal-cart').remove(); $('.modal-content').remove(); swal({ title : 'Produto temporariamente reservado. Ele poderá ficar disponivel caso o cliente venha a desistir do mesmo', html: '
Qualquer duvida permanecemos a disposição
', type: 'error', timer: 3000, onClose: function() { window.location.href = window.location.href; } }); return false; } else { if(value == 'upon_request'){ swal({ title : 'Produto temporariamente reservado. Você Ainda poderá Finalizar seu pedido com a nossa exclusiva ferramenta de Sob-Encomenda', html: '
Qualquer duvida permanecemos a disposição
', type: 'error', showConfirmButton: true, timer: 5000, onClose: function() { window.location.href = window.location.href; } }); return false; } } }); } if (!$(".addBuyTogetherProduct").length) { if (json['success_redirect'] && !json['fail_redirect']) { location.href = json['success_redirect']; } if (json.success_modal) { $('#modal-cart').remove(); $('.button-cart').button('reset'); html = ''; $(".top_modal").remove(); $('body').append(html); $('#modal-cart').modal('show'); $('#cart-total').html(json['total']); $('#cart-quantity').html(json['total_quantity']); $('#cart .rd-navbar-list-products').load('index.php?route=common/cart/info #cart .rd-navbar-list-products > li'); } } else if ($(".addBuyTogetherProduct").length && !json['error'] && !json['error_stock']) { $(".addBuyTogetherProduct").each(function(index, element) { var product_id = $(this).data("buyTogetherProductId"); var option = {}; if ($(".buy-together-" + product_id + " select").length) { $(".buy-together-" + product_id + " select").each(function (i, e) { option[$(this).data("product-option-id")] = $(this).val(); }); } else { option[$(".buy-together-" + product_id + " input").data("product-option-id")] = $(".buy-together-" + product_id + " input").val(); } if ($(".buy-together-" + product_id + " input[type='text']").length) { $(".buy-together-" + product_id + " input[type='text']").each(function (i, e) { option[$(this).data("product-option-id")] = $(this).val(); }); } if ($(".buy-together-" + product_id + " textarea").length) { $(".buy-together-" + product_id + " textarea").each(function (i, e) { option[$(this).data("product-option-id")] = $(this).val(); }); } if ($(".buy-together-" + product_id + " input[data-upload-option-id]").length) { $(".buy-together-" + product_id + " input[data-upload-option-id]").each(function (i, e) { option[$(this).data("upload-option-id")] = $(this).val(); }); } $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', async: false, data: { 'product_id' : product_id, 'quantity' : 1, 'option' : option }, dataType: 'json', beforeSend: function () { $('.button-cart').button('loading'); }, success: function (json) { if (json['error_stock']) { html = ''; $(".top_modal").remove(); $('body').append(html); $('#modal-cart').modal('show'); } else{ if (json.success_modal) { $('#modal-cart').remove(); $('.button-cart').button('reset'); html = ''; $(".top_modal").remove(); $('body').append(html); $('#modal-cart').modal('show'); $('#cart-total').html(json['total']); $('#cart-quantity').html(json['total_quantity']); $('#cart .rd-navbar-list-products').load('index.php?route=common/cart/info #cart .rd-navbar-list-products > li'); } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); }); if(!json.success_modal){ setTimeout(function() { closeLoad(); location.href = "index.php?route=checkout/cart"; }, 5000); } } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } $('#button-review').on('click', function () { $.ajax({ url: 'index.php?route=product/product/write&product_id=3269', type: 'post', dataType: 'json', data: 'name=' + encodeURIComponent($('#review-form input[name=\'name\']').val()) + '&email=' + encodeURIComponent($('#review-form input[name=\'email\']').val()) + '&cellphone=' + encodeURIComponent($('#review-form input[name=\'cellphone\']').val()) + '&text=' + encodeURIComponent($('#review-form textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('#review-form input[name=\'rating\']:checked').val() ? $('#review-form input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('#review-form input[name=\'captcha\']').val()), beforeSend: function () { $('#button-review').button('loading'); }, success: function (json) { $('.alert-success, .alert-danger').remove(); $('#button-review').button('reset'); if (json['error']) { $('#button-review').before('
' + json['error'] + '
'); } if (json['success']) { $('#review-form .modal-header').html('

Agradecemos sua avaliação

'); $('#review-form .modal-body').fadeOut('fast'); setTimeout(function(){ $('#review-form').modal('hide'); }, 3000); $('#button-review').before('
' + json['success'] + '
'); $('input[name=\'name\']').val(''); $('input[name=\'email\']').val(''); $('input[name=\'cellphone\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').prop('checked', false); $('input[name=\'captcha\']').val(''); $('#captcha').attr('src', 'index.php?route=tool/captcha#' + new Date().getTime()); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); }); $('#review-form').on('show.bs.modal', function(){ $('.captcha-image').each(function(){ if (!$(this).hasClass('loaded')) { let captcha_image = ''; captcha_image = captcha_image ? 'data:image/jpeg;base64,' + captcha_image : 'index.php?route=tool/captcha'; $(this).attr('src', captcha_image); $(this).addClass('loaded'); } }); }); $("#review-form").on('show.bs.modal', function(){ $('#review-form .modal-header').html('

Faça uma avaliação

'); $('#review-form .modal-body').fadeIn('fast'); }); $('input[name=\'postcode\']').keydown(function (e) { if (e.keyCode == 13) { $('#button-quote_product').click(); } }); $('.notify-btn').on('click', function () { $('#product_notify').remove(); var product_id = $(this).attr('data-product-id'); var data_product_option_id = $(this).attr('data-product-option-id'); var data_product_option_value_id = $(this).attr('data-product-option-value-id'); if(screen.width >= 992){ $('
').insertBefore('#product'); $('#product').hide(); $('#product_notify').load('index.php?route=product/notify&product_id=' + product_id + '&data_product_option_id=' + data_product_option_id + '&data_product_option_value_id=' + data_product_option_value_id); } else { html = ''; $('body').append(html); $('#notify-content').load('index.php?route=product/notify&product_id=' + product_id + '&data_product_option_id=' + data_product_option_id + '&data_product_option_value_id=' + data_product_option_value_id); $('#modal-notify').modal('show'); } }); function verifyCm(){ if(!$('#value_centimeters_filter').val() && $('#value_centimeters_filter').length){ $('.guide-shoes_erro_filter').fadeIn('slow'); return false; } $.ajax({ url: 'index.php?route=product/product/checkSizeOption', type: 'post', data: { 'product_id' : '3269', 'value_centimeters' : $("#value_centimeters").val(), 'filter_type' : $("#value_centimeters_filter").val() }, dataType: 'json', beforeSend: function () { $('.btn-shoes_guide').button('Carregando...'); }, complete: function () { $('.btn-shoes_guide').button('reset'); }, success: function (json) { if(json.name){ html = ""; $('.modal-shoes-guide').remove(); $('body').append(html); $('#modal-shoes-guide').modal('show'); } else { $('.guide-shoes_erro').fadeIn('slow'); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } function totalQuantity() { $('.total-stock-div').removeAttr('hidden'); var total_stock_quantity = 0; $('.quantity-grid').each(function() { if (!$(this).val() == ''){ total_stock_quantity = total_stock_quantity + parseInt($(this).val()); } }); $('.total-stock-div .total-stock-content span').text(total_stock_quantity); } /* PRODUCT STOCK IMAGE */ if(window.matchMedia("(min-width: 768px)").matches) { $('div.product-options-list .custom-product-stock-image-label').click(function() { if ($(this).prev().hasClass('selected')) { $('.product-image .product-thumbnails li:first-child').click(); } $('div.product-options-list .custom-product-stock-image-label > img').removeClass('current-img'); if($(this).children('.product_stock_image').hasClass('product_stock_image')) { changeStockImage($(this).children('.product_stock_image')); } else { $('.product-image .product-thumbnails li:first-child').click(); } }); } if(window.matchMedia("(max-width: 767px)").matches) { $('div.product-options-list .custom-product-stock-image-label').click(function() { if ($(this).prev().hasClass('selected')) { $('.product-image .product-thumbnails li:first-child').click(); } $('div.product-options-list .custom-product-stock-image-label > img').removeClass('current-img'); if($(this).children('.product_stock_image').hasClass('product_stock_image')) { changeStockImage($(this).children('.product_stock_image')); } else { $('.product-image .product-thumbnails li:first-child').click(); } }); } if(window.matchMedia("(max-width: 767px)").matches) { if($('.product_carousel_mobile').length) { /* QUANDO CARROSSEL TEM MAIS DE UMA IMAGEM */ if($('.product_carousel_mobile.owl-carousel').length) { var old_img_src_caroussel_mobile = $('.product_carousel_mobile .owl-stage > .owl-item.active img').attr('src'); var old_product_carousel_mobile_html = $('#content .product_carousel_mobile').parent().html(); $('ul.product_options_list > li img').click(function() { var product_carousel_mobile_html = $('#content .product_carousel_mobile').parent().html(); loadYoutubeEmbed(); $('ul.product_options_list > li img').removeClass('current-img'); if($(this).hasClass('product_stock_image')) { $('.product_carousel_mobile').parent().html(product_carousel_mobile_html); let img_src = $(this).attr('data-original-image'); $('.product_carousel_mobile .owl-stage > .owl-item.active img').addClass('stock_img_carousel_mobile').attr('src', img_src); $('.popup-zoom .product_carousel_mobile .owl-stage > .owl-item:first-child img').addClass('stock_img_carousel_mobile').attr('src', img_src); } else { if($('.product_carousel_mobile .owl-stage > .owl-item.active img').hasClass('stock_img_carousel_mobile')) { $('.product_carousel_mobile').parent().html(old_product_carousel_mobile_html); } } }); } else { if ($('.custom-product-stock-image-label').length) { $('.product-options-list .custom-product-stock-image-label').click(function() { if($(this).children('.product_stock_image').hasClass('product_stock_image')) { let img_src = $(this).children('.product_stock_image').attr('data-original-image'); $('.product_carousel_mobile .grid_product_picture > img').attr('src', img_src); } }); } else { $('ul.product_options_list > .li_stock_image').click(function() { if($(this).children('.product_stock_image').hasClass('product_stock_image')) { let img_src = $(this).children('.product_stock_image').attr('data-original-image'); $('.product_carousel_mobile .grid_product_picture > img').attr('src', img_src); } }); } } } else { $('ul.product_options_list > .li_stock_image').click(function() { $('ul.product_options_list > li img').removeClass('current-img'); if($(this).children('.product_stock_image').hasClass('product_stock_image')) { changeStockImage($(this).children('.product_stock_image')); } else { $('#carousel li:first-child').click(); } }); } } function changeStockImage(el) { $('.product-preview > img').attr('src', el.attr('data-original-image')); $('.product-preview > img').attr('data-zoom-image', el.attr('data-original-image')); $('#carousel > li').removeClass('current-img'); el.addClass('image-additional current-img'); if(screen.width > 900){ $('.zoomContainer').remove(); $(".product-preview > img").elevateZoom({backgroundImage: el.attr('data-original-image'), zoomType: "inner", cursor: "crosshair"}); } }