//이미지 상세보기 레이어 function LayerShowImage(img, e){ layerPositionSet('layerImageShow', e); $('layerImageShow').innerHTML = ""; } //레이어 닫기 function LayerHideImage() { $('layerImageShow').hide(); } //연계재고 옵션 가져오기 function getRelOpt(idx, opt_1){ if(idx != "" || opt_1){ new Ajax.Request('/module/shop/ajax_get_rel_opt.php', { method:'get', parameters: {idx: idx, opt_1: opt_1}, asynchronous: this.asynchronous, encoding: 'utf-8', contentType: 'application/x-www-form-urlencoded', onSuccess: function(transport){ var response = transport.responseText || "응답된 내역이 없습니다."; //alert(transport.responseText); setRelOpt(response); }, onFailure: function(){ alert('AJAX 데이터 응답중 오류가 발생하였습니다.') } }); } } function setRelOpt(txt){ //alert(txt); var opt = new Array(); var arr = new Array(); var stk; var prc; opt = txt.split("||"); //초기화 for(i=1; i< $("opt_rel_contents_1").length; i++){ $("opt_rel_contents_1").options[i] = null; } for(i=0; i "0"){ prc = " (+"+addComma(arr[1])+")"; }else{ prc = ""; } //재고가 없을경우 값을 -1 로 설정 if(arr[2]=="0"){ $("opt_rel_contents_1").options[i+1] = new Option(arr[0]+" (품절)","-1"); }else{ $("opt_rel_contents_1").options[i+1] = new Option(arr[0]+prc,arr[0]+"|"+arr[1]); } } } //옵션가격 설정 function ___setOptPrice(){ var price; var point; var pointUnit; var total_price; //var opt_price; var cnt; price = parseInt($("#basicPrice").val()); point = parseInt($("#basicPoint").val()); pointUnit = $("#basicPointUnit").val(); cnt = parseInt($("#qty").val()); if(cnt > 0){ cnt = cnt; }else{ cnt = 0; } /* //옵션가격 초기화 var option_price1, option_price2, option_price3, option_price4, option_price5, option_price_rel1, option_price_rel2; option_price1 = 0; option_price2 = 0; option_price3 = 0; option_price4 = 0; option_price5 = 0; option_price_rel1 = 0; option_price_rel2 = 0; opt_price = option_price1 + option_price2 + option_price3 + option_price4 + option_price5 + option_price_rel1 + option_price_rel2; try{ option_price1 = $("#opt_contents_0").val().split("|")[1]; if(option_price1 > 0){ opt_price = opt_price + parseInt(option_price1); } }catch(e){} try{ option_price2 = $("#opt_contents_1").val().split("|")[1]; if(option_price2 > 0){ opt_price = opt_price + parseInt(option_price2); } }catch(e){} try{ option_price3 = $("#opt_contents_2").val().split("|")[1]; if(option_price3 > 0){ opt_price = opt_price + parseInt(option_price3); } }catch(e){} try{ option_price4 = $("#opt_contents_3").val().split("|")[1]; if(option_price4 > 0){ opt_price = opt_price + parseInt(option_price4); } }catch(e){} try{ option_price5 = $("#opt_contents_4").val().split("|")[1]; if(option_price5 > 0){ opt_price = opt_price + parseInt(option_price5); } }catch(e){} try{ option_price_rel1 = $("#opt_rel_contents_1").val().split("|")[1]; if(option_price_rel1 > 0){ opt_price = opt_price + parseInt(option_price_rel1); } }catch(e){} try{ option_price_rel2 = $("#opt_rel_contents_2").val().split("|")[1]; if(option_price_rel2 > 0){ opt_price = opt_price + parseInt(option_price_rel2); } }catch(e){} total_price = (price*cnt)+opt_price; if(pointUnit=="P"){ total_point_price = price*cnt; total_point = (point*total_point_price)/100; }else{ total_point = point*cnt; } */ total_price = price*cnt; if(pointUnit=="P"){ total_point_price = price*cnt; total_point = (point*total_point_price)/100; }else{ total_point = point*cnt; } try{ $("#divPrice").html(addComma(total_price)); }catch(e){} try{ $("#divPoint").html(addComma(total_point)); }catch(e){} } //셀렉트 박스 전체체크 function checkboxCheckAll(status){ var obj = document.getElementsByName('items[]'); var objlength = obj.length; for(i=0; i parseInt(f.hiddenMyPoint.value)){ f.using_point.value = f.hiddenMyPoint.value; } //0보다 작으면 0 if(parseInt(f.using_point.value) < 0){ f.using_point.value = 0; } //값이 없어도 0 if(!f.using_point.value){ f.using_point.value = 0; } var payPrice = parseInt(f.hiddenPayAmount.value) - parseInt(f.using_point.value); $("showPriceTotal").innerHTML = addComma(payPrice) + "원"; } //상품이미지 크게보기 function viewImgPop(g_idx,seq){ obj = window.open("/module/shop/viewImgPop.php?g_idx="+g_idx+"&seq="+seq,"viewImagePop","width=100,height=100,menubars=0, toolbars=0"); } //상품 상세페이지에서의 리뷰보기 var review_list = ''; function reveiwClick( review) { if( review_list != review ) { if( review_list !='' ) { review_list.style.display = 'none'; } review.style.display = 'block'; review_list = review; } else { review.style.display = 'none'; review_list = ''; } } //쇼셜커머스 function sendTwitter(title,url) { var wp = window.open("http://twitter.com/home?status=" + encodeURIComponent(title) + " " + encodeURIComponent(url), 'twitter', ''); if ( wp ) { wp.focus(); } } function sendMe2Day(title,url,tag) { var wp = window.open("http://me2day.net/posts/new?new_post[body]=" + encodeURIComponent(title) + " " + encodeURIComponent(url) + "&new_post[tags]=" + encodeURIComponent(tag), 'me2Day', ''); if ( wp ) { wp.focus(); } } function sendFaceBook(title,url) { var wp = window.open("http://www.facebook.com/sharer.php?u=" + encodeURIComponent(url) + "&t=" + encodeURIComponent(title), 'facebook', ''); if ( wp ) { wp.focus(); } } function sendCyWorld(url,title,thumbnail,summary) { var wp = window.open("http://csp.cyworld.com/bi/bi_recommend_pop.php?url="+encodeURIComponent(url)+"&title="+encodeURIComponent(title)+"&thumbnail="+encodeURIComponent(thumbnail)+"&summary="+encodeURIComponent(summary),"xu","width=400px,height=364px") if ( wp ) { wp.focus(); } }