Frente de calle adicional inalámbrico de gran alcance con batería recargable para DP2661C3Q
- Compatible con monitor DP-266-M3Q
- Voltaje de operación: 5-16 VCC
- Resolución de cámara: 480 TV líneas
- Diseñado para máxima eficiencia eléctrica
- Interfaz de conexión estándar
Especificaciones del Producto
Compatible con el monitor DP-266-M3Q.
Voltaje de operacion: 5-16Vcc.
Resolicion de camara: 480 Tv lineas.
{
thumb.classList.remove('active');
});
// Agregar clase activa a la miniatura seleccionada
element.classList.add('active');
// Quitar zoom si estaba activo
document.getElementById('mainImageContainer').classList.remove('zoomed');
}
// Alternar zoom al hacer clic en la imagen principal
document.getElementById('mainImageContainer').addEventListener('click', function() {
this.classList.toggle('zoomed');
});
// Actualizar cantidad
function updateQuantity(change) {
const input = document.getElementById('quantity');
let value = parseInt(input.value) || 1;
const max = parseInt(input.max) || 1;
value += change;
if (value < 1) value = 1;
if (value > max) value = max;
input.value = value;
}
// Mostrar alerta personalizada
function showAlert(message, isSuccess = true) {
const alertMsg = $('#alertMessage');
alertMsg.text(message);
alertMsg.css('background-color', isSuccess ? '#28a745' : '#dc3545');
// Cambiar icono según el tipo de mensaje
const icon = isSuccess ? 'fa-check-circle' : 'fa-exclamation-circle';
alertMsg.html(`${message}`);
alertMsg.fadeIn();
setTimeout(() => {
alertMsg.fadeOut();
}, 3000);
}
// Añadir al carrito con loader y mensaje
function addToCart(productId, quantity, checkout = false) {
quantity = parseInt(quantity) || 1;
if (quantity < 1) quantity = 1;
// Mostrar loader
$('#loaderOverlay').fadeIn();
$.post('controller/carro/functions.php', {
ppo: 'add',
id: productId,
cant: quantity
}, function(response) {
// Ocultar loader
$('#loaderOverlay').fadeOut();
try {
const data = typeof response === 'object' ? response : JSON.parse(response);
if (data.success) {
updateCartCount();
showAlert('Producto agregado correctamente');
if (checkout) {
setTimeout(() => {
window.location.href = 'envio.php'
}, 500);
}
} else {
showAlert(data.message || 'Error al agregar el producto', false);
}
} catch (e) {
updateCartCount();
showAlert('Producto agregado correctamente');
if (checkout) {
setTimeout(() => {
window.location.href = 'envios.php'
}, 500);
}
}
}).fail(function(xhr, status, error) {
$('#loaderOverlay').fadeOut();
showAlert('Error de conexión al servidor', false);
console.error('Error al agregar al carrito:', error);
});
}
// Actualizar contador del carrito
function updateCartCount() {
$.post('controller/carro/functions.php', { ppo: 'count' }, function(count) {
$('.cart-count').text(count);
});
}
// Scroll to top
document.querySelector('.scroll-to-top').addEventListener('click', function(e) {
e.preventDefault();
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
// Mostrar/ocultar botón de scroll
window.addEventListener('scroll', function() {
const scrollBtn = document.querySelector('.scroll-to-top');
if (window.scrollY > 300) {
scrollBtn.style.display = 'flex';
} else {
scrollBtn.style.display = 'none';
}
});
// Inicializar contador del carrito
$(document).ready(function() {
updateCartCount();
});