PageSourceSearch

https://static.netpx.co.kr/front/netpx_v3/skin/js/product.js?v=20201119

js netpx.co.kr collected 2026-10-05 05:17:02 UTC 23,617 bytes, 898 lines download raw bytes

1/* prepareOrder Class */
2
3var prepareOrder = new function() {
4	
5	this.getQty = function(goods_no,goods_sub) {
6		
7		var self = prepareOrder;
8
9		var qty_obj = $("#product_order_info input[name='qty'][type='text']");
10		var qty = parseInt($(qty_obj).prop("value"));
11		return qty;
12	}
13
14	this.setQty = function(goods_no,goods_sub,qty) {
15		
16		var self = prepareOrder;
17
18		var qty_obj = $("#product_order_info input[name='qty'][type='text']");
19		$(qty_obj).prop("value",qty);
20	}
21
22	this.getOpt = function(opt_cnt, first_option_cnt, no_price) {
23
24		var opt = "";
25		var opt1 = "";
26
27		if( $('input[id=option1]').val() ){
28			opt1 = $('input[id=option1]').val();
29		}
30
31		if ( opt1 == "" ) { return false; }
32
33		if( no_price && opt1 != undefined ){
34			var is_price_include = opt1.indexOf("|");
35			if( is_price_include > -1){
36				// opt_price included
37				tmp = opt1.split("|");
38				 opt1 = tmp[0];
39			}
40		}
41
42		opt = opt1;
43
44		if ( opt_cnt == 2) {
45			var opt2 = $('input[id=option2]').val();
46			if ( opt2 == "" ) 	{ return false; }
47			opt = opt1 + '^' + opt2;
48		}
49		return opt;
50	}
51	
52	this.getAddopt = function() {
53		
54		var self = prepareOrder;
55		var addopt = "";
56		for( var i = 1; i< 10; i++){
57			
58			var addopt_required_yn = $("#" + "product_order_info input[name='addopt_required_yn" + i + "']");
59			var addopt_obj = $("#" + "product_order_info select[name='addopt"+i+"']");
60			
61			// 필수값 여부 판단
62			if( addopt_required_yn ){
63				if( addopt_required_yn.prop("value") == "Y" && addopt_obj.prop("value") == "" ){
64					addopt = "failed";
65					break;
66				}
67			}
68			
69			if( addopt_obj.prop("value") ){
70				addopt += ( addopt != "" ) ? "^":"";
71				addopt += addopt_obj.prop("value");
72			} else {
73			}
74		}
75		return addopt;
76	}
77
78	this.checkLimitedQty = function(qty)
79	{
80		var limited_qty_yn = $("#product_order_info input[name='limited_qty_yn'][type='hidden']").prop("value");
81		var limited_min_qty = $("#product_order_info input[name='limited_min_qty'][type='hidden']").prop("value");
82		var limited_max_qty = $("#product_order_info input[name='limited_max_qty'][type='hidden']").prop("value");
83
84		if(limited_qty_yn == "Y") {
85			if(limited_min_qty > qty || limited_max_qty < qty){
86				return false;
87			}
88		}
89
90		return true;
91	}
92	
93	this.changeQty = function(opt_cnt,goods_no,goods_sub,flag) {
94		
95		var self = prepareOrder;
96		
97		var qty = self.getQty(goods_no,goods_sub);
98		
99		if ( flag == "plus" ) {
100			if(self.checkLimitedQty(qty+1)){
101				self.setQty(goods_no,goods_sub,qty+1);
102			} else {
103				alert("구매가능한 최대수량을 초과하였습니다.");
104				return;
105			}
106		} else {
107			if(!self.checkLimitedQty(qty-1) || qty < 2){
108				alert('더 이상 줄일 수 없습니다.');
109				return;
110			} else{
111			self.setQty(goods_no,goods_sub,qty-1);
112			}
113		}
114	}
115	
116	this.viewSubOption = function(goods_no, goods_sub, goods_opt, option_cnt) {
117		
118		let html = "";
119		let is_price_include = goods_opt.indexOf("|");
120		if( is_price_include > -1){
121			tmp = goods_opt.split("|");
122			goods_opt = tmp[0];
123		}
124		
125		if ( option_cnt > 1 && goods_opt != "") {
126			
127			$.ajax({
128				type: "POST"
129				, url: "/app/svc/production_option"
130				, data: "goods_no=" + urlEncode(goods_no) + "&goods_sub=" + urlEncode(goods_sub) + "&goods_opt=" + urlEncode(goods_opt)
131				, success: function(msg) {
132					const obj = JSON.parse(msg);
133					$.each(obj, function(index, item){
134						if(item.qty == 0) {
135							html += '<a href="javascript:void(0);" data-name="option2" value="' + item.val + '" class="option_list soldout">';
136						} else {
137							html += '<a onClick="sel_opt(\'_sub\', ' + goods_no + ', ' + goods_sub + ', \'' + item.val + '\', ' + option_cnt + ', \'' + item.txt + '\')" href="javascript:void(0);" data-name="option2" value="' + item.val + '" class="option_list">';
138						}
139						html += '<span class="product_option_nm option_restock">' + item.txt + '</span>';
140						if(item.qty == 0 && item.restock_yn == 'Y') {
141							html += '<span onClick="view_restock(this, \'restock_info\', -70, 450, \'' + item.val + '\');" class="fr bt_ty15 bt_st01 btn_restock">재입고알림</span>';
142						}
143						html += '</a>';
144					});
145					$('.option_sub_list_area').html(html);
146				}
147			});
148		}
149	}
150	
151	this.addWishList = function(opt_cnt, goods_no, goods_sub,first_option_cnt) {
152		
153		var self = prepareOrder;
154		var opt = self.getOpt(opt_cnt, first_option_cnt);
155		var opt_noprice = self.getOpt(opt_cnt, first_option_cnt, true);
156		var addopt = self.getAddopt();
157		var qty = self.getQty(goods_no, goods_sub);
158		var target = encodeURIComponent("/app/product/detail/" + goods_no + "/" + goods_sub);
159
160		if ( !loginChk() ) {
161			openWindow('/app/member/login_pop', 'login_pop', 'resizable=yes,scrollbars=yes', '520', '665', true); 
162			return false;			
163		}
164
165		if($('a.heart').hasClass('is-active')) {
166			alert('이미 찜 한 상품입니다.');
167			return false;
168		}
169		
170		if ( opt === false) {
171			alert('옵션을 선택하세요');
172			return false;
173		}
174
175		if ( addopt == 'failed') {
176			alert('추가 옵션을 선택하세요');
177			return false;
178		}
179
180		if ( opt === true) {
181			opt = urlEncode(opt);
182		}
183		
184		// 품절 상품
185		if( opt == undefined ) {
186			opt = "";
187		}
188			
189		// 하단 쇼핑슬라이드 영역의 존재 여부
190		var cart_div_length = $("#mini_cart").length;
191	
192		var path = jQuery.url.attr("path");
193		
194		$.ajax({
195			type: "POST",
196			url: "/app/member/login_check",
197			success: function(msg){				
198				eval("var json = " + msg);	
199				if ( json.result == '1' ) {
200					
201					// 위시리스트 저장 후 결과 출력
202					$.ajax({
203						type: "POST",
204						url: "/app/wish/svc_add/" + goods_no + "/" + goods_sub,
205						data: "goods_opt=" + urlEncode(opt_noprice) + "&addopt=" + urlEncode(addopt),
206						success: function(msg) {
207							alert('찜 한 상품을 담았습니다.');
208							$('a.heart').addClass('is-active');
209							$('span.heart_cnt').html(parseInt($('span.heart_cnt').text()) + 1);
210						}
211					});
212				}
213				else {
214					if(cart_div_length == 0) {
215						
216						// 쇼핑슬라이드 영역이 없으면 로그인 페이지 이동
217						document.location.href = '/app/member/login?target_url='+ path;
218					} else {
219						
220						// 쇼핑슬라이드 영역이 있다면 쇼핑슬라이트 팝업
221						login(path);	
222					}
223				}
224			}
225		});
226	}
227	
228	this.addCart = function(opt_cnt, goods_no, goods_sub, first_option_cnt) {
229		
230		// 1. 시간 체크(클라이언트 vs 서버)
231		checkTime();
232
233		var self = prepareOrder;
234		var opt = self.getOpt(opt_cnt, first_option_cnt);
235		var opt_noprice = self.getOpt(opt_cnt, first_option_cnt, true);
236		var addopt = self.getAddopt();
237		var qty = self.getQty(goods_no, goods_sub);
238
239		if ( opt === false) {
240			alert('옵션을 선택하세요');
241			return;
242		}
243
244		if ( addopt == 'failed') {
245			alert('추가 옵션을 선택하세요');
246			return false;
247		}
248
249		if ( opt === true) {
250			opt = urlEncode(opt);
251		}
252		if ( "1" != miniCart.chkJaego(goods_no, goods_sub, opt_noprice, qty)) {
253			alert('재고가 부족합니다.');
254			return;
255		}
256
257		// 기본옵션 포맷 : BLUE|5000^GREEN
258		var opt_price = 0;
259		var opt1 = "";
260		if( opt_cnt > 1 ){
261			tmp_opt = opt.split("^");
262			opt1 = tmp_opt[0];
263		} else if( opt_cnt == 1 ){
264			opt1 = opt;
265		}
266
267		var is_price_include = opt1.indexOf("|");
268		if( is_price_include > -1){
269			tmp = opt1.split("|");
270			opt_price = parseInt(tmp[1]);
271		}
272		
273		// 추가옵션 포맷 : RED|5000^BLUE|1000^GREEN|3000
274		var addopt_price = 0;
275		if( addopt ){
276			is_multi = addopt.indexOf("^");
277			is_price = addopt.indexOf("|");
278			if( is_price > -1 ){
279				if( is_multi > -1 ){
280					tmp_addopt = addopt.split("^");
281					for(i = 0; i < tmp_addopt.length; i++){
282						tmp = tmp_addopt[i].split("|");
283						addopt_price += parseInt(tmp[1]);
284					}
285				} else {
286					tmp = addopt.split("|");
287					addopt_price += parseInt(tmp[1]);
288				}
289			}
290		}
291
292		// 하단 쇼핑슬라이드 영역의 존재 여부
293		var cart_div_length = $("#mini_cart").length;
294
295		$.ajax({
296			type: "POST"
297			, url: "/app/cart/mini_cart_save/" + goods_no + "/" + goods_sub
298			, data: "goods_opt=" + urlEncode(opt_noprice) + "&opt_price=" + urlEncode(opt_price) + "&addopt=" + urlEncode(addopt) + "&addopt_price=" + urlEncode(addopt_price) + "&goods_cnt=" + qty
299			, success: function(msg) {
300				if(msg == "-1") {
301					alert("넷피엑스 회원만 구매 가능한 상품입니다.\n로그인 후 이용해주십시오.");
302					document.location.href = '/app/member/login';
303				}else if(msg == "-2") {
304					alert("이미 장바구니에 최대구매수량이 담겨 있습니다. \n장바구니를 확인해주세요.");
305				}else if(msg == "-3") {
306					alert("이미 최대구매수량을 구입하셨습니다. \n기존 구매내역에서 취소가능상품이 있는 경우 주문이 가능합니다.");
307				}else if(msg == "1"){
308
309					if(cart_div_length == 0) {
310						
311						// 쇼핑슬라이드 영역이 없으면 카트로 이동
312						document.location.href = '/app/cart';
313					} else {
314						
315						// 쇼핑슬라이드 영역이 있다면 쇼핑슬라이트 팝업
316						shoppingSlide.viewCart(false);
317					}
318
319					//----------------------------------------------------------------------------------------
320					let item_brand = document.getElementById('brand').value;
321					let item_name = document.getElementById('product_goods_nm').value;
322					let item_price = Number(document.getElementById('price').value);
323					let total_price = item_price + opt_price + addopt_price;
324					dataLayer.push({
325						event: "add_to_cart",
326						ecommerce: {
327							currency: "KRW",
328							value: total_price,
329							items: [{
330								item_brand: item_brand,
331								item_name: item_name,
332								item_id: goods_no,
333								price: total_price,
334								quantity: qty
335							}]
336						}
337					});
338					//----------------------------------------------------------------------------------------
339
340				} else if (msg == "-4") {
341					alert("해당 상품의 재고가 부족해 더이상 장바구니에 담을 수 없습니다.");
342				}
343			}
344		});
345	}
346	
347	this.directOrder = function(opt_cnt, goods_no, goods_sub, first_option_cnt) {
348		
349		// 1. 시간 체크(클라이언트 vs 서버)
350		checkTime();
351		
352		var self = prepareOrder;
353		var opt = self.getOpt(opt_cnt, first_option_cnt);
354		var opt_noprice = self.getOpt(opt_cnt, first_option_cnt, true);
355		var addopt = self.getAddopt();
356		var qty = self.getQty(goods_no, goods_sub);
357		
358		if ( opt === false) {
359			alert('옵션을 선택하세요');
360			return;
361		}
362
363		if ( addopt == 'failed') {
364			alert('추가 옵션을 선택하세요');
365			return false;
366		}
367
368		if ( opt === true) {
369			opt = urlEncode(opt);
370		}
371		
372		if ( miniCart.chkJaego(goods_no, goods_sub, opt_noprice, qty) != "1" ) {
373			alert('재고가 부족합니다.');
374			return;
375		}
376		// 기본옵션 포맷 : BLUE|5000^GREEN
377		var opt_price = 0;
378		var opt1 = "";
379		if( opt_cnt > 1 ){
380			tmp_opt = opt.split("^");
381			opt1 = tmp_opt[0];
382		} else if( opt_cnt == 1 ){
383			opt1 = opt;
384		}
385
386		var is_price_include = opt1.indexOf("|");
387		if( is_price_include > -1){
388			tmp = opt1.split("|");
389			opt_price = parseInt(tmp[1]);
390		}
391		
392		// 추가옵션 포맷 : RED|5000^BLUE|1000^GREEN|3000
393		var addopt_price = 0;
394		if( addopt ){
395			is_multi = addopt.indexOf("^");
396			is_price = addopt.indexOf("|");
397			if( is_price > -1 ){
398				if( is_multi > -1 ){
399					tmp_addopt = addopt.split("^");
400					for(i = 0; i < tmp_addopt.length; i++){
401						tmp = tmp_addopt[i].split("|");
402						addopt_price += parseInt(tmp[1]);
403					}
404				} else {
405					tmp = addopt.split("|");
406					addopt_price += parseInt(tmp[1]);
407				}
408			}
409		}
410		$.ajax({
411			type: "POST",
412			url: "/app/cart/mini_cart_save/" + goods_no + "/" + goods_sub,
413			data: "goods_opt=" + urlEncode(opt_noprice) + "&opt_price=" + urlEncode(opt_price) + "&addopt=" + urlEncode(addopt) + "&addopt_price=" + urlEncode(addopt_price) + "&goods_cnt=" + qty,
414			success: function(msg) {
415				if(msg == "-1") {
416					alert("넷피엑스 회원만 구매 가능한 상품입니다.\n로그인 후 이용해주십시오.");
417					document.location.href = '/app/member/login';
418				}else if(msg == "-2") {
419					alert("이미 장바구니에 최대구매수량이 담겨 있습니다. \n장바구니를 확인해주세요.");
420				}else if(msg == "-3") {
421					alert("이미 최대구매수량을 구입하셨습니다. \n기존 구매내역에서 취소가능상품이 있는 경우 주문이 가능합니다.");
422				}else if(msg == "1"){
423					document.location.href = '/app/order/order_form';
424				} else if (msg == "-4") {
425					document.location.href = '/app/order/order_form';
426				}
427			}
428		});
429	}
430}
431
432/*
433	Funcion : toggle_qa
434	qa 보기
435	
436	Parameters:
437		idx	- qa 인덱스
438		
439	See Also:			
440*/
441function toggle_qa(idx)
442{	
443	var obj = "#qa_list tr.qa_detail:eq(" + idx + ")";
444	if ( $(obj).css("display") == "none" )
445	{
446		$(obj).show();
447	}
448	else
449	{
450		$(obj).hide();
451	}
452}
453
454/*
455	Funcion : productPopup
456	상품평, 트랙백, 상품문의 팝업 생성 함수
457	
458	Parameters:
459		goods_no 	- 상품번호
460		goods_sub	- 상품하위번호
461				
462	See Also:
463	<openWindow>			
464*/
465function productPopup(goods_no, goods_sub, type, witdh, height, no)
466{
467	if (type == "estimate") {
468		
469		openWindow("/app/product/estimate_form/estimate/" + goods_no + "/" + goods_sub + "/" + no, 'estimate', 'resizable=yes,scrollbars=yes', witdh, height, true);
470	} else if (type == "qa") {
471		
472		openWindow("/app/product/qna_form/goods/" + goods_no + "/" + goods_sub + "/" + no, 'qa', 'resizable=yes,scrollbars=yes', witdh, height, true);		
473	} else if (type == "trackback") {
474		
475		openWindow("/app/product/trackback_form/" + goods_no + "/" + goods_sub, 'trackback', 'resizable=yes,scrollbars=yes', witdh, height, true);
476	}	
477}
478/*
479	Funcion : view_estimate
480	포토 상품평 보기
481	
482	Parameters:
483		no	- 상품평 번호
484				
485	See Also:
486	<openWindow>
487*/
488function view_estimate(no) {
489	
490	openWindow("/app/product/estimate_view/" + no, 'estimate_view', 'resizable=yes,scrollbars=yes', 900, 800, true);	
491}
492
493/*
494	Funcion : view_full_text
495	포토 상품평 상세 보기
496	
497	Parameters:
498		no	- 상품평 번호
499				
500	See Also:			
501*/
502function view_full_text(no) {
503	
504	if($("#estimate_full_text_" + no).html() != ""){
505
506		$("#estimate_excerpt_" + no ).hide();
507		$("#estimate_full_text_" + no).show();
508		
509	} else {
510		
511		$.ajax({
512			type : "POST",
513			url : "/app/product/estimate_full_text/"+no,
514			success: function(msg)
515			{
516				var close = "<div style=\"float:right;text-align:center;\" >";
517				close += "<span style=\"cursor:hand;color:#ccc;font-size:11px;\" onclick=\"view_close('"+ no +"');\">| close |</span><br/>";
518				close += "<span style=\"cursor:hand;color:#ccc;font-size:11px;\" onclick=\"view_estimate('"+ no +"');\">| 포토 상품평 보기 |</span>"; 
519				close += "</div>";
520										
521				$("#estimate_excerpt_" + no ).hide();
522				$("#estimate_full_text_" + no).show();
523				$("#estimate_full_text_" + no).html(msg + close);
524			}
525		});	
526
527	}
528}
529
530/*
531	Funcion : view_close
532	포토 상품평 상세 보기 닫기
533	
534	Parameters:
535		no	- 상품평 번호
536				
537	See Also:				
538*/
539function view_close(no) {
540
541	$("#estimate_excerpt_" + no ).show();
542	$("#estimate_full_text_" + no).hide();
543}
544
545/*
546	Funcion : viewQAByPage
547	상품문의 페이지 함수
548	
549	Parameters:
550		goods_no	- 상품 번호
551		goods_sub	- 상품 하위번호
552		page		- 상품평 페이지
553				
554	See Also:				
555*/
556function viewQAByPage(goods_no, goods_sub, page, similar_no)
557{
558	fnMove('qa');
559	$.ajax({
560		type: "GET",
561		url: '/app/product/qa_list/' + goods_no + '/' + goods_sub + '/' + page + '/' + similar_no,
562		data: {similar_no :  similar_no},
563		success: function(msg){
564			$("#qa_list").html(msg);				
565		}
566	});
567}
568
569/*
570	Funcion : viewEstimateByPage
571	상품평 페이지 함수
572	
573	Parameters:
574		goods_no	- 상품 번호
575		goods_sub	- 상품 하위번호
576		page		- 상품평 페이지
577				
578	See Also:				
579*/
580function viewEstimateByPage(goods_no, goods_sub, page, type, similar_no ) {
581
582	fnMove('estimate');
583
584    var order_type 	= $('#estimate_list').find("[name='order_type']").val();
585    var photo_chk 	= $("#estimate_photo").is(':checked');
586    var txt_chk 	= $("#estimate_txt").is(':checked');
587    var photo_use 	= '';
588
589    if(photo_chk === false && txt_chk === false) {
590        photo_use = 'A';
591    } else if(photo_chk === true && photo_chk !== txt_chk) {
592        photo_use = 'Y';
593    } else if(txt_chk === true && photo_chk !== txt_chk) {
594        photo_use = 'N';
595    }
596	if( type == "photo"){		// 포토상품형
597		$.ajax({
598			type: "GET",
599			url: '/app/product/photo_estimate_list/' + goods_no + '/' + goods_sub + '/' + page + '/' + similar_no,
600            data: {similar_no :  similar_no, order_type : order_type, photo_use : photo_use},
601			success: function(msg){
602				$("#photo_estimate_list").html(msg);
603			}
604		});
605	} else {						// 일반 상품평
606		$.ajax({
607			type: "GET",
608			url: '/app/product/estimate_list/' + goods_no + '/' + goods_sub + '/' + page + '/' + similar_no,
609            data: {similar_no :  similar_no, order_type : order_type, photo_use : photo_use},
610			success: function(msg){
611				$("#estimate_list").html(msg);
612			}
613		});
614	}
615}
616
617/*
618	Funcion : copy_url
619	트랙백 주소복사
620	
621	Parameters:
622				
623	See Also:				
624*/
625function copy_url() {
626	window.clipboardData.setData('Text',document.getElementById("trackback_url").innerHTML);
627	alert("복사하였습니다.");	
628} 
629
630/*
631	Funcion : go_blog
632	트랙백 걸린 블로그로 이동
633	
634	Parameters:
635		url	- 트랙백 걸린 블로그 url
636				
637	See Also:
638	<openWindow>
639*/
640function go_blog(url) {
641	
642	openWindow(url, 'blog', 'resizable=yes,scrollbars=yes', 1024, 768, true);	
643}
644
645/*
646	Funcion : restockSms
647	재입고시 문자받기
648	
649	Parameters:
650		
651				
652	See Also:
653	<openWindow>
654*/
655function restock(goods_no, goods_sub) {
656	
657	openWindow("/app/product/restock/" + goods_no + "/" + goods_sub, 'restock', 'resizable=no,scrollbars=no', 
657600, 460, "true");	
658}
659
660/*
661	Funcion : del_estimate
662	상품평 삭제
663	
664	Parameters:
665		est_no	- 상품평 번호
666				
667	See Also:
668	<openWindow>
669*/
670function del_estimate(est_no, goods_no, goods_sub, type, similar_no) {
671	
672	if(!confirm("정말 삭제 하시겠습니까?")){
673		return false;
674	}
675	
676	$.ajax({
677		type: "POST",
678		url: '/app/product/goods_estimate/del?est_no=' + est_no + '&goods_no=' + goods_no + '&goods_sub=' + goods_sub,
679		success: function(msg){
680			alert("정상적으로 삭제 되었습니다.");
681			viewEstimateByPage(goods_no, goods_sub, 1, type, similar_no);
682		}
683	});
684}
685
686/*
687	Funcion : add_est_comment
688	상품평 덧글 작성
689	
690	Parameters:
691		est_no	- 상품평 번호
692				
693	See Also:
694	<openWindow>
695*/
696function add_est_comment(est_no, obj, type) {
697	
698	if(type=="photo"){
699		var ff = document.photo_est_form;
700	} else {
701		var ff = document.est_form;
702	}
703	
704	if(obj.value == ""){
705		alert("덧글을 입력해 주십시오");
706		obj.focus();
707		return false;
708	}
709		
710	$.ajax({
711		type: "POST",
712		url: '/app/product/goods_estimate_comment/' + est_no + '?comment=' + obj.value,
713		success: function(msg){
714			
715			alert("덧글이 정상적으로 등록되었습니다.");
716			viewEstimateByPage(ff.goods_no.value, ff.goods_sub.value, 1, type);
717		}
718	});
719}
720
721/*
722	Funcion : del_est_comment
723	상품평 덧글 삭제
724	
725	Parameters:
726		est_no	- 상품평 번호
727				
728	See Also:
729	<openWindow>
730*/
731function del_est_comment(est_no, cmt_no, type) {
732
733	if(type=="photo"){
734		var ff = document.photo_est_form;
735	} else {
736		var ff = document.est_form;
737	}
738	
739	if(!confirm("정말 삭제 하시겠습니까?")){
740		return false;
741	}
742		
743	$.ajax({
744		type: "POST",
745		url: '/app/product/goods_estimate_comment/' + est_no + "/" + cmt_no,
746		success: function(msg){
747			
748			alert("덧글이 정상적으로 삭제되었습니다.");
749			viewEstimateByPage(ff.goods_no.value, ff.goods_sub.value, 1, type);
750		}
751	});
752}
753
754/*
755	Funcion : del_qna
756	상품문의 삭제
757	
758	Parameters:
759		qa_no	- 상품문의 번호
760				
761	See Also:
762	<openWindow>
763*/
764function del_qa(qa_no, goods_no, goods_sub, similar_no) {
765	
766	if(!confirm("정말 삭제 하시겠습니까?")){
767		return false;
768	}
769	
770	$.ajax({
771		type: "POST",
772		url: '/app/product/goods_qa/del?qa_no=' + qa_no + '&goods_no=' + goods_no + '&goods_sub=' + goods_sub,
773		success: function(msg){
774			
775			alert("정상적으로 삭제 되었습니다.");
776			viewQAByPage(goods_no, goods_sub, 1, similar_no);
777		}
778	});
779}
780
781/*
782	Funcion : add_qa_comment
783	상품문의 덧글 작성
784	
785	Parameters:
786		qa_no	- 상품문의 번호
787				
788	See Also:
789	<openWindow>
790*/
791function add_qa_comment(qa_no, obj) {
792	
793	var ff = document.qa_form;
794	
795	if(obj.value == ""){
796		alert("덧글을 입력해 주십시오");
797		obj.focus();
798		return false;
799	}
800		
801	$.ajax({
802		type: "POST",
803		url: '/app/product/goods_qa_comment/' + qa_no + '?comment=' + obj.value,
804		success: function(msg){
805			
806			alert("덧글이 정상적으로 등록되었습니다.");
807			viewQAByPage(ff.goods_no.value, ff.goods_sub.value, 1);
808		}
809	});
810}
811
812/*
813	Funcion : del_qa_comment
814	상품문의 덧글 삭제
815	
816	Parameters:
817		qa_no	- 상품문의 번호
818				
819	See Also:
820	<openWindow>
821*/
822function del_qa_comment(qa_no, cmt_no) {
823	
824	var ff = document.qa_form;
825	
826	if(!confirm("정말 삭제 하시겠습니까?")){
827		return false;
828	}
829	
830	$.ajax({
831		type: "POST",
832		url: '/app/product/goods_qa_comment/' + qa_no + "/" + cmt_no,
833		success: function(msg){
834			
835			alert("덧글이 정상적으로 삭제되었습니다.");
836			viewQAByPage(ff.goods_no.value, ff.goods_sub.value, 1);
837		}
838	});
839}
840
841/*
842	Funcion : shareKakao
843	카카오톡 공유하기
844
845	Parameters:
846		goods_no	- 상품번호
847		goods_nm	- 상품명
848		brand_nm	- 브랜드명
849		reg_dm		- 등록일
850		img_ext		- 이미지 확장자
851
852*/
853function shareKakao(goods_no, goods_nm, brand_nm, reg_dm, img_ext) {
854	const HOST = window.location.host;
855
856	Kakao.init('b1bfaa87a0ca8f8e08e7e9d8f5a0275f');
857
858	Kakao.Share.sendDefault({
859		objectType: 'feed',
860		content: {
861			title: brand_nm,
862			description: goods_nm,
863			imageUrl:
864					'http://img.netpx.co.kr/images/goods_img/' + reg_dm + '/' + goods_no + '/' + goods_no + '_a_280.' + img_ext,
865			link: {
866				// [내 애플리케이션] > [플랫폼] 에서 등록한 사이트 도메인과 일치해야 함
867				mobileWebUrl: 'http://' + HOST,
868				webUrl: 'http://' + HOST,
869			},
870		},
871		buttons: [
872			{
873				title: 'netpx.co.kr에서 보기',
874				link: {
875					mobileWebUrl: window.location.href,
876					webUrl: window.location.href,
877					// androidExecutionParams: 'kakaotalk://',
878					// iosExecutionParams: 'kakaotalk://',
879				},
880			},
881		],
882	});
883}
884
885/*
886	Funcion : shareFacebook
887	페이스북 공유하기
888
889	Parameters:
890		goods_no	- 상품번호
891		goods_sub	- 상품하위번호
892*/
893function shareFacebook (goods_no, goods_sub) {
894	var shareUrl = "https://www.netpx.co.kr/app/product/detail/" + goods_no + "/" + goods_sub;
895	var facebookShareUrl = "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(shareUrl) + "&amp;
895src=sdkpreparse";
896	window.open(facebookShareUrl, "_blank");
897}
898

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.