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) + "&
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.