Đổi trả dễ dàng.
Bảo hành chính hãng.
Nhận hàng tại nhà.
Máy pha cà phê Espresso Winci EM4212 sử dụng công nghệ pha cà phê của Italia là lựa chọn hoàn hảo cho văn phòng và gia đình. Thiết kế vô cùng nhỏ gọn so với các loại máy pha cà phê khác, chất liệu nhựa ABS kết hợp Inox sang trọng, hệ thống máy bơm áp suất cao 15 Bar ULKA Italia, đồng hồ đo áp suất được đặt ở mặt trước máy cung cấp độ kiểm soát tuyệt đối giúp bạn có được tách cà phê như mong muốn ngay tại nhà hoặc văn phòng.
Thân máy được làm chất liệu nhựa ABS kết hợp với chất liệu inox sang trọng với hệ thống máy bơm áp suất cao 15 Bar với đồng hồ đo áp suất được đặt ở mặt trước máy cung cấp độ kiểm soát tuyệt đối giúp bạn có được tách cà phê như mong muốn ngay tại nhà hoặc văn phòng.
![]()
Máy pha cà phê Espresso Winci EM4212 có vòi đánh sữa giúp bạn có thể pha cappucino tiện lợi.
![]()
Máy pha cà phê Winci EM4212 sử dụng chip kiểm soát nhiệt độ, giữ nhiệt độ pha tại mức 93 độ C cho ra những ly cà phê có hương vị thơm ngon và béo ngậy nhất.
![]()
![]()
![]()
![]()
![]()
![]()
Máy pha cà phê Espresso Winci EM4212 sử dụng công nghệ pha cà phê của Italia là lựa chọn hoàn hảo cho văn phòng và gia đình. Thiết kế vô cùng nhỏ gọn so với các loại máy pha cà phê khác, chất liệu nhựa ABS kết hợp Inox sang trọng, hệ thống máy bơm áp suất cao 15 Bar ULKA Italia, đồng hồ đo áp suất được đặt ở mặt trước máy cung cấp độ kiểm soát tuyệt đối giúp bạn có được tách cà phê như mong muốn ngay tại nhà hoặc văn phòng.
Bạn có chắc muốn hủy đơn?
// Global functions for mobile product popup function openMobileProductPopup() { var $popup = $('#mobileProductPopup'); var $content = $('#mobileProductContent'); // Kiểm tra xem popup đã được tạo chưa if ($content.find('.mobile-product-popup-content').length === 0) { // Lấy thông tin sản phẩm từ trang hiện tại var productName = `Máy pha cà phê Espresso Winci EM4212, Áp lực 20 bar, Bảo hành 2 năm`; var currentPrice = `3.690.000 ₫`; var oldPrice = `4.950.000 ₫`; var discount = `26`; var stock = `0`; var productImages = `
`; var colorOptions = `
`; var sizeOptions = ``; var spId = `1427`; var userId = `0`; // Kiểm tra số lượng hàng tồn kho var isOutOfStock = parseInt(stock) <= 0; console.log(isOutOfStock); // Tạo HTML cho popup var popupHTML = `
`; $content.html(popupHTML); } else { // Nếu popup đã tồn tại, cập nhật text của button và kiểm tra stock const addToCartBtn = document.querySelector('#mobileProductPopup .mobile-add-to-cart-btn'); if (addToCartBtn) { // Lấy stock hiện tại từ popup const stockInfo = document.querySelector('#mobileProductPopup .stock-info'); let currentStock = 0; if (stockInfo) { const stockText = stockInfo.textContent; const stockMatch = stockText.match(/Kho hàng:\s*(\d+)/); if (stockMatch) { currentStock = parseInt(stockMatch[1]); } } // Kiểm tra stock và cập nhật button accordingly if (currentStock <= 0) { addToCartBtn.textContent = 'Hết hàng'; addToCartBtn.disabled = true; addToCartBtn.style.opacity = '0.5'; } else { addToCartBtn.textContent = window.mobilePopupButtonText || 'Thêm vào giỏ hàng'; addToCartBtn.disabled = false; addToCartBtn.style.opacity = '1'; } } } // Hiển thị popup $popup.addClass('show'); $('body').css('overflow', 'hidden'); } function closeMobileProductPopup() { var $popup = $('#mobileProductPopup'); $popup.removeClass('show'); $('body').css('overflow', 'auto'); // Không xóa content để giữ trạng thái popup } // Initialize mobile popup variant handler function initMobilePopupVariants() { // NHAT FIX: Ngay cả khi không có variant, vẫn cần đảm bảo số lượng kho được hiển thị if (typeof variants === 'undefined' || variants.length === 0) { // Đảm bảo stock-info hiển thị từ sản phẩm gốc (không có variant) const stockInfo = document.querySelector('#mobileProductPopup .stock-info'); if (stockInfo) { stockInfo.style.display = 'block'; // Đảm bảo hiển thị giá trị stock (nếu chưa có hoặc bị undefined) if (!stockInfo.textContent || stockInfo.textContent.trim() === '' || stockInfo.textContent.includes('undefined')) { stockInfo.textContent = 'Kho hàng: ' + (0 || 0); } } return; } // Helper functions function getActualStock(variant) { if (!variant) return 0; return variant.kho_flash_sale ?? variant.kho; } function findValidVariant(colorId = null, sizeId = null) { return variants.find(v => { const colorMatch = colorId ? v.color_id == colorId : true; const sizeMatch = sizeId ? v.size_id == sizeId : true; return colorMatch && sizeMatch && getActualStock(v) > 0; }); } function findBestVariant(colorId = null, sizeId = null) { // Đối với single variant if (typeof isSingleVariant !== 'undefined' && isSingleVariant) { if (colorId) { const colorVariant = variants.find(v => v.color_id == colorId && (v.size_id == 0 || v.size_id == null) && getActualStock(v) > 0 ); if (colorVariant) return colorVariant; } const fallbackVariant = variants.find(v => (v.size_id == 0 || v.size_id == null) && getActualStock(v) > 0 ); return fallbackVariant || null; } // Đối với multi-variant if (colorId && sizeId) { const colorSizeVariant = findValidVariant(colorId, sizeId); if (colorSizeVariant) return colorSizeVariant; } if (colorId) { const colorVariant = findValidVariant(colorId, null); if (colorVariant) return colorVariant; } if (sizeId) { const sizeVariant = findValidVariant(null, sizeId); if (sizeVariant) return sizeVariant; } // Tìm variant có stock > 0 return variants.find(v => getActualStock(v) > 0) || null; } function updateMobilePopupPrice(variant) { if (!variant) return; const currentPrice = document.querySelector('#mobileProductPopup .current-price'); const oldPrice = document.querySelector('#mobileProductPopup .old-price'); const stockInfo = document.querySelector('#mobileProductPopup .stock-info'); const price = variant.gia_flash_sale !== null ? variant.gia_flash_sale : variant.gia_moi; const stock = getActualStock(variant); if (currentPrice) { currentPrice.textContent = new Intl.NumberFormat('vi-VN').format(price) + ' ₫'; } if (oldPrice && variant.gia_cu > 0) { oldPrice.textContent = new Intl.NumberFormat('vi-VN').format(variant.gia_cu) + ' ₫'; oldPrice.style.display = variant.gia_cu > price ? 'inline' : 'none'; } if (stockInfo) { stockInfo.textContent = 'Kho hàng: ' + stock; } // Cập nhật button (đồng bộ với logic desktop) const addToCartBtn = document.querySelector('#mobileProductPopup .mobile-add-to-cart-btn'); if (addToCartBtn) { // Sử dụng biến global mobilePopupButtonText thay vì hardcode const buttonText = stock > 0 ? (window.mobilePopupButtonText || 'Thêm vào giỏ hàng') : 'Hết Hàng'; addToCartBtn.textContent = buttonText; addToCartBtn.disabled = stock <= 0; addToCartBtn.style.opacity = stock > 0 ? '1' : '0.5'; // Cập nhật các attributes như desktop addToCartBtn.setAttribute('pl', variant.variant_id); addToCartBtn.setAttribute('color', variant.ten_color || ''); addToCartBtn.setAttribute('size', variant.ten_size || ''); } // Cập nhật ảnh cho mobile popup if (variant.image_phanloai && variant.image_phanloai !== '') { const mobilePopupImage = document.querySelector('#mobileProductPopup .mobile-product-images img'); if (mobilePopupImage) { mobilePopupImage.src = variant.image_phanloai; } // Đồng bộ với desktop slider (nếu có) if (typeof window.variantManager !== 'undefined' && window.variantManager.updateImages) { // Gọi function updateImages từ desktop variant system const desktopUpdateImages = window.variantManager.updateImages || window.updateImages; if (typeof desktopUpdateImages === 'function') { desktopUpdateImages(variant); } } } // Lưu variant hiện tại window.mobilePopupCurrentVariant = variant; } function updateMobileSizeOptions(colorId) { if (typeof isSingleVariant !== 'undefined' && isSingleVariant) { return; } const sizeSwatches = document.querySelectorAll('#mobileProductPopup .size-swatch'); let hasAvailableSize = false; let firstAvailableSize = null; sizeSwatches.forEach(sizeSwatch => { const sizeLabel = sizeSwatch.querySelector('.size-label'); const sizeInput = sizeSwatch.querySelector('input'); if (!sizeLabel) return; const sizeId = sizeLabel.getAttribute('data-size-id'); const variant = variants.find(v => v.color_id == colorId && v.size_id == sizeId); if (variant && getActualStock(variant) > 0) { sizeSwatch.classList.remove('disabled'); if (sizeInput) sizeInput.disabled = false; hasAvailableSize = true; if (!firstAvailableSize) firstAvailableSize = sizeLabel; } else { sizeSwatch.classList.add('disabled'); if (sizeInput) sizeInput.disabled = true; sizeLabel.classList.remove('selected'); if (sizeInput) sizeInput.checked = false; } }); // Chọn size đầu tiên available nếu size hiện tại bị disabled const selectedSize = document.querySelector('#mobileProductPopup .size-label.selected'); if (!selectedSize || selectedSize.parentElement.classList.contains('disabled')) { if (firstAvailableSize) { firstAvailableSize.classList.add('selected'); const firstInput = firstAvailableSize.parentElement.querySelector('input'); if (firstInput) firstInput.checked = true; } } } // Event listeners for color selection $(document).on('click', '#mobileProductPopup .color-label', function() { // Check nếu chính element này hoặc parent có class out-of-stock if ($(this).hasClass('out-of-stock') || $(this).parent().hasClass('out-of-stock')) { return; } const colorId = $(this).attr('data-color-id'); // Update UI $('#mobileProductPopup .color-label').removeClass('selected'); $(this).addClass('selected'); if (typeof isSingleVariant !== 'undefined' && isSingleVariant) { // Single variant: chỉ cần tìm theo color const variant = variants.find(v => v.color_id == colorId && (v.size_id == 0 || v.size_id == null) && getActualStock(v) > 0 ); if (variant) { updateMobilePopupPrice(variant); } } else { // Multi-variant: update size options updateMobileSizeOptions(colorId); const selectedSize = document.querySelector('#mobileProductPopup .size-label.selected'); const sizeId = selectedSize ? selectedSize.getAttribute('data-size-id') : null; const variant = findBestVariant(colorId, sizeId); if (variant) { updateMobilePopupPrice(variant); } } }); // Event listeners for size selection $(document).on('click', '#mobileProductPopup .size-label', function() { if ($(this).parent().hasClass('disabled')) return; const sizeId = $(this).attr('data-size-id'); const selectedColor = document.querySelector('#mobileProductPopup .color-label.selected'); const colorId = selectedColor ? selectedColor.getAttribute('data-color-id') : null; // Update UI $('#mobileProductPopup .size-label').removeClass('selected'); $(this).addClass('selected'); // Update radio $('#mobileProductPopup .size-swatch input').prop('checked', false); $(this).parent().find('input').prop('checked', true); const variant = findBestVariant(colorId, sizeId); if (variant) { updateMobilePopupPrice(variant); } }); // Khởi tạo giá ban đầu cho popup dựa trên variant hiện tại const selectedColor = document.querySelector('#mobileProductPopup .color-label.selected'); const colorId = selectedColor ? selectedColor.getAttribute('data-color-id') : null; // Cập nhật size options dựa trên color đã chọn (nếu không phải single variant) if (!isSingleVariant && colorId) { updateMobileSizeOptions(colorId); } const selectedSize = document.querySelector('#mobileProductPopup .size-label.selected'); const sizeId = selectedSize ? selectedSize.getAttribute('data-size-id') : null; const initialVariant = findBestVariant(colorId, sizeId); if (initialVariant) { updateMobilePopupPrice(initialVariant); } } // Flag để kiểm tra đã khởi tạo variant handlers chưa var mobilePopupVariantsInitialized = false; // Biến global để lưu button text hiện tại window.mobilePopupButtonText = 'Thêm vào giỏ hàng'; $(document).ready(function() { if (isMobileDevice()) { $(document).on('click', '#navAddToCart', function (e) { e.preventDefault(); // Set button text trước khi mở popup window.mobilePopupButtonText = 'Thêm vào giỏ hàng'; openMobileProductPopup(); // Chỉ khởi tạo variant handlers một lần if (!mobilePopupVariantsInitialized) { setTimeout(function() { initMobilePopupVariants(); mobilePopupVariantsInitialized = true; }, 100); } }); // Handler cho nút "Mua ngay" trên mobile bottom nav $(document).on('click', '#navBuyView', function(e) { e.preventDefault(); // Set button text trước khi mở popup window.mobilePopupButtonText = 'Mua ngay'; openMobileProductPopup(); // Chỉ khởi tạo variant handlers một lần if (!mobilePopupVariantsInitialized) { setTimeout(function() { initMobilePopupVariants(); mobilePopupVariantsInitialized = true; }, 100); } }); // Handler chung cho tất cả nút mobile-add-to-cart-btn (tương tự .them_gio trong process.js) $("body").on("click", ".mobile-add-to-cart-btn", function () { if (!$(this).hasClass("disabled")) { window.lastClickedCartButton = this; var sp_id = $(this).attr("sp_id"); var loai = $(this).attr("loai"); var shop = $(this).attr("shop"); var color = $(this).attr("color") || $(".box_phanloai .list_color .li_color.active").attr("color"); var size = $(this).attr("size") || $(".box_phanloai .list_size .li_size.active").attr("size"); var quantity = $("#mobileQuantity").length > 0 ? $("#mobileQuantity").val() : ($(".box_quanlity input").val() || 1); var pl = $(this).attr("pl") || 0; var flash_sale = $("input[name=flash_sale]").length > 0 ? $("input[name=flash_sale]").val() : "0"; // THAY ĐỔI: Lấy utm_source từ cookie người gửi gần nhất var urlParams = new URLSearchParams(window.location.search); var utm_source = urlParams.get("utm_source_shop") || getCookiee("utm_source_shop_latest") || ""; var utm_campaign = urlParams.get("utm_campaign") || getCookiee("utm_campaign_latest") || ""; var timestamp = Date.now(); $.ajax({ url: "/process.php", type: "post", data: { action: "add_to_cart", sp_id: sp_id, loai: loai, size: size, mau: color, shop: shop, quantity: quantity, flash_sale: flash_sale, pl: pl, utm_source_shop: utm_source, utm_campaign: utm_campaign, timestamp: timestamp }, success: function (kq) { var info = JSON.parse(kq); if (info.ok == 1) { if (window.cartAnimation && window.lastClickedCartButton) { window.cartAnimation.triggerAnimation(window.lastClickedCartButton); } $(".cart_mobile .count_item, .box_control .count_item, .mobile-bottom-nav .mobile-nav-cart-badge").addClass("updated"); setTimeout(function() { $(".cart_mobile .count_item, .box_control .count_item, .mobile-bottom-nav .mobile-nav-cart-badge").removeClass("updated"); }, 500); setTimeout(function () { if ($(window.lastClickedCartButton).closest('#mobileProductPopup').length > 0) { closeMobileProductPopup(); } $(".mobile-nav-cart-badge").html(info.total); }, 700); } }, error: function () { }, }); } }); } });