"); } }); }); if((navigator.userAgent.indexOf("MSIE") != -1 ) || (!!document.documentMode == true )) { $.getScript('https://cdn.jsdelivr.net/npm/promise-polyfill@7.1.0/dist/promise.min.js'); } /*Datetimepicker não será mais utilizado $('.date').datetimepicker({ pickTime: false }); $('.datetime').datetimepicker({ pickDate: true, pickTime: true }); $('.time').datetimepicker({ pickDate: false });*/ $('input[id^=\'input-quantity_grid\']').on('blur', function(event) { if($(this).parent().hasClass('packageTrigger')){ var product_option_id = $(this).parent().data('product-option-id'); var product_option_value_id = $(this).parent().data('product-option-value-id'); var product_id = $(this).attr('data-product-id'); var product_package_term = 'O produto em questão será fabricado e enviado no prazo de trinta dias.'; /*Quando o cliente utiliza a ordem de compra do produto e o mesmo possui um prazo para retornar ao estoque*/ $.ajax({ url: 'index.php?route=product/product/checkPurchaseOption&product_option_value_id=' + product_option_value_id + '&product_id=' + product_id, dataType: 'json', async: false, success: function (json) { if(json.success){ product_package_term = json.success; } } }); $('.button-cart').removeClass('animated tada'); swal({ title: 'Produto Sob Encomenda:', html: '
'+product_package_term+'
', type: 'warning', showCancelButton: true, confirmButtonColor: '#61a642', cancelButtonColor: '#d33', confirmButtonText: 'Eu aceito', cancelButtonText: 'Não concordo', }).then(function(result){ if (result.value) { swal({ title : 'Produto Adicionado Com Sucesso!', html: '
Fique atento ao prazo de produção, qualquer dúvida entre em contato
', type: 'success', showConfirmButton: false, timer: 3000, onClose: function() { $('.button-cart').addClass('animated tada'); } }); } else { swal({ title : 'O Produto Não foi Adicionado ao Carrinho', html: '
Qualquer duvida permanecemos a disposição
', type: 'error', showConfirmButton: false, timer: 3000, onClose: function() { $('.options_list').find('.inputcheck.packageTrigger').prop('checked', false); $('.product-floating').find('.inputfloating.packageTrigger').prop('checked', false); $('li[data-product-option-value-id="' + product_option_value_id + '"]').removeClass('selected'); $('.text-danger').remove(); $('#input-option' + product_option_id).val(''); $('#input-quantity_grid-' + product_option_value_id).val(0); } }); } }) } }); $('.options_list textarea, .options_list input[type="text"]').focusout(function(){ $(this).parent().removeClass('has-error'); $(this).siblings('.alert').remove(); $('.product-option-warning').remove(); }); $('input[name="quantity_grid"]').focusout(function(){ if(parseInt($(this).val()) < 0 || parseInt($(this).val()) > parseInt($(this).attr('max'))){ $(this).val(0); } }); $('.sizes').on('click change',function () { if ($(this).data('grid-stock')) { $(this).find('input[name="quantity_grid"]').attr('value', 1); $(this).find('input[name="quantity_grid"]').trigger('input'); if(($(this).find('input[name="quantity_grid"]').val() == 0)){ $(this).removeClass('grid_selected selected'); return; } $(this).addClass('grid_selected selected'); $('.text-danger, .alert-danger').fadeOut(function(){ $('.text-danger, .alert-danger').remove(); }); product_option_id = $(this).data('product-option-id'); product_option_value_id = $(this).data('product-option-value-id'); $('#input-option' + product_option_id).val(product_option_value_id); } else { $('.size-' + $(this).data('product-option-id')).removeClass('selected'); if($(this).hasClass('selected')){ $(this).parents('.product_options_list').find('.sizes').removeClass('selected'); product_option_id = $(this).data('product-option-id'); $('#input-option' + product_option_id).val(''); } else { $(this).parents('.product_options_list').find('.sizes').removeClass('selected'); $(this).addClass('selected'); $('.text-danger').remove(); product_option_id = $(this).data('product-option-id'); product_option_value_id = $(this).data('product-option-value-id'); $('#input-option' + product_option_id).val(product_option_value_id); } } changeImageSelectNew($(this)); }); $('.price-entry').change(function(){ $('.custom-price').each(function(){ let priceOptions = $(this).attr('data-price-options').split('|'); let totalOperation = $(this).attr('data-content').split('|'); let optionsOperation = $(this).attr('data-options-operation'); let minimum_unit_value = 0; if (priceOptions && totalOperation[1] && optionsOperation) { let newValue = optionsOperation == '*' ? 1 : 0;/* inicializa com 1 caso for multiplacação para não zerar o cálculo na primeira execução*/ priceOptions.map(function(value, index){ let optionValue = 0; if ($(`input[data-option-id="${value}"]`).length && $(`input[data-option-id="${value}"]`).val()) { optionValue = parseFloat($(`input[data-option-id="${value}"]`).val().replace(/,/g, '.')); } if (optionsOperation == '*') { newValue *= optionValue; } else { newValue += optionValue; } }); $(this).val(newValue.toFixed(2)); if (totalOperation[0] && totalOperation[1]) { let optionTotalFoo = parseFloat(totalOperation[1]) * newValue; if (optionTotalFoo <= minimum_unit_value) { optionTotal = minimum_unit_value; } else { optionTotal = optionTotalFoo; } optionTotal = optionTotal.toFixed(2).toString().replace('.', ','); $(this).siblings('.option-total').fadeIn(); if (totalOperation[0] == 'mor') { $(this).siblings('.option-total').find('.option-total-value').html(optionTotal); } else if (totalOperation[0] == 'sub') { $(this).siblings('.option-total').find('.option-total-value').html('-' + optionTotal); } } } }); }); function changeImageSelectNew(option_element) { $('.select-new-option-' + option_element.data('product-option-id') + ' img').remove(); $('.select-new-option-' + option_element.data('product-option-id') + ' span').fadeIn(300); if (option_element.data('product-option-id') && $('.select-new-option-' + option_element.data('product-option-id')).length) { let option_original_image = option_element.find('img').data('original-image'); if (option_element.hasClass('selected')) { let select_new_option = $('.select-new-option-' + option_element.data('product-option-id') + ' .img-option-zoom'); select_new_option.find('span').css('display', 'none'); select_new_option.append('').hide().fadeIn(300); } } } if (window.matchMedia("(max-width: 1199px)").matches) { $('.product_options_list.col-lg-6').addClass('owl-carousel owl-theme'); var owl = $('.product_options_list.owl-carousel'); owl.owlCarousel({ autoHeight: false, autoplay: false, center: true, items: 1, nav: true, navText: ['', ''], responsive:{ 0:{ items:2 }, 768:{ items:2 } } }); $(document).on('click', '.product_options_list .owl-item .sizes', function() { $(this).parents('.owl-carousel').trigger('to.owl.carousel', $(this).parent('.owl-item').index()); }); } var product_package = 'on'; $('.packageTrigger').click(function(){ if($(this).find('span.grid_remove_selected').length == 1){ return false; } var product_option_id = $(this).data('product-option-id'); var product_option_value_id = $(this).data('product-option-value-id'); var product_id = $(this).attr('data-product-id'); var product_package_term = 'O produto em questão será fabricado e enviado no prazo de trinta dias.'; /*Quando o cliente utiliza a ordem de compra do produto e o mesmo possui um prazo para retornar ao estoque*/ $.ajax({ url: 'index.php?route=product/product/checkPurchaseOption&product_option_value_id=' + product_option_value_id + '&product_id=' + product_id, dataType: 'json', async: false, success: function (json) { if(json.success){ product_package_term = json.success; } } }); $('.button-cart').removeClass('animated tada'); swal({ title: 'Produto Sob Encomenda', html: '
'+product_package_term+'
', type: 'warning', showCancelButton: true, confirmButtonColor: '#61a642', cancelButtonColor: '#d33', confirmButtonText: 'Eu aceito', cancelButtonText: 'Não concordo', }).then(function(result){ if (result.value) { swal({ title : 'Produto Adicionado Com Sucesso!', html: '
Fique atento ao prazo de produção, qualquer dúvida entre em contato
', type: 'success', showConfirmButton: false, timer: 3000, onClose: function() { let data = generateJsonToSendProducts(); let redirect = '/'; var animate = 0; if($('.options_list').find('.required').length){ $('.options_list').find('.required').each(function(index, el) { if($(this).find('.selected').length === 0){ animate = 1; } }); }else{ sendProductToCart(data, redirect); } if(animate === 1 && !$('.uniqueInputValue').val()){ $('.button-cart').addClass('animated tada'); } else{ if($('.options_list').find('.required').length){ sendProductToCart(data, redirect); } } } }); } else { swal({ title : 'O Produto Não foi Adicionado ao Carrinho', html: '
*Em compras a partir de '+ show_in_cash_discount +'
'; cash_discount_alert = '*'; } prefix = ''; square = false; if(special){ if(!square) { $('.price_old_product span:last-child').html(price + prefix); $('.product_details_content .price, .product-floating .price').html(` Por ${jsonPO.special} ${prefix} ${jsonPO.payment_type ? ''+ jsonPO.payment_type+ '' : '' } `); } if($('.square-calculate-price span').length > 0) { $('.square-calculate-price span').html(special); } if(special_discount){ if($('.avista_price_product .discount_simulator').length){ $('.avista_price_product').html(` ou ${special_discount} à vista ${text_special_porcent} ${text_discount_avista} ${cash_discount_alert} ${cash_discount} `); } else { $('.avista_price_product').html(` ou ${special_discount} à vista ${text_special_porcent} ${text_discount_avista} ${cash_discount_alert} ${cash_discount} `); } } $('.price_simultador_product').html(` ${special} em ${(show_interest_installment == '2' && parcel_simulator && (Number(parcel_simulator) > Number(no_interest_installments)))? `${no_interest_installments}x de ${special_simulator_no_interest}${text_no_interest} ou `: `` } ${parcel_simulator}x de ${special_simulator} ${Number(parcel_simulator) > Number(no_interest_installments) ? text_always_interest : text_no_interest} `); }else{ if(!square) { $('.product_details_content .price, .product-floating .price').html(price + prefix); } if($('.square-calculate-price span').length > 0) { $('.square-calculate-price span').html(price); } if(price_discount){ if($('.avista_price_product .discount_simulator').length){ $('.avista_price_product').html(' ou '+price_discount+' à vista ' + text_special_porcent + text_discount_avista + cash_discount_alert +''+ cash_discount); } else { $('.avista_price_product').html(' ou '+price_discount+' à vista ' + text_special_porcent + text_discount_avista + cash_discount_alert + cash_discount); } } let variationPrice= ''; let interestFree_variation =''; if (show_interest_installment == '2' && parcel_simulator && (parseInt(parcel_simulator) > parseInt (no_interest_installments))){ variationPrice = `${no_interest_installments}x de ${price_simulator_no_interest}${text_no_interest} ou `; }; if (parcel_simulator && (parseInt(parcel_simulator) >= parseInt(no_interest_installments))){ interestFree_variation = `${no_interest_installments}x de ${price_simulator_no_interest}${text_no_interest}`; }else { interestFree_variation= `${parcel_simulator}x de ${price_simulator}${text_no_interest}`; } if (variationPrice) { } $('.price_simultador_product').html(` ${price} em ${interestFree_variation} `); if ($('.card_discount_product').length && installments_discount_value) { $('.card_discount_product').html(` ${installments_discount_value}em${installments_discount_parcel}xno cartão `); } } if(json.price_attacked && json.attacked_status){ $('.product-info .price_attacked:not(.min-attacked)').html('Preço de Atacado: ' + json.price_attacked + ''); } if (json.points_option) { $('.reward-points strong').html(json.points_option); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest.responseText); } }); } $('#img_aro').removeAttr('style'); $('.quantity_display #input-quantity').blur(function(){ quantity_value = $('.quantity_display #input-quantity').val(); if(quantity_value <= 0 || quantity_value == ''){ $('.quantity_display #input-quantity').val(1); } }); var smartHintEnabled = 0; $('#button-quote_product').on('click', function () { var quantity = $('#input-quantity').val(); if (!quantity) { quantity = 1; } total_stock_quantity = 1; if ($('.sizes.selected').length) { var product_option_value_id_size = $('.sizes.selected').attr('data-product-option-value-id'); } else { var product_option_value_id_size = 0; } let width = '30.00'; let height = '30.00'; var params = { "postcode": $('input[name=\'postcode\']').val(), "product_id": '43871', "weight": '0.4000', "width": width, "height": height, "days_stock": '0', "price": '299.9', "price_without_currency": '299.90', "product_special_price": '', "price_special_type": '', "special_percent": '', "special_payment_method": '', "quantity_product": quantity, "product_option_value_id_size" : product_option_value_id_size, form: {} }; $('#product input[type=\'text\']').each(function(){ if ($(this).val()) { params['form'][$(this).attr('name')] = $(this).attr('data-product-option-id'); } }); $('#product input[type=\'hidden\']:not(.buy-together-opt)').each(function(){ if ($(this).val()) { params['form'][$(this).attr('name')] = $(this).val(); } }); $('#product input[type=\'radio\']:checked').each(function(){ if ($(this).val()) { params['form'][$(this).attr('name')] = $(this).val(); } }); $('#product input[type=\'checkbox\']:checked').each(function(){ if ($(this).val()) { params['form'][$(this).attr('name')] = $(this).val(); } }); $('#product select:not(.buy-together-opt)').each(function(){ if ($(this).val()) { params['form'][$(this).attr('name')] = $(this).val(); } }); $('#product textarea').each(function(){ if ($(this).val()) { params['form'][$(this).attr('name')] = $(this).val(); } }); var postcodeLength = 9; if($('input[name=postcode]').val().length < postcodeLength) { $('#modal-shipping').empty(); $('#modal-shipping').html('
Para poder realizar o calculo do frete escolha seu numero e a quantidade desejada. '); if (smartHintEnabled == 0) { $('#button-quote_product').button('loading'); $('#button-quote_product').button('reset'); } } else { $.ajax({ url: 'index.php?route=module/shipping/simulate', type: 'post', data: params, dataType: 'json', beforeSend: function () { if (smartHintEnabled == 0) { $('#button-quote_product').button('loading'); } $('
Carregando informações de envio
').insertAfter('#consult_shipping .postcode-inputs'); }, complete: function () { if (smartHintEnabled == 0) { $('#button-quote_product').button('reset'); } $('.shipping-load-message').remove(); }, success: function (json) { $('#modal-shipping').empty(); $('#shipping-error').empty(); $('.alert, .text-danger, .simulate_shipping_methods').remove(); if (json['error']) { if (json['error']['warning']) { $('#shipping-error').remove(); $('.postcode-inputs').append('
' + json['error']['warning'] + '
'); } if (json['error']['postcode']) { $('.postcode-inputs').append('
' + json['error']['postcode'] + '
'); } } if (json['shipping_method']) { html = '
'; 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 += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } } } else if (j == 'mandae'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'jadlog_api'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['location_jadlogPickup']){ if(json['shipping_method'][i]['quote'][j][k]['jadlog_label'] == 'PICKUP'){ html += `
Locais para retirada Jadlog Pickup
`; $.map( json['location_jadlogPickup'], function( n, i ) { html += `
${n['name_stablishment']}
Endereço: ${n['addres']}
Horario de Funcionamento: ${n['time_avaliable']}
${n['saturday']}
${n['sunday']}
Estacionamento: ${n['parking']}
`; }); html += `
`; } } if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'melhor_envio'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'onlog'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'posta_ja'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'neomode'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'frete_q'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'rodoe'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'frenet'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'data_frete') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'intelipost') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'smart_envios') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'kangu') { for (k in json['shipping_method'][i]['quote'][j]) { if (json['shipping_method'][i]['quote'][j][k]['title'] && json['shipping_method'][i]['quote'][j][k]['text'] && json['shipping_method'][i]['quote'][j][k]['delivery_time']){ html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } } else if (j == 'rede_sul' || j == 'ipost') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'mandou_chegou') { for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } } } else if (j == 'correios_api'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } if(json['shipping_method'][i]['quote'][j][k]['error']){ html += ''+json['shipping_method'][i]['quote'][j][k]['error']+''; } if(json['shipping_method'][i]['quote'][j][k]['msgPrazo']){ html += ''+json['shipping_method'][i]['quote'][j][k]['msgPrazo']+''; } } } else if (j == 'super_frete'){ for (k in json['shipping_method'][i]['quote'][j]) { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j][k]['title'] + ' - ' + json['shipping_method'][i]['quote'][j][k]['text']; html += ' '+json['shipping_method'][i]['quote'][j][k]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][i]['quote'][j][k]['info']){ html += ''+json['shipping_method'][i]['quote'][j][k]['info']+''; } } } else if(j == 'clique_retire_correios') { let data = json['shipping_method'][j]; let address = data.quote.clique_retire_correios.locations.address; let name = data.quote.clique_retire_correios.locations.name; html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j]['title'] + ' - ' + json['shipping_method'][i]['quote'][j]['text']; html += ' '+json['shipping_method'][j]['delivery_time']+''; html += ' '+name+''; html += ' '+address+''; html += ''; html += '
'; } else { html += '
'; html += ''; html += json['shipping_method'][i]['quote'][j]['title'] + ' - ' + json['shipping_method'][i]['quote'][j]['text']; html += ' '+json['shipping_method'][j]['delivery_time']+''; html += ''; html += '
'; if(json['shipping_method'][j]['quote']){ for(quote_info in json['shipping_method'][j]['quote']){ html += ''+json['shipping_method'][j]['quote'][quote_info]['info']+''; } } if(json['shipping_method'][i]['quote'][j]['code'] == 'pickup.pickup'){ for (k in json['shipping_method'][i]['locations']){ html += '' + json['shipping_method'][i]['locations'][k]['address'] + ''; } } let is_undefined = typeof json['shipping_method'][i]['quote'][j]['msgPrazo'] !== 'undefined'; if(json['shipping_method'][i]['quote'][j]['msgPrazo'] != '' && is_undefined){ for (k in json['shipping_method'][i]['quote']){ html += '' + json['shipping_method'][i]['quote'][k]['msgPrazo'] + ''; } } } } } 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 += '
2.1 - Dentro do PostImg clique no botão "Escolha as Imagens"
'; html += '
2.2 - Após abrir a janela, selecione a imagem que deseja enviar
'; html += '
2.3 - Assim que o upload for concluído, será exibido os links para compartilhamento, copie o link da primeira opção(opção "Link da imagem") e, dentro da página do produto na loja, cole o texto na área indicada com o nome "Arquivo"