Computadores
Filtros
Filtros
2 produtos
Ordenar por
Ordenar por
iMac
iMac 2019 Usado 27" | i5, 24GB RAM, 1TB FUSION | TrocaTech
Preço promocionalR$ 6.999,00
à vista
R$ #value_pix# no Pix (#discount_pix#% de desconto) ou #parcel#x de R$ #priceParcel# #labelParcel#
const installment_functioninstallment_product7323367309379_92414 = () => {
const productValue = Number(699900 / 100);
const parcels = Number('12');
const feeTax = Number('0');
const minParcel = Number(50,00);
const optJuros = 'sem_juros';
const hasTax = optJuros === 'sem_juros' ? false : true;
const startTax = Number(0);
const hasPix = Boolean(true);
const pixDiscount = Number(8);
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_product7323367309379_92414"]`);
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';
}
if(hasPix) {
const percentPix = pixDiscount / 100;
const calcDiscountValue = productValue * percentPix;
const pixFinal = productValue - calcDiscountValue;
const pixEl = document.querySelector(`.custom-parcels[data-product-id="installment_product7323367309379_92414"] .pix-discount`);
pixEl.innerHTML = pixEl.innerHTML.replace('#discount_pix#', pixDiscount).replace('#value_pix#', pixFinal.toLocaleString('pt-BR', {minimumFractionDigits: 2,maximumFractionDigits: 2}));
pixEl.style.display = 'block';
}
}
const intervalInitinstallment_product7323367309379_92414 = setInterval(() => {
if (typeof installment_functioninstallment_product7323367309379_92414 === 'function'){
installment_functioninstallment_product7323367309379_92414();
clearInterval(intervalInitinstallment_product7323367309379_92414);
}
}, 500)
iMac
iMac 2014 Usado 21" | i5, 8GB RAM, 256GB | TrocaTech
Preço promocionalR$ 3.499,00
à vista
R$ #value_pix# no Pix (#discount_pix#% de desconto) ou #parcel#x de R$ #priceParcel# #labelParcel#
const installment_functioninstallment_product7047820116035_33718 = () => {
const productValue = Number(349900 / 100);
const parcels = Number('12');
const feeTax = Number('0');
const minParcel = Number(50,00);
const optJuros = 'sem_juros';
const hasTax = optJuros === 'sem_juros' ? false : true;
const startTax = Number(0);
const hasPix = Boolean(true);
const pixDiscount = Number(8);
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_product7047820116035_33718"]`);
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';
}
if(hasPix) {
const percentPix = pixDiscount / 100;
const calcDiscountValue = productValue * percentPix;
const pixFinal = productValue - calcDiscountValue;
const pixEl = document.querySelector(`.custom-parcels[data-product-id="installment_product7047820116035_33718"] .pix-discount`);
pixEl.innerHTML = pixEl.innerHTML.replace('#discount_pix#', pixDiscount).replace('#value_pix#', pixFinal.toLocaleString('pt-BR', {minimumFractionDigits: 2,maximumFractionDigits: 2}));
pixEl.style.display = 'block';
}
}
const intervalInitinstallment_product7047820116035_33718 = setInterval(() => {
if (typeof installment_functioninstallment_product7047820116035_33718 === 'function'){
installment_functioninstallment_product7047820116035_33718();
clearInterval(intervalInitinstallment_product7047820116035_33718);
}
}, 500)