
Mac Mini
Filtros
Filtros

2 produtos
Ordenar por
Ordenar por
Mac Mini
Mac Mini 2014 Usado| i5, 8GB RAM, 1TB HD | TrocaTech
Preço promocionalR$ 2.499,00
à vista
R$ #value_pix# no Pix (#discount_pix#% de desconto) ou #parcel#x de R$ #priceParcel# #labelParcel#
const installment_functioninstallment_product7179054776387_67688 = () => {
const productValue = Number(249900 / 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_product7179054776387_67688"]`);
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_product7179054776387_67688"] .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_product7179054776387_67688 = setInterval(() => {
if (typeof installment_functioninstallment_product7179054776387_67688 === 'function'){
installment_functioninstallment_product7179054776387_67688();
clearInterval(intervalInitinstallment_product7179054776387_67688);
}
}, 500)
Mac Mini
Mac Mini 2014 Usado| i5, 8GB RAM, 1TB HD | TrocaTech
Preço promocionalR$ 2.399,00
à vista
R$ #value_pix# no Pix (#discount_pix#% de desconto) ou #parcel#x de R$ #priceParcel# #labelParcel#
const installment_functioninstallment_product7075642966083_68341 = () => {
const productValue = Number(239900 / 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_product7075642966083_68341"]`);
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_product7075642966083_68341"] .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_product7075642966083_68341 = setInterval(() => {
if (typeof installment_functioninstallment_product7075642966083_68341 === 'function'){
installment_functioninstallment_product7075642966083_68341();
clearInterval(intervalInitinstallment_product7075642966083_68341);
}
}, 500)