CONDICIONES ENVÍO GRATIS Y PLAZOS NORMALES
¿TIENES DUDAS? SECCIÓN PREGUNTAS FRECUENTES
O PUEDES LLAMARNOS AL +56 9 3236 0145
SIMULADOR DE TIEMPOS *APROXIMADOS* DE ENVIO
Región:
-- Selecciona región --
Comuna:
-- Selecciona comuna --
Tipo de envío:
-- Selecciona tipo de envío --
Envío a domicilio
Retiro en agencia
#simulador-envio-container {
max-width: 800px;
margin: 30px auto;
padding: 0 10px;
}
.simulador-box {
background-color: #ffffff;
border: 1px solid #dcdcdc;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
padding: 25px 20px;
font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
.grupo-selects > div {
margin-bottom: 20px;
}
@media screen and (min-width: 768px) {
.grupo-selects {
display: flex;
gap: 20px;
}
.grupo-selects > div {
flex: 1;
margin-bottom: 0;
}
}
#simulador-envio-container select,
#simulador-envio-container label,
#simulador-envio-container p {
width: 100%;
box-sizing: border-box;
}
#resultado-envio,
#costo-envio {
margin-top: 15px;
}
@media screen and (max-width: 480px) {
.simulador-box label {
font-size: 14px;
}
.simulador-box p {
font-size: 14px;
}
}
const jsonComunasUrl = "https://www.neumacenter.cl/wp-content/uploads/2025/08/comunas_chile_actualizado.json";
const jsonTiemposUrl = "https://www.neumacenter.cl/wp-content/uploads/2025/08/tiempos_envio_actualizado_corregido.json";
const regionSelect = document.getElementById('region-envio');
const ciudadSelect = document.getElementById('ciudad-envio');
const tipoSelect = document.getElementById('tipo-envio');
const resultado = document.getElementById('resultado-envio');
const costo = document.getElementById('costo-envio');
let tiemposEnvio = {};
Promise.all([
fetch(jsonComunasUrl).then(res => res.json()),
fetch(jsonTiemposUrl).then(res => res.json())
])
.then(([regiones, tiempos]) => {
tiemposEnvio = tiempos;
regionSelect.innerHTML = '-- Selecciona región --';
Object.keys(regiones).forEach(region => {
const opt = document.createElement('option');
opt.value = region;
opt.textContent = region;
regionSelect.appendChild(opt);
});
regionSelect.addEventListener('change', () => {
ciudadSelect.innerHTML = '-- Selecciona comuna --';
tipoSelect.value = "";
resultado.textContent = "";
costo.textContent = "";
const comunas = regiones[regionSelect.value];
if (comunas) {
comunas.forEach(c => {
const opt = document.createElement('option');
opt.value = c;
opt.textContent = c;
ciudadSelect.appendChild(opt);
});
ciudadSelect.disabled = false;
tipoSelect.disabled = true;
} else {
ciudadSelect.disabled = true;
tipoSelect.disabled = true;
}
});
ciudadSelect.addEventListener('change', () => {
tipoSelect.disabled = ciudadSelect.value === "";
tipoSelect.value = "";
resultado.textContent = "";
costo.textContent = "";
});
tipoSelect.addEventListener('change', () => {
const ciudad = ciudadSelect.value;
const tipo = tipoSelect.value;
if (ciudad && tipo && tiemposEnvio[ciudad]) {
const tiempo = tiemposEnvio[ciudad][tipo] || "NO DISPONIBLE";
if (tiempo === "Instalacion en local") {
resultado.innerHTML = `
Instalación en local: Este servicio está disponible únicamente en nuestra tienda física.
`;
costo.innerHTML = "";
return;
}
if (tiempo !== "NO DISPONIBLE") {
resultado.innerHTML = `
Entrega estimada en ${ciudad} (${tipo === 'domicilio' ? 'a domicilio' : 'retiro en agencia'}): ${tiempo}
`;
costo.innerHTML = `
El envío es de costo del cliente. Si quieres saber un valor aproximado por favor contáctanos al +56932360145
`;
} else {
resultado.innerHTML = `
No hay servicio disponible para esta comuna y tipo de envío.
`;
costo.innerHTML = "";
}
} else {
resultado.textContent = "";
costo.textContent = "";
}
});
})
.catch(e => {
console.error("Error cargando datos:", e);
alert("No se pudo cargar el simulador de envío.");
});