/* domucgiare tv-dathang-v4 – Dat hang online (mayinlongbien.vn, dichvumayphoto.vn) 2026-12-01 */ (function(){ if(window.__tvck)return;window.__tvck=1; var H=location.hostname.replace(/^www\./,''); var CFG={ 'mayinlongbien.vn':{mode:'cart',brand:'Thần Vũ – Máy in Long Biên',hot:'0965.305.158',tel:'0965305158',zalo:'0983504555',land:'024 3992 1369', shop:'/bang-gia-may-in-cu-ha-noi.html', stores:['Cơ sở 1 – Bắc Từ Liêm (kho Phú Diễn): Số 14, 15 Ngách 76, Ngõ 172 Phú Diễn, Bắc Từ Liêm, Hà Nội','Cơ sở 2 – Long Biên: Số 16, Ngõ 143 Hoàng Như Tiếp, P. Bồ Đề, Long Biên, Hà Nội','Cơ sở 3 – Thanh Xuân: Số 113B - A13, Ngõ 58 Hoàng Đạo Thành, Thanh Xuân, Hà Nội'], pol:[['Điều kiện giao dịch chung','/info_108/dieu-kien-cung-cap-dich-vu'],['Chính sách thanh toán','/info_106/chinh-sach-thanh-toan'],['Giao hàng, đổi trả & bảo hành','/info_107/chinh-sach-giao-hang-doi-tra-bao-hanh'],['Bảo mật thông tin','/info_103/chinh-sach-bao-mat-thong-tin']]}, 'dichvumayphoto.vn':{mode:'tour',brand:'Thần Vũ – Dịch vụ máy photocopy',hot:'024.3992.1369',tel:'02439921369',zalo:'0983504555',land:'024 3992 1369', shop:'/ban-photocopy-cu-gia-re-tai-ha-noi.html', stores:['Cơ sở 1 – Bắc Từ Liêm: Số 15 Ngách 76, Ngõ 172 Phú Diễn, Bắc Từ Liêm, Hà Nội','Cơ sở 2 – Long Biên: Số 16, Ngõ 143 Hoàng Như Tiếp, Bồ Đề, Long Biên, Hà Nội','Cơ sở 3 – Thanh Xuân: Số 113B - A13, Ngõ 58 Hoàng Đạo Thành, Thanh Xuân, Hà Nội'], pol:[['Điều khoản & điều kiện giao dịch','/gioi-thieu/chinh-sach/dieu-khoan-su-dung'],['Chính sách thanh toán','/gioi-thieu/chinh-sach/chinh-sach-thanh-toan'],['Giao hàng & lắp đặt','/gioi-thieu/chinh-sach/chinh-sach-giao-hang-lap-dat'],['Đổi trả & hoàn tiền','/gioi-thieu/chinh-sach/chinh-sach-doi-tra-hoan-tien'],['Bảo mật thông tin','/gioi-thieu/chinh-sach/chinh-sach-bao-mat-thong-tin']]} }; var C=CFG[H];if(!C)return; var SS={get:function(k){try{return JSON.parse(sessionStorage.getItem(k)||'null')}catch(e){return null}},set:function(k,v){try{sessionStorage.setItem(k,JSON.stringify(v))}catch(e){}},del:function(k){try{sessionStorage.removeItem(k)}catch(e){}}}; function $(s,r){return (r||document).querySelector(s)} function $$(s,r){return [].slice.call((r||document).querySelectorAll(s))} function esc(s){return String(s==null?'':s).replace(/[&<>"']/g,function(c){return {'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]})} function num(t){var m=String(t||'').replace(/\s/g,'').match(/(\d{1,3}([.,]\d{3})+|\d{4,})/);return m?parseInt(m[1].replace(/[.,]/g,''),10):0} function vnd(n){return n>0?String(n).replace(/\B(?=(\d{3})+(?!\d))/g,'.')+'đ':'Liên hệ báo giá'} function css(){if($('#tvck-css'))return;var s=document.createElement('style');s.id='tvck-css';s.textContent= '.tvck{font-family:inherit;color:#1d2433;max-width:1140px;margin:18px auto 30px;padding:0 12px;box-sizing:border-box}.tvck *{box-sizing:border-box}'+ '.tvck h2.tvck-h{font-size:24px;font-weight:800;color:#0f2a5c;margin:0 0 6px}.tvck .tvck-sub{color:#5b6475;margin:0 0 16px;font-size:14.5px}'+ '.tvck-steps{display:flex;gap:8px;margin:0 0 18px;padding:0;list-style:none;flex-wrap:wrap}.tvck-steps li{flex:1;min-width:150px;background:#eef2f8;color:#5b6475;border-radius:10px;padding:10px 12px;font-size:14px;font-weight:700}.tvck-steps li b{display:inline-flex;width:24px;height:24px;border-radius:50%;background:#c9d3e3;color:#fff;align-items:center;justify-content:center;margin-right:6px;font-size:13px}.tvck-steps li.on{background:#0f2a5c;color:#fff}.tvck-steps li.on b{background:#d71920}.tvck-steps li.ok{background:#e7f6ec;color:#17733a}.tvck-steps li.ok b{background:#17733a}'+ '@media(max-width:560px){.tvck-steps{gap:6px}.tvck-steps li{min-width:0;font-size:12.5px;padding:8px 6px;text-align:center}.tvck-steps li b{width:20px;height:20px;margin:0 auto 3px;display:flex}.tvck h2.tvck-h{font-size:21px}}.tvck-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:18px;align-items:start}@media(max-width:860px){.tvck-grid{grid-template-columns:1fr}}'+ '.tvck-box{background:#fff;border:1px solid #e1e6ef;border-radius:12px;padding:16px 18px;margin-bottom:16px;box-shadow:0 2px 10px rgba(15,42,92,.05)}.tvck-box h3{font-size:17px;font-weight:800;color:#0f2a5c;margin:0 0 12px}'+ '.tvck-f{margin-bottom:12px}.tvck-f label{display:block;font-weight:700;font-size:14px;margin-bottom:5px}.tvck-f label i{color:#d71920;font-style:normal}.tvck-f input,.tvck-f textarea,.tvck-f select{width:100%;border:1px solid #c9d3e3;border-radius:8px;padding:10px 12px;font-size:15px;background:#fff;color:#1d2433}.tvck-f textarea{min-height:76px}.tvck-f input:focus,.tvck-f textarea:focus,.tvck-f select:focus{outline:none;border-color:#0f2a5c;box-shadow:0 0 0 3px rgba(15,42,92,.12)}.tvck-f .tvck-err{display:none;color:#d71920;font-size:13px;margin-top:4px}.tvck-f.bad input,.tvck-f.bad select{border-color:#d71920}.tvck-f.bad .tvck-err{display:block}'+ '.tvck-opt{display:flex;gap:10px;align-items:flex-start;border:1px solid #c9d3e3;border-radius:10px;padding:10px 12px;margin-bottom:8px;cursor:pointer;font-size:14.5px}.tvck-opt input{margin-top:3px}.tvck-opt.on{border-color:#0f2a5c;background:#f3f6fb}.tvck-opt small{display:block;color:#5b6475;font-size:13px}'+ '.tvck-item{display:grid;grid-template-columns:64px 1fr;gap:12px;padding:10px 0;border-bottom:1px dashed #e1e6ef}.tvck-item:last-child{border-bottom:0}.tvck-item.noimg{grid-template-columns:1fr}.tvck-item img{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid #e1e6ef;background:#f5f7fb}.tvck-item .n{font-weight:700;font-size:14.5px;line-height:1.4;color:#0f2a5c}.tvck-item .n a{color:#0f2a5c;text-decoration:none}.tvck-item .p{display:flex;justify-content:space-between;align-items:center;margin-top:6px;gap:8px;flex-wrap:wrap;font-size:14px}'+ '.tvck-qty{display:inline-flex;border:1px solid #c9d3e3;border-radius:8px;overflow:hidden}.tvck-qty button{width:32px;height:32px;border:0;background:#eef2f8;font-size:17px;font-weight:700;cursor:pointer;color:#0f2a5c}.tvck-qty input{width:44px;height:32px;border:0;text-align:center;font-weight:700;font-size:15px}'+ '.tvck-sum{width:100%;border-collapse:collapse;font-size:14.5px}.tvck-sum td{padding:6px 0}.tvck-sum td:last-child{text-align:right;font-weight:700}.tvck-sum tr.t td{border-top:2px solid #0f2a5c;padding-top:10px;font-size:17px;color:#d71920}'+ '.tvck-note{font-size:13px;color:#5b6475;line-height:1.55;margin:8px 0 0}.tvck-agree{display:flex;gap:8px;align-items:flex-start;font-size:14px;line-height:1.55;margin:12px 0}.tvck-agree a{color:#0b4f9c;text-decoration:underline}.tvck-agree.bad{color:#d71920}'+ '.tvck-btn{display:block;width:100%;border:0;border-radius:10px;padding:14px 16px;font-size:17px;font-weight:800;cursor:pointer;background:#d71920;color:#fff;text-align:center}.tvck-btn:hover{background:#b8141a}.tvck-btn.sec{background:#fff;color:#0f2a5c;border:2px solid #0f2a5c;margin-top:10px}.tvck-btn[disabled]{opacity:.6;cursor:wait}'+ '.tvck-rv dl{display:grid;grid-template-columns:150px 1fr;gap:6px 12px;margin:0;font-size:14.5px}.tvck-rv dt{color:#5b6475}.tvck-rv dd{margin:0;font-weight:600;word-break:break-word}@media(max-width:560px){.tvck-rv dl{grid-template-columns:1fr}.tvck-rv dt{margin-top:6px}}'+ '.tvck-help{background:#0f2a5c;color:#fff;border-radius:12px;padding:14px 16px;font-size:14px;line-height:1.6}.tvck-help a{color:#ffd54a;font-weight:800;text-decoration:none}'+ '.tvck-empty{text-align:center;padding:30px 16px}.tvck-ok{border:2px solid #17733a;background:#f2fbf5}.tvck-ok h3{color:#17733a}'+ '.tvck-buy{display:flex!important;flex-direction:column;align-items:center;justify-content:center;line-height:1.25}.tvck-buy small{display:block;font-size:12.5px;font-weight:600;opacity:.9;margin-top:2px}'+ '.tvck-dv{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.25}.tvck-dv small{display:block;font-size:12px;font-weight:600;opacity:.9}'; document.head.appendChild(s)} function prodInfo(){var h=$('h1');var pr=0;['.info-section .price .new','.price .new','.price strong.new','.price .color_red','.price'].map(function(q){return $(q)}).filter(Boolean).some(function(e){var t=e.textContent;if(!/VN|đ/i.test(t))return false;var n=num(t.replace(/[^\d.,\sVNĐđ]/g,' '));if(n>=1000){pr=n;return true}return false});var og=$('meta[property="og:image"]'); return {name:h?h.textContent.replace(/\s+/g,' ').trim():document.title,price:pr,img:og?og.content:'',url:location.pathname,t:Date.now()}} /* ---------- Trang san pham ---------- */ function productPage(){ if(C.mode=='cart'){ var tries=0;(function wait(){ var b=$('.tvpd-cta .tvpd-book');var nat=$('a[onclick^="addToCart("]'); if(!b&&tries++<25){setTimeout(wait,300);return} if(!b&&!nat)return; css(); if(b){var lab=function(){$$('.tvpd-cta .tvpd-book').forEach(function(x){if(x.textContent.indexOf('Đặt hàng online')<0){x.classList.add('tvck-buy');x.setAttribute('title','Đặt hàng online');x.innerHTML='🛒 Đặt hàng onlineGiao tận nơi · Trả tiền khi nhận hàng'}if(!x.__tvck){x.__tvck=1;x.addEventListener('click',function(){SS.set('tvck_p',prodInfo())},true)}})}; lab();var k=0,iv=setInterval(function(){lab();if(++k>25)clearInterval(iv)},400);if(window.MutationObserver){var mo=new MutationObserver(function(){mo.disconnect();lab();setTimeout(function(){var c=$('.tvpd-cta');if(c)mo.observe(c,{childList:true,subtree:true,characterData:true})},50)});var c0=$('.tvpd-cta');if(c0)mo.observe(c0,{childList:true,subtree:true,characterData:true})}} else if(nat){nat.addEventListener('click',function(){SS.set('tvck_p',prodInfo())},true)} })(); }else{ var bb=$$('.btn-order.buy');if(!bb.length)return;css(); bb.forEach(function(b){b.removeAttribute('onclick');b.setAttribute('href','/order-info.html');b.setAttribute('title','Đặt hàng online');b.classList.add('tvck-dv');b.innerHTML='🛒 Đặt hàng onlineGiao, lắp đặt tận nơi'; b.addEventListener('click',function(e){e.preventDefault();var p=prodInfo();SS.set('tvck_p',p);location.href='/order-info.html'})}); } } /* ---------- Trang dat hang ---------- */ function nativeForm(){return $$('form').filter(function(f){return /order-info/.test(f.getAttribute('action')||'')})[0]} function nativeItems(){var out=[]; $$('#order_info_content tr, .order_info table tr, table tr').forEach(function(tr){var td=tr.querySelectorAll('td');if(td.length<2)return;var last=td[td.length-1].textContent;if(!/VN|đ|\d{3}/.test(last))return; var nm=(tr.querySelector('a,strong,h4,h3,.name')||td[0]).textContent.replace(/Còn hàng|Hết hàng/g,'').replace(/\s+/g,' ').trim();if(!nm||nm.length<4)return; var im=tr.querySelector('img');out.push({name:nm,price:num(last),img:im?im.getAttribute('src'):'',url:''})}); var seen={};return out.filter(function(x){if(seen[x.name])return false;seen[x.name]=1;return true})} function code(){var d=new Date();function z(n){return (n<10?'0':'')+n}return 'TV'+String(d.getFullYear()).slice(2)+z(d.getMonth()+1)+z(d.getDate())+'-'+Math.floor(1000+Math.random()*9000)} function checkout(){ var f=nativeForm();if(!f)return; var sent=SS.get('tvck_sent'); var items=[];var sp=SS.get('tvck_p'); if(C.mode=='cart'){items=nativeItems();items.forEach(function(it){if(sp&&sp.name&&(sp.name==it.name||it.name.indexOf(sp.name.slice(0,25))==0)){it.url=sp.url;if(sp.img)it.img=sp.img;if(!it.price)it.price=sp.price}})} else if(sp&&sp.name){items=[sp]} /* sau khi gui: neu trang dat hang hien lai ma khong con san pham -> coi nhu da nhan don */ var errs=$$('.error-message,.alert-danger,.form-error,.help-block.error').filter(function(e){return e.textContent.trim()}); var wrap=C.mode=='cart'?(f.parentElement&&f.parentElement.parentElement):(f.closest('.box_content')||f.parentElement); css(); var root=document.createElement('div');root.className='tvck';root.id='tvck'; wrap.parentNode.insertBefore(root,wrap); if(sent&&Date.now()-sent.t<15*60*1000){ if(errs.length){wrap.style.display='';root.innerHTML='
Hệ thống báo thiếu hoặc sai thông tin ở form bên dưới. Anh/chị vui lòng kiểm tra lại, hoặc gọi '+C.hot+' / Zalo '+C.zalo+' để đặt nhanh. Mã đơn tạm: '+esc(sent.code)+'.
Anh/chị chọn sản phẩm cần mua rồi bấm “Đặt hàng online” trên trang sản phẩm.
Cần hỗ trợ: gọi '+C.hot+' · Zalo '+C.zalo+'
Điền thông tin nhận hàng, xem lại đơn rồi bấm xác nhận. '+esc(C.brand)+' sẽ gọi điện xác nhận trước khi giao.
'+ 'Hiện website chưa áp dụng thanh toán trực tuyến.
'+ ''+ '| Tạm tính | |
| Phí giao hàng | Báo khi xác nhận |
| Tổng tạm tính |
Giá đã niêm yết trên website. Tổng cuối cùng (kèm phí giao nếu có) được nhân viên đọc lại khi gọi xác nhận đơn.
'+ ''+ 'Bấm “Xác nhận đặt hàng” là anh/chị gửi đề nghị mua hàng tới '+esc(C.brand)+'. Đơn hàng chỉ được xác lập khi nhân viên gọi điện xác nhận lại với anh/chị. Anh/chị có thể hủy hoặc thay đổi đơn khi nhân viên gọi xác nhận.
'+ 'Cảm ơn anh/chị '+esc(s.nm)+'. '+esc(C.brand)+' đã nhận đề nghị đặt hàng:
Nhân viên sẽ gọi số '+esc(s.ph)+' để xác nhận đơn, phí giao (nếu có) và thời gian '+(s.recv=='ship'?'giao hàng':'nhận hàng tại cửa hàng')+' trong giờ làm việc (7h30 – 18h00, Thứ 2 – Thứ 7).
'+ 'Cần sửa đơn hoặc đặt gấp: gọi '+C.hot+' · Zalo '+C.zalo+', đọc mã đơn '+esc(s.code)+'.
'+ '