// global var var THEME_URI = 'http://www.everything2hand.com/store/app/views/themes/2column/'; var OLD_BASE_URI = 'http://static.weloveshopping.com/shop/'; var SHOP_ID = '174968'; var SHOP_NAME = 'Everything2hand'; var BASE_URI = 'http://www.everything2hand.com/store'; var JSON_DATA = {"product_on_cart":{"15332600()":{"id":"15332600","productid":"lot1_feb034","name":"lot1_feb034","price":140,"shopidref":"174968","description":"lot1_feb034\r\n\r\nSize = L\r\n\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e1c\u0e49\u0e32 = \u0e44\u0e2b\u0e21\u0e1e\u0e23\u0e21\r\n\u0e2a\u0e35 = \u0e14\u0e33\r\n\u0e2a\u0e20\u0e32\u0e1e = 85%\r\n\r\n\r\n\u0e02\u0e19\u0e32\u0e14\u0e40\u0e2a\u0e37\u0e49\u0e2d\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19\r\nItem\tDescription\tS\tM\tL\tXL\tXXL\t3XL\t4XL\t5XL\r\nA\t\u0e23\u0e2d\u0e1a\u0e2d\u0e01\t32\t34\t36\t38\t40\t42\t44\t46\r\n","thumb":"http:\/\/static.weloveshopping.com\/shop\/client\/000034\/everything2hand\/lot1_feb034_sma.jpg","amount":1,"tran_fee":"0","stock":"-4","sp_name":"","overstock":true},"15332515()":{"id":"15332515","productid":"lot1_feb030","name":"lot1_feb030","price":150,"shopidref":"174968","description":"lot1_feb030\r\n\r\nSize = XL\r\n\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e1c\u0e49\u0e32 = \u0e22\u0e37\u0e14\r\n\u0e2a\u0e35 = \u0e02\u0e32\u0e27-\u0e14\u0e33\r\n\u0e2a\u0e20\u0e32\u0e1e = 85%\r\n\r\n\r\n\u0e02\u0e19\u0e32\u0e14\u0e40\u0e2a\u0e37\u0e49\u0e2d\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19\r\nItem\tDescription\tS\tM\tL\tXL\tXXL\t3XL\t4XL\t5XL\r\nA\t\u0e23\u0e2d\u0e1a\u0e2d\u0e01\t32\t34\t36\t38\t40\t42\t44\t46\r\n","thumb":"http:\/\/static.weloveshopping.com\/shop\/client\/000034\/everything2hand\/lot1_feb030_sma.jpg","amount":1,"tran_fee":"0","stock":"-4","sp_name":"","overstock":true},"15502020()":{"id":"15502020","productid":"march001","name":"march001 ","price":150,"shopidref":"174968","description":"Size = M<\/span>\u0e1c\u0e49\u0e32<\/span>   = \u0e04\u0e2d\u0e15\u0e15\u0e2d\u0e19<\/span><\/span> \r\n

\r\n\u0e2a\u0e35     <\/span><\/span>= \u0e21\u0e48\u0e27\u0e07\u0e21\u0e35\u0e25\u0e32\u0e22\u0e1b\u0e31\u0e01<\/span>\r\n<\/p>\r\n\u0e2d\u0e01<\/span>   = 36<\/span>\u0e40\u0e2d\u0e27<\/span>  =<\/span>\u0e2a\u0e30\u0e42\u0e1e\u0e01 =<\/span><\/span>\u0e22\u0e32\u0e27<\/span>   =<\/span>\u0e2a\u0e20\u0e32\u0e1e<\/span> = 90%<\/span>\u0e02\u0e19\u0e32\u0e14\u0e40\u0e2a\u0e37\u0e49\u0e2d\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19 <\/span><\/span>Item Description S M L XL XXL 3XL 4XL 5XL A <\/span>              <\/span>\u0e23\u0e2d\u0e1a\u0e2d\u0e01 <\/span>32 34 36 38 40 42 44 46 <\/span>\r\n","thumb":"http:\/\/static.weloveshopping.com\/shop\/client\/000034\/everything2hand\/march001_sma.jpg","amount":1,"tran_fee":"0","stock":"-4","sp_name":"","overstock":true},"15502223()":{"id":"15502223","productid":"march004","name":"march004","price":120,"shopidref":"174968","description":"Size = M<\/span> \r\n

\r\n\u0e1c\u0e49\u0e32<\/span>   = \u0e04\u0e2d\u0e15\u0e15\u0e2d\u0e19\u0e22\u0e37\u0e14<\/span><\/span>\r\n<\/p>\r\n\u0e2a\u0e35     <\/span><\/span>= \u0e02\u0e32\u0e27\u0e14\u0e33<\/span>\u0e2d\u0e01<\/span>   = 33<\/span>\u0e40\u0e2d\u0e27<\/span>  =<\/span>\u0e2a\u0e30\u0e42\u0e1e\u0e01 =<\/span><\/span>\u0e22\u0e32\u0e27<\/span>   =<\/span>\u0e2a\u0e20\u0e32\u0e1e<\/span> = 80%<\/span>\u0e02\u0e19\u0e32\u0e14\u0e40\u0e2a\u0e37\u0e49\u0e2d\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19 <\/span><\/span>Item Description S M L XL XXL 3XL 4XL 5XL A <\/span>\r\n

\r\n              <\/span>\u0e23\u0e2d\u0e1a\u0e2d\u0e01 <\/span>32 34 36 38 40 42 44 46 <\/span>\r\n<\/p>\r\n","thumb":"http:\/\/static.weloveshopping.com\/shop\/client\/000034\/everything2hand\/march004_sma.jpg","amount":1,"tran_fee":"0","stock":"-4","sp_name":"","overstock":true},"15332376()":{"id":"15332376","productid":"lot1_feb019","name":"lot1_feb019","price":170,"shopidref":"174968","description":"lot1_feb019","thumb":"http:\/\/static.weloveshopping.com\/shop\/client\/000034\/everything2hand\/lot1_feb019_sma.jpg","amount":1,"tran_fee":"0","stock":"-4","sp_name":"","overstock":true},"15332582()":{"id":"15332582","productid":"lot1_feb033","name":"lot1_feb033 dress \u0e2a\u0e44\u0e15\u0e25\u0e4c\u0e40\u0e01\u0e32\u0e2b\u0e25\u0e35","price":170,"shopidref":"174968","description":"lot1_feb033 Size = M \u0e40\u0e19\u0e37\u0e49\u0e2d\u0e1c\u0e49\u0e32 = \u0e22\u0e37\u0e14 \u0e2a\u0e35 = \u0e02\u0e32\u0e27 \u0e2a\u0e20\u0e32\u0e1e = 99% \u0e02\u0e19\u0e32\u0e14\u0e40\u0e2a\u0e37\u0e49\u0e2d\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19 Item Description S M L XL XXL 3XL 4XL 5XL A \u0e23\u0e2d\u0e1a\u0e2d\u0e01 32 34 36 38 40 42 44 46 \r\n","thumb":"http:\/\/static.weloveshopping.com\/shop\/client\/000034\/everything2hand\/lot1_feb033_sma.jpg","amount":1,"tran_fee":"0","stock":"-4","sp_name":"","overstock":true}}}; var SHOP_DISABLED_TEXT = 'y'; var SHOP_DISABLED_MOUSE = 'y'; var SHOP_DISABLED_MOUSE_MSG = 'อ๊ะๆ ทำอาราย'; var SHOP_PRODUCT_PREVIEW = '1'; var IS_TRANSLATE = true ; var SHOP_POPUP_OPEN = 'n'; var SHOP_POPUP_OPTION = '0,0,0,0,0,0,250,150,10,110'; var SHOP_ADMIN_SHORTCUT = '{"add":["article-block","product-list"],"update":["article-block","product-list"],"del":["article-block","product-list","product-comment","webboard-block","board-poster-set","webboard-comment"],"manage":["banner-top","logo","main-menu","text-link","banner-link","advertise-link","category-block","menuservice-block","widget-block","aboutus-block","announce-block","side-widget","flag","menu-bottom","moreimage","product-suggest","product-preview","product-specification","webboard-block","rss-feed","welcome-text","category-welcome-text"],"showfirst":"1"}'; var SHOP_CLIENT_CART = '1'; var SHOP_CARTMEMBER = ''; var MEMBER_MID = 'MEMBER_MID'; var SHOP_COOKIE_NAME = 'cart_cookie174968'; if(MEMBER_MID == 'MEMBER_MID') { MEMBER_MID = ''; } base_real = BASE_URI.replace("store",""); if(location.href==base_real) { if(SHOP_POPUP_OPEN=='y') { window.open('http://www.everything2hand.com/store/popup/','pop','location=0,directories=0,fullscreen=0,menubar=0,resizable=0,scrollbars=0,toolbar=0,width=250,height=150,left=10,top=110');/* popup zone*/ } } function setHome() { document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage(BASE_URI); } function addToFavorites() { var fav_title = SHOP_NAME + ' : weloveshopping.com'; if (document.all) window.external.AddFavorite(BASE_URI,fav_title) else if (window.sidebar) window.sidebar.addPanel(fav_title, BASE_URI, ""); // firefox } var popUpWin=0; function popUpWindow(URLStr, left, top, width, height) { if(popUpWin) { if(!popUpWin.closed) popUpWin.close(); } popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+''); } function Popup(pname,purl,w,h,s){ LeftPosition = (screen.width) ? (screen.width-w-8)/2 : 0; TopPosition = (screen.height) ? (screen.height-h-50)/2 : 0; myWinName = window.open(purl,pname,"width="+w+",height="+h+",top="+TopPosition+",left="+LeftPosition+",resizable=no,scrollbars="+s); if (parseInt(navigator.appVersion) >= 4) { myWinName.window.focus(); } return myWinName; } var clock_img = THEME_URI+"../images/icon_clock_2.gif"; $(document).ready(function(){ $('#product-list li[class=pro-item] div[class=pro-desc] a, #product-list li[class=pro-item] div[class=pro-image] a').click(function(){ if($(this).attr('class')!='enlarge') { var firstclick = $.cookie('firstclick'); if(firstclick == null) { $.cookie('firstclick', '1', { path: '/', expires: 1 }); window.open('http://www.weloveshopping.com/crm.php?url=' + $(this).attr('href')); return false; } } }); //poll form check $('#pollFrm').submit(function(){ comment = $(this).find('#comment'); comment_by = $(this).find('#comment_by'); if(comment.val()=='') { alert('กรุณาเลือกผลโหวต และกรอกชื่อผู้ส่ง'); comment.focus(); return false; } if(comment_by.val()=='') { alert('กรุณาเลือกผลโหวต และกรอกชื่อผู้ส่ง'); comment_by.focus(); return false; } }); // pay date $('#timepicker').jtimepicker({ secView:false, minInterval:1, orientation:"horizontal", clockIcon:clock_img, hourLabel:"ชั่วโมง", minLabel:"นาที", hourCombo:"hour", minCombo:"minute" }); $('#paydate').datepicker({ buttonText: 'เลือกวัน' }); // ready queue setMouseMove(); // ยืนยันความเป็นคน setKeyPress(); // ยืนยันความเป็นคน cartIni(); // cart system if (IS_TRANSLATE) { languageIni(); //language system } // end ready queue $("#send").click(function () { var email = $("#email").val(); var newsletter = $('input[name=newsletter]:checked').val(); var uri = OLD_BASE_URI+"s_savemailajax.php"; $.get(uri, { shopid: SHOP_ID, email: email, need: newsletter }, function(data){ alert("e-mail saved."); $("#email").val(''); }); }); /* ======== cartorder/shippingaddress/ =========*/ $('#shipping_address').change(function(){ json_obj = $('#shipping_address :selected').attr('rel'); json_val = eval(json_obj); $('#name').val(json_val[0].name); $('#address').val(json_val[0].address); $('#district').val(json_val[0].district); $('#province').val(json_val[0].province); $('#country').val(json_val[0].country); $('#postcode').val(json_val[0].postcode); $('#contact_tel').val(json_val[0].contact_tel); $('#email').val(json_val[0].email); $('#other_info').val(json_val[0].other_info); }); /* auto */ method_val = $("input[name='shipping_method']:checked").val(); checkMethod(method_val); /* click */ $("input[name='shipping_method']").click(function() { checkMethod($(this).val()); }); /* ======== cartorder/payment/ =========*/ $('input[name=payment_method]').change(function(){ payment_val = $('input[name=payment_method]:checked').val(); if(payment_val == "wetrust") { $(".wetrust").find("input").removeAttr('disabled'); } else if( (payment_val == "BankTrans") || (payment_val == "paysbuy") || (payment_val == "paypal") ) { $(".wetrust").find("input").attr('disabled','disabled'); } }); $('.payment_tips').slideUp(); // init $('input[name=payment_wetrust]').change(function(){ payment_val = $('input[name=payment_wetrust]:checked').val(); detail_wetrust = '#detail_'+payment_val; //alert($('.payment_tips')); $('.payment_tips').slideUp(); $(detail_wetrust).slideDown(); }); // thumb view $('.more_img').click(function(){ el = $(this).attr('src'); $('#main_img').attr('src',el); }); /* ===== shop disable text & mouse =====*/ if(SHOP_DISABLED_MOUSE=='y') { // protect image if($.browser.safari) { $(window).bind('load', function() { $('.pro-image img').protectImage(); }); } else { $(window).bind('load', function() { $('.pro-image img').mask(); }); } if(SHOP_DISABLED_MOUSE_MSG=='') { mouse_msg = 'Right click disabled.'; } else { mouse_msg = SHOP_DISABLED_MOUSE_MSG; } // disable right click $(this).bind("contextmenu", function(e) { alert(mouse_msg); e.preventDefault(); }); } if(SHOP_DISABLED_TEXT=='y') { // disable text select $("#container").disableTextSelect(); $('#container').bind('click',function() { $("#container").disableTextSelect(); }); $('input, select, textarea').bind('click',function() { $(this).focus(); $("#container").enableTextSelect(); }); } }); function checkMethod(method_val) { if(method_val==1) { $('#newcontact').find('input').attr('disabled','disabled'); $('#newcontact').find('textarea').attr('disabled','disabled'); $('#shipping_address').removeAttr('disabled'); } else if(method_val==2) { $('#newcontact').find('input').removeAttr('disabled'); $('#newcontact').find('textarea').removeAttr('disabled'); $('#shipping_address').attr('disabled','disabled'); } } function checkShipping() { method_val = $("input[name='shipping_method']:checked").val(); if(method_val==1) { temp_val = $("#shipping_address option:selected").attr("rel"); //.val(); $('#db_contact').val(temp_val); } else if(method_val==2) { if(confirm('ต้องการเก็บข้อมูลการจัดส่งสินค้าที่เพิ่มเข้ามาใหม่ไว้ใช้ในครั้งต่อไป?')) { $('#saveContact').val(1); } else { $('#saveContact').val(0); } } } function checkTransport(form) { // transport option transport_option = $('#transport_option :selected').val(); if(transport_option!='#') { form.submit(); return true; } else { alert('โปรดเลือกรูปแบบค่าจัดส่ง'); $('#transport_option').focus(); return false; } } function setMouseMove () { document.onmousemove = function () { if(($.cookie('m'+SHOP_ID)*1)==0) { $.cookie('m'+SHOP_ID,1); } } } function setKeyPress() { document.onkeypress = function () { if(($.cookie('k'+SHOP_ID)*1)==0) { $.cookie('k'+SHOP_ID,1); } } } function summaryCheck(form) { var img = ''; //form.submit(); $.blockUI({ theme: true, title: 'ข้อความจากระบบ', message: img + '

ประมวลผลข้อมูล กรุณารอสักครู่...
Please wait, Processing data ...
โปรดอย่ากดปุ่มใดๆ จนกว่าหน้าจอการสั่งซื้อจะสิ้นสุด

' }); return false; }