Filtros
Cor
Tamanho
Preço
R$
R$
Ordenar por
Pantufa Raquel Rosa
R$ 99,00 R$ 186,00
const installment_functioninstallment_product6578247172174_81493 = () => { const productValue = Number(9900 / 100); const parcels = Number('6'); const feeTax = Number('0'); const minParcel = Number(50,00); const optJuros = 'sem_juros'; const hasTax = optJuros === 'sem_juros' ? false : true; const startTax = Number(2); const parcelNoTax = productValue / parcels; const feeTaxDecimal = feeTax / 100; let qtdParcelView = 0; let parcelValue; let viewParcel; let labelText = ''; for (let i = 1; i <= parcels; i ++) { if(hasTax && i >= startTax){ parcelValue = (productValue * feeTaxDecimal) / (1 - Math.pow(1 + feeTaxDecimal, -i)); }else{ parcelValue = productValue / i; } if(parcelValue <= minParcel){ break }else{ viewParcel = parcelValue; qtdParcelView = i; if(hasTax){ labelText = i < startTax ? 'sem juros' : 'com juros'; }else{ labelText = 'sem juros'; } } } if(qtdParcelView > 1){ const parentEl = document.querySelector(`.custom-parcels[data-product-id="installment_product6578247172174_81493"]`); const changeValue = parentEl.innerHTML.replace('#parcel#', qtdParcelView).replace('#priceParcel#', viewParcel.toLocaleString('pt-BR', {minimumFractionDigits: 2,maximumFractionDigits: 2})).replace('#labelParcel#', labelText); parentEl.innerHTML = changeValue; parentEl.style.display = 'block'; } } const intervalInitinstallment_product6578247172174_81493 = setInterval(() => { if (typeof installment_functioninstallment_product6578247172174_81493 === 'function'){ installment_functioninstallment_product6578247172174_81493(); clearInterval(intervalInitinstallment_product6578247172174_81493); } }, 500)