1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
|
<?php include_once("./_common.php"); include_once($j3_shop_path."/shop_header.php");
if(strpos($_SERVER['HTTP_REFERER'],"/cart.php")==0){ alert('정보가 변경되었습니다. 다시 주문하기 바랍니다.',$j3_shop_url.'/cart.php'); exit; }
$custinfo = customer_info_get($id_ccode);
$cur_pt = $custinfo['cur_point']; $max_use_pt = $cur_pt; if($configshop['po_maxpoint']<$cur_pt){ $max_use_pt = $configshop['po_maxpoint']; }
$list_num = 9999; if($_COOKIE['page_line']!=''){ $list_num = $_COOKIE['page_line']; } if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$od_id = get_od_id(); //세션에 저장된 주문번호 가져오고 기존 장바구니가 있으면 주문번호 변경한다.
$where2 = " and a.od_id = '{$od_id}' and ct_state = '1' "; // 장바구니 상태가 주문인경우만 받아온다.
$list_array = prod_cart_list_get($id_ccode, $where2, $page, $list_num);
if($list_array[0]['pcode']==''){ alert('주문된 장바구니 상품이 존재하지 않습니다',$j3_shop_url.'/cart.php'); exit; }
$total_page = $list_array[0]['total_page']; $list_num = $list_array[0]['list_num']; $total_count = $list_array[0]['total_count'];
$qstr = $_SERVER['QUERY_STRING'];
$sql = "select idx, deli_name from shop_deli_list where ccode = '{$id_ccode}' and first_deli = '1' "; $first_deli_info = sql_fetch($sql,$connect_j3);
?> <div id="container"> <div id="wrapper">
<!-- 상단 카테고리 내 위치 --> <style> #sct_location {display:block;height:32px;z-index:9999;} #sct_location > a:first-child {line-height:30px;} #sct_location > a {float:left;height:30px;line-height:30px;} #sct_location > span {float:left;width:8px;height:16px;margin:7px 16px 0;}
.cate_select {position:relative;float:left;width:198px;height:30px;} .icon_inequal {display:block;float:right;width:16px;height:16px;text-indent:-9999px;background:url('http://shop.mjsoft.co/j3/hjwcs3/img/lhead01/location.png') -4px -50px no-repeat;overflow:hidden;zoom:1} .icon_down {position:absolute;top:50%;right:15px;display:block;width:16px;height:10px;margin-top:-5px;overflow:hidden;zoom:1;vertical-align:top;background:url('http://shop.mjsoft.co/j3/hjwcs3/img/lhead01/location.png') 0 -94px no-repeat;} .cate_select .select {display:block;padding-right:30px;text-indent:15px;height:30px;line-height:28px;background:#fff;border:1px solid #ccc;overflow:hidden;} .cate_select .depth {display:none;position:absolute;top:30px;left:0;width:198px;background-color:#fff;border:1px solid #ccc;border-top:0 none;} .cate_select .depth > li a {display:block;text-indent:15px;width:100%;height:29px;line-height:29px;border-bottom:1px solid #ccc;overflow:hidden;} .cate_select .depth > li a:hover {background:#fafafa;}
#sct_search {position:absolute;right:0px;top:0px;} #sct_search input[type=text] {padding-left:7px;width:188px;height:30px;border:1px solid #ccc;} #sct_search input[type=image] {display:block;float:right;padding:4px 5px;text-indent:-9999px;border:1px solid #ccc;border-left:0px none;overflow:hidden;zoom:1;}/ </style>
<div id="sct_location" class="mt20 mb20"> <a href="<?php echo $j3_shop_url;?>">홈</a> <span class="icon_inequal"> > </span> <div class="cate_select"> <a class="select">주문서작성</a> </div> </div><!-- #sct_location --> <!-- //상단 카테고리 내 위치 -->
<!-- 주문서작성 시작 { --> <div class="pt50"> <h2 class="relative mb30 txt32 l_height30 align_c bold">주문서작성</h2> <!-- 최근 주문내역 시작 { --> <section> <!-- 주문 내역 목록 시작 { --> <form name='cart_list_form' id='cart_list_form' method='post' onsubmit='return false;'> <input type='hidden' name='sel_del' id='sel_del' value=''> <table class="width_full top_bold_line"> <colgroup> <!--<col class="">--> <col class="width100"> <col class="width500 ellipsis"> <col class="width100"> <col class="width100">
<!--<col class="width80">--> <col class="width80"> <col class="width10"> <!--<col class="width100">--> </colgroup> <thead> <tr> <!--<th scope="col" class="p15_0 txt14 gray_line_b"><label class="screen_out">전체</label><input type="checkbox" class='check_all_class'></th>--> <th scope="col" class="p15_0 txt14 gray_line_b">상품이미지</th> <th scope="col" class="p15_0 txt14 gray_line_b">상품정보</th> <th scope="col" class="p15_0 txt14 gray_line_b">총수량</th> <th scope="col" class="p15_0 txt14 gray_line_b">판매가</th> <!--<th scope="col" class="p15_0 txt14 gray_line_b">할인액</th>--> <th scope="col" class="p15_0 txt14 gray_line_b">포인트</th> <th scope="col" class="p15_0 txt14 gray_line_b">배송비</th> <!--<th scope="col" class="p15_0 txt14 gray_line_b">관리</th>--> </tr> </thead> <tbody> <?php $cnt = 0; $idx_list = ""; if($configshop['deli_type']=='f'){ $deli_price = "무료배송"; } $all_price = 0; $all_point = 0; $not_free_deli_price = 0; for($i=0;$i<count($list_array);$i++){ $info = $list_array[$i]; if($info['idx']!=''){ $idx_list .= $info['idx'].",";
$opt_name = ""; $addopt_name = ""; if($info['opt_mode']!=''){ // 옵션상품일경우 옵션정보를 받아온다. $ii = $i+1; $t_qty = $info['ct_qty']; $t_price = $info['ct_qty']*$info['opt_price']; $t_point = $info['ct_qty']*$info['ct_point']; if($info['opt_price']>0){ $buho = "+"; } else { $buho = ""; } if($info['opt_mode']=='opt'){ $opt_name = $info['opt_name']."({$buho}".number_format($info['opt_price']).")<br>"; } else { $addopt_name = $info['opt_name']."({$buho}".number_format($info['opt_price']).")<br>"; } while($list_array[$ii]['pcode']==$info['pcode']){ $nextinfo = $list_array[$ii]; $t_qty += $nextinfo['ct_qty']; if($nextinfo['opt_price']>0){ $buho = "+"; } else { $buho = ""; } if($nextinfo['opt_mode']=='opt'){ $opt_name .= $addtitle." ".$nextinfo['opt_name']."({$buho}".number_format($nextinfo['opt_price']).")<br>"; } else { $addopt_name .= "(추가) ".$nextinfo['opt_name']."({$buho}".number_format($nextinfo['opt_price']).")<br>"; } $t_price += $nextinfo['ct_qty']*$nextinfo['opt_price']; $t_point += $nextinfo['ct_qty']*$nextinfo['ct_point'];
if($ii==100){ break; } $ii++; } $i=$ii; } else { $t_qty = $info['ct_qty']; $t_price = $info['ct_qty']*$info['ct_price']; $t_point = $info['ct_qty']*$info['ct_point']; } $it_href = $j3_shop_url."/item.php?code=".$info['code1']; $all_price += $t_price; $all_point += $t_point;
if($deli_price=="무료배송"){ $p_deli_price = $deli_price; } else { if($info['ct_deli_type']=='1'){ $p_deli_price = "무료배송"; } else { $p_deli_price = "금액에따른 차등"; $not_free_deli_price += $t_price; } }
$info['jego'] = product_jego_get($info['pcode']); // 재고 받아옴 ?> <tr> <!--<td class="p15_0 align_c gray_line_b2"><label class="screen_out">선택</label> <input type='checkbox' name='code_idx[]' value='<?php echo $cnt;?>' class='code_idx_calss'> </td>--> <td class="p15_0 txt14 align_c gray_line_b2"> <input type='hidden' name='codes[]' value='<?php echo $info['idx'];?>'> <input type='hidden' name='od_ids[]' value='<?php echo $od_id;?>'> <input type='hidden' name='pcode[]' value='<?php echo $info['pcode'];?>'> <input type='hidden' name='jego[]' value='<?php echo $info['jego'];?>'> <input type='hidden' name='p_min_buy[]' value='<?php echo $info['p_min_buy'];?>'> <input type='hidden' name='p_max_buy[]' value='<?php echo $info['p_max_buy'];?>'> <a><img src="<?php echo $thumb_file = get_it_thumbnail($info['pcode'],$info['pic1'],80,80);?>" class="box80" alt=""></a> </td> <td class="p15_10 txt14 gray2 gray_line_b2"> <p class="mb10 txt15 bold"><?php echo $info['ct_name'];?></p> <p class="mb5 gray bold l_height20"> <?php echo $opt_name;?> </p> <?php if($info['opt_mode']!=''){?> <!--<a class="mb10 box150_25 white txt14 align_c bold l_height25 bg_custom1 opt_ch_class">주문조건 추가/변경</a>--> <?php }?> <?php if($addopt_name!=''){?> <p class="gray2 bold"><?php echo $addopt_name;?></p> <?php }?> </td> <td class=" p15_0 txt14 gray2 gray_line_b2 align_c"><?php echo $t_qty;?></td> <td class="p15_0 txt14 gray2 align_c gray_line_b2"><?php echo number_format($t_price);?>원</td> <!--<td class="p15_0 txt14 gray2 align_c gray_line_b2 bg_gray">1500원</td>--> <td class="p15_0 txt14 gray2 align_c gray_line_b2 bg_gray"><?php echo number_format($t_point);?>원</td> <td class="p15_0 txt14 align_c gray_line_b2 bg_gray"> <?php echo $p_deli_price; ?> <!--<div class="relative mb5 box100_30 gray_line" style="background: url('http://shop.mjsoft.co/j3/hjwcs3/img/iform01/location.png')#fff no-repeat -12px -127px;"> <label for="opt" class="absolute ab_top_left width80 ellipsis l_height27 pointer">결제방식</label> <select title="옵션선택" id="opt" class="box100_30 l_height30 p0_10 opacity0 pointer"> <option>선결제</option> <option>착불</option> </select> </div> <p class="gray2">3,000원</p>--> </td> <!--<td class="p15_0 txt14 gray2 align_c bold gray_line_b2 bg_gray"> <a class="mt5 box80_25 white align_c bold l_height25 bg_custom2 cart_del_class">삭제</a> </td>--> </tr> <?php $cnt++; } } if($cnt==0){ // 장바구니가 없을때 ?> <tr> <td colspan="8" class="p100_0 txt14 gray2 align_c gray_line_b2">장바구니에 담긴 상품이 없습니다.</td> </tr> <?php }
//echo $not_free_deli_price."=".$configshop['deli_amount']; if($not_free_deli_price==0){ // 무료배송이 아닌 상품 금액이 0일경우 $deli_price_title = "0"; } else if($configshop['deli_type']=='p'){ if($not_free_deli_price*1>$configshop['deli_amount']*1){ // 무료배송아닌 상품들이 배송비상한가보다 많을경우 무료배송 아닌경우 배송비 추가 $deli_price_title = "0"; $deli_price_title2 = "0"; } else { $deli_price_title = "(+)".number_format($configshop['deli_price']); $deli_price_title2 = number_format($configshop['deli_price']); } }
$total_price = $all_price+number($deli_price_title);
if($configshop['po_use']=='1' && $custinfo['pt_index']=='1'){ // 포인트 사용이며 거래처의 포인트 적립이 거래처별일경우 $pt_cash = round($all_price*$custinfo['pt_cash']/100); $pt_card = round($all_price*$custinfo['pt_card']/100); } ?> </tbody> <tfoot> <tr> <td colspan="4" class="p15_0 txt13 gray2 v_align_t gray_line_b2"> <?php if($configshop['po_use']=='1' && $custinfo['pt_index']==2){ // 포인트 사용시이면서 상품별 포인트인경우?> <span class="p3_15 white txt11 bg_gray3 circle">적립혜택</span> 구매확정 시 <span class="custom2 cost3"><?php echo number_format($all_point);?></span> 포인트 적립 <?php } else if($configshop['po_use']=='1' && $custinfo['pt_index']==1){ // 포인트 사용시이면서 거래처별 포인트인경우?> <span class="p3_15 white txt11 bg_gray3 circle">적립혜택</span> 무통장입금(현금)구매시 <span class="custom2 cost3"><?php echo number_format($pt_cash);?></span> 적립, 카드구매시 <span class="custom2 cost3"><?php echo number_format($pt_card);?></span> 적립(계좌이체, 가상계좌, 핸드폰결제 포함) <?php }?> </td> <td colspan="4" class="p15_10 l_height20 gray_line_b2 bg_custom2"> <p><label class="white txt13">총 상품금액</label><span class="float_r white cost3"><?php echo number_format($all_price);?></span></p> <p><label class="white txt13">배송비</label><span class="float_r white cost3"><?php echo $deli_price_title;?></span></p> <!--<p><label class="white txt13">총 할인금액</label><span class="float_r white cost3">(-)1,500</span></p>--> <p class="mt15"><label class="white txt16 bold">결제금액</label><span class="float_r white cost1"><?php echo number_format($total_price);?></span></p> </td> </tr> </tfoot> </table> </form> <!-- } 주문 내역 목록 끝 --> </section> <!-- } 최근 주문내역 끝 -->
<!-- 배송정보 시작 { --> <form name='order_form' id='order_form' method='post' onsubmit='return false;'> <input type='hidden2' name='od_id' value='<?php echo $od_id?>'> <input type='hidden2' name='idx_list' value='<?php echo substr($idx_list,0,strlen($idx_list)-1);?>'> <input type='hidden2' name='cur_pt' value='<?php echo $cur_pt;?>'> <input type='hidden2' name='max_use_pt' value='<?php echo $max_use_pt;?>'> <input type='hidden2' name='min_use_pt' value='<?php echo $configshop['po_minpoint'];?>'> <input type='hidden2' name='all_price' value='<?php echo $all_price;?>'> <input type='hidden2' name='deli_price' value='<?php echo number($deli_price_title2);?>'> <section class="mt50 width_full top_bold_line gray_line_b2"> <!-- 받으시는 분 입력 시작 { --> <div class="float_l width800 p20_50 gray_r_line2"> <table class="width_full"> <caption class="mb20 txt16 bold align_l">배송지정보</caption> <colgroup> <col class="width100"><col class=""> </colgroup> <tbody> <tr> <th scope="row" class="p5_0 gray2 align_l">배송지선택</th> <td class="p3_0"> <input type="radio" name='addr_list' id="addr_same" class="v_align_m addr_fill_sender"> <label for="addr_same" class="mr5 gray2 v_align_m pointer">주문자와 동일</label>
<?php if($first_deli_info['deli_name']!=''){ // 기본배송지가 있으면 보여줌?> <input type="radio" name='addr_list' id="addr_near" class="v_align_m add_fill_first" value='<?php echo $first_deli_info['idx'];?>'> <label for="addr_near" class="mr5 gray2 v_align_m pointer" >기본배송지(<?php echo $first_deli_info['deli_name'];?>)</label> <?php }?>
<input type="radio" name='addr_list' id="addr_new" class="v_align_m"> <label for="addr_new" class="mr5 gray2 v_align_m pointer addr_fill_new">신규배송지</label>
<a class="box100_25 gray2 bold align_c l_height20 gray_line pointer add_list_show">배송지목록</a> </td> </tr> <tr> <th scope="row" class="p3_0 gray2 align_l">배송지명</th> <td class="p3_0"> <input type="text" name='deli_name' class="box150_25 gray_line"> <input type="checkbox" name='add_deli_name' id="ad_default" value="1" class="v_align_m"> <label for="ad_default" class="mr5 gray2 v_align_m pointer">배송지목록 추가</label> </td> </tr> <tr> <th scope="row" class="p3_0 gray2 align_l">이름<strong class="screen_out">필수</strong></th> <td class="p3_0"><input type="text" name='consignee_name' class="box150_25 gray_line"></td> </tr> <tr> <th scope="row" class="p3_0 gray2 align_l">전화번호<strong class="screen_out">필수</strong></th> <td class="p3_0"><input type="text" name='consignee_telno' class="box150_25 gray_line telno_class"></td> </tr> <tr> <th scope="row" class="p3_0 gray2 align_l">핸드폰</th> <td class="p3_0"><input type="text" name='consignee_hpno' class="box150_25 gray_line telno_class"></td> </tr> <tr> <th scope="row" class="p3_0 gray2 align_l">주소</th> <td class="p3_0"> <strong class="screen_out">필수</strong> <input type="text" name='consignee_zipcode' id='consignee_zipcode' class="box100_25 gray_line" placeholder="우편번호"> <button type="button" class="box100_25 gray2 bold gray_line bg_white pointer r_zipcode_class">주소검색</button> <input type="text" name='consignee_addr_m' id='consignee_addr_m' class="mt5 box_auto_25 gray_line" placeholder="기본주소"> <input type="text" name='consignee_addr_d' id='consignee_addr_d' class="mt5 box_auto_25 gray_line" placeholder="상세주소"> </td> </tr> <tr> <th scope="row" class="p3_0 gray2 align_l">배송메모</th> <td class="p3_0"><textarea name='transport_msg' class="width_full gray_line"></textarea></td> </tr> </tbody> </table>
<p class="mt20 custom2"> <span class="box14 circle white align_c bold bg_custom2">!</span> 2016년 8월 1일부터는 5자리 우편번호 사용이 의무화됩니다. 이용에 불편함이 없도록 하시길 바랍니다. </p> <p class="mt5 custom2"> <span class="box14 circle white align_c bold bg_custom2">!</span> 도서산간 지역의 경우 배송비가 추가 과금될 수 있습니다. </p> </div> <!-- } 받으시는 분 입력 끝 -->
<!-- 주문하시는 분 입력 시작 { --> <div class="float_l width400 p20_50"> <table class="width_full"> <caption class="mb20 txt16 bold align_l">주문자정보</caption> <colgroup> <col class="width100"><col class=""> </colgroup> <tbody> <tr> <th scope="row" class="p5_0 gray2 align_l">이름<strong class="screen_out">필수</strong></th> <td class="p3_0"><input type="text" name='s_name' class="box150_25 gray_line" value="<?php echo $custinfo['comp_name'];?>"></td> </tr> <tr> <th scope="row" class="p5_0 gray2 align_l">전화번호<strong class="screen_out">필수</strong></th> <td class="p3_0"><input type="text" name='s_telno' class="box150_25 gray_line telno_class" value="<?php echo $custinfo['telno'];?>"></td> </tr> <tr> <th scope="row" class="p5_0 gray2 align_l">핸드폰</th> <td class="p3_0"><input type="text" name='s_hpno' class="box150_25 gray_line telno_class" value="<?php echo $custinfo['hpno'];?>"></td> </tr> <tr> <th scope="row" class="p5_0 gray2 align_l">주소</th> <td class="p3_0"> <strong class="screen_out">필수</strong> <input type="text" name='s_zipcode' id='s_zipcode' class="box100_25 gray_line" placeholder="우편번호" value="<?php echo $custinfo['zipcode'];?>"> <button type="button" class="box80_25 gray2 bold gray_line bg_white pointer s_zipcode_class">주소검색</button> <input type="text" name='s_addr_m' id='s_addr_m' class="mt5 box_auto_25 gray_line" placeholder="기본주소" value="<?php echo $custinfo['addr_m'];?>"> <input type="text" name='s_addr_d' id='s_addr_d' class="mt5 box_auto_25 gray_line" placeholder="상세주소" value="<?php echo $custinfo['addr_d'];?>"> </td> </tr> <tr> <th scope="row" class="p5_0 gray2 align_l">E-mail<strong class="screen_out">필수</strong></th> <td class="p3_0"><input type="text" name='s_email' class="mt5 box_auto_25 gray_line" value="<?php echo $custinfo['email'];?>"></td> </tr> </tbody> </table> </div> <!-- } 주문하시는 분 입력 끝 --> </section> <!-- } 배송정보 끝 -->
<!-- 구매할인 시작 { --> <section class="width_full bg_gray gray_line_b2"> <!-- 할인 및 적립 시작 { --> <div class="float_l width800 height200 p20_50 gray_r_line2"> <table class="width_full"> <caption class="mb20 txt16 bold align_l">할인 및 포인트</caption> <colgroup> <col class="width100"><col class="width200"><col class=""> </colgroup> <tbody> <!--<tr> <th scope="row" class="p7_0 gray2 align_l">상품/거래처할인</th> <td class="p7_0 align_r gray_line_b"> <span class="cost3">1,500</span>원 </td> <td></td> </tr>--> <?php if($configshop['po_use']=='1' && $custinfo['pt_index']>0){?> <tr> <th scope="row" class="p7_0 gray2 align_l">포인트 사용</th> <td class="p7_0 align_r gray_line_b"> <span class="cost3"><input type='text' name='use_pt' value='0' class='line0 bold align_r point_use_class' style='padding-right:10px;'></span>점 </td> <td class="pl10 gray">(사용가능 포인트 : <span class="cost3"><?php echo number_format($cur_pt);?></span>점) 최대 <span class="cost3 custom1"><?php echo number_format($max_use_pt);?></span>점까지 사용가능</td> </tr> <?php }?> </tbody> </table> </div> <!-- } 할인 및 적립 끝 -->
<!-- 결제금액 시작 { --> <div class="float_l width400 p20_50"> <table class="width_full"> <caption class="mb20 txt16 bold align_l">결제금액</caption> <colgroup> <col class="width100"><col class=""> </colgroup> <tbody> <tr> <td colspan="2" class="pb15 pb3 gray_line_b"><span class="cost1 pay_price_class">0</span>원</td> </tr> <tr> <th scope="row" class="pt10 pb3 gray2 align_l">총상품금액</th> <td class="pt10 gray align_r"><span class="gray2 cost3"><?php echo number_format($all_price);?></span>원</td> </tr> <tr> <th scope="row" class="p5_0 gray2 align_l">배송비</th> <td class="p3_0 gray align_r">(+) <span class="gray2 cost3"><?php echo $deli_price_title2;?></span>원</td> </tr> <!--<tr> <th scope="row" class="p5_0 gray2 align_l">할인금액</th> <td class="p3_0 gray align_r">(-) <span class="gray2 cost3">1,500</span>원</td> </tr>--> <?php if($configshop['po_use']=='1' && $custinfo['pt_index']>0){?> <tr> <th scope="row" class="p5_0 gray2 align_l">포인트 사용금액</th> <td class="p3_0 gray align_r">(-) <span class="gray2 cost3 pt_use_class">0</span>원</td> </tr> <?php }?> </tbody> </table> </div> <!-- } 결제금액 분 입력 끝 --> </section> <!-- } 구매할인 끝 -->
<!-- 결제정보 시작 { --> <section class="width_full gray_line_b2"> <!-- 할인 및 적립 시작 { --> <div class="float_l width_wide p20_50"> <table class="width_full"> <caption class="mb20 txt16 bold align_l">결제정보</caption> <colgroup> <col class="width100"><col class=""> </colgroup> <tbody> <tr> <td colspan="2" class="pb20"> <div class="p20_50 gray_line"> <?php if($configshop['bank_use']=='1'){?> <input type="radio" id="pay_bank" name='pay_type' value='무통장' class="v_align_m"> <label for="pay_bank" class="mr50 gray2 v_align_m pointer">무통장입금</label> <?php }?> <?php if($configshop['card_use']=='1'){?> <input type="radio" id="pay_card" name='pay_type' value='카드' class="v_align_m"> <label for="pay_card" class="mr50 gray2 v_align_m pointer">신용카드</label> <?php }?> <?php if($configshop['iche_use']=='1'){?> <input type="radio" id="pay_send" name='pay_type' value='계좌이체' class="v_align_m"> <label for="pay_send" class="mr50 gray2 v_align_m pointer">실시간계좌이체</label> <?php }?> <?php if($configshop['virtual_use']=='1'){?> <input type="radio" id="pay_cell" name='pay_type' value='가상계좌' class="v_align_m"> <label for="pay_cell" class="gray2 v_align_m pointer">가상계좌</label> <?php }?>
<!--<input type="radio" id="pay_cell" name='pay_type' value='휴대폰' class="v_align_m"> <label for="pay_cell" class="gray2 v_align_m pointer">휴대폰</label>--> </div> </td> </tr> <!-- 신용카드 시작 { --> <tr> <th scope="row" class="pb5 height30 gray2 align_l">카드구분</th> <td class="pb5 height30"> <input type="radio" id="card_person" class="v_align_m"> <label for="card_person" class="mr50 gray2 v_align_m pointer">개인카드</label>
<input type="radio" id="card_group" class="v_align_m"> <label for="card_group" class="mr50 gray2 v_align_m pointer">법인카드</label> </td> </tr> <tr> <th scope="row" class="height30 gray2 align_l">카드선택</th> <td class="height30"> <div class="relative mb5 box170_30 gray_line" style="background: url('http://shop.mjsoft.co/j3/hjwcs3/img/iform01/location.png')#fff no-repeat -12px -157px;"> <label for="" class="absolute ab_top_left width140 ellipsis l_height30 pointer">선택해주세요.</label> <select title="옵션선택" id="" class="box170_30 l_height30 p0_10 opacity0 pointer"> <option>국민</option> <option>비씨</option> <option>신한</option> </select> </div> </td> </tr> <tr> <th scope="row" class="height30 gray2 align_l">할부기간</th> <td class="height30"> <div class="relative mb5 box170_30 gray_line" style="background: url('http://shop.mjsoft.co/j3/hjwcs3/img/iform01/location.png')#fff no-repeat -12px -157px;"> <label for="" class="absolute ab_top_left width140 ellipsis l_height30 pointer">일시불</label> <select title="옵션선택" id="" class="box170_30 l_height30 p0_10 opacity0 pointer"> <option>일시불</option> <option>2개월</option> <option>3개월</option> </select> </div> </td> </tr> <!-- } 신용카드 끝 -->
<!-- 계좌이체 시작 { --> <tr> <th scope="row" class="height30 gray2 align_l">현금영수증</th> <td class="height30 gray2"> 개인소득공제용 (휴대폰번호 : 010-2961-5052)<a class="ml10 box150_25 gray2 bold align_c l_height20 gray_line pointer">현금영수증정보 변경</a> </td> </tr> <!-- 현금영수증정보 변경 시작 { --> <tr> <th scope="row" rowspan="3" class="height30 gray2 align_l">현금영수증</th> <td class="height30"> <input type="radio" id="coin_enlist" class="v_align_m"> <label for="coin_enlist" class="mr50 gray2 v_align_m pointer">신청하기</label>
<input type="radio" id="coin_none" class="v_align_m"> <label for="coin_none" class="mr50 gray2 v_align_m pointer">신청안함</label> </td> </tr> <tr> <td class="height30"> <input type="radio" id="coin_person" class="v_align_m"> <label for="coin_person" class="mr50 gray2 v_align_m pointer">개인소득공제용</label>
<input type="radio" id="coin_group" class="v_align_m"> <label for="coin_group" class="mr50 gray2 v_align_m pointer">사업자증빙용</label> </td> </tr> <tr> <td class="height30"> <div class="relative mb5 mr10 box170_30 gray_line" style="background: url('http://shop.mjsoft.co/j3/hjwcs3/img/iform01/location.png')#fff no-repeat -12px -157px;"> <label for="" class="absolute ab_top_left width140 ellipsis l_height30 pointer">휴대폰번호</label> <select title="옵션선택" id="" class="box170_30 l_height30 p0_10 opacity0 pointer"> <option>주민등록번호</option> <option>현금영수증번호</option> </select> </div> <input type="text" value="010" class="box80_25 gray_line"> - <input type="text" value="9632" class="box80_25 gray_line"> - <input type="text" value="1478" class="box80_25 gray_line"> </td> </tr> <!-- } 현금영수증정보 변경 끝 --> <!-- } 계좌이체 끝 -->
<!-- 무통장입금 시작 { --> <tr> <th scope="row" class="height30 gray2 align_l">입금은행</th> <td class="height30 gray2"> <div class="relative mb5 mr10 box170_30 gray_line" style="background: url('http://shop.mjsoft.co/j3/hjwcs3/img/iform01/location.png')#fff no-repeat -12px -157px;"> <label for="" class="absolute ab_top_left width140 ellipsis l_height30 pointer">선택해 주세요.</label> <select title="옵션선택" id="" class="box170_30 l_height30 p0_10 opacity0 pointer"> <option>국민은행</option> <option>우리은행</option> </select> </div> </td> </tr> <tr> <th scope="row" rowspan="2" class="height30 gray2 align_l">환불방법</th> <td class="height30 gray2"> <input type="radio" id="coin_person" class="v_align_m"> <label for="coin_person" class="mr50 gray2 v_align_m pointer">환불정산액 적립</label>
<input type="radio" id="coin_group" class="v_align_m"> <label for="coin_group" class="mr50 gray2 v_align_m pointer">본인계좌환불</label> </td> </tr> <tr> <td class="height30 gray2"> <input type="text" class="box150_25 gray_line"> <input type="text" class="box80_25 gray_line"> <input type="text"" class="box150_25 gray_line"> </td> </tr>
<tr> <th scope="row" rowspan="3" class="height30 gray2 align_l">현금영수증</th> <td class="height30"> <input type="radio" id="coin_enlist" class="v_align_m"> <label for="coin_enlist" class="mr50 gray2 v_align_m pointer">신청하기</label>
<input type="radio" id="coin_none" class="v_align_m"> <label for="coin_none" class="mr50 gray2 v_align_m pointer">신청안함</label> </td> </tr> <tr> <td class="height30"> <input type="radio" id="coin_person" class="v_align_m"> <label for="coin_person" class="mr50 gray2 v_align_m pointer">개인소득공제용</label>
<input type="radio" id="coin_group" class="v_align_m"> <label for="coin_group" class="mr50 gray2 v_align_m pointer">사업자증빙용</label> </td> </tr> <tr> <td class="height30"> <div class="relative mb5 mr10 box170_30 gray_line" style="background: url('http://shop.mjsoft.co/j3/hjwcs3/img/iform01/location.png')#fff no-repeat -12px -157px;"> <label for="" class="absolute ab_top_left width140 ellipsis l_height30 pointer">휴대폰번호</label> <select title="옵션선택" id="" class="box170_30 l_height30 p0_10 opacity0 pointer"> <option>주민등록번호</option> <option>현금영수증번호</option> </select> </div> <input type="text" value="010" class="box80_25 gray_line"> - <input type="text" value="9632" class="box80_25 gray_line"> - <input type="text" value="1478" class="box80_25 gray_line"> </td> </tr> <!-- } 무통장입금 끝 -->
<!-- 휴대폰 시작 { --> <tr> <th scope="row" class="height30 gray2 align_l">결제구분</th> <td class="height30 gray2"> <input type="radio" id="pay_quick" class="v_align_m"> <label for="pay_quick" class="mr50 gray2 v_align_m pointer">간편결제</label>
<input type="radio" id="pay_normal" class="v_align_m"> <label for="pay_normal" class="mr50 gray2 v_align_m pointer">일반결제</label> </td> </tr> <tr> <th scope="row" class="height30 gray2 align_l">휴대폰번호</th> <td class="height30 gray2"> <input type="text" value="010" class="box80_25 gray_line"> - <input type="text" value="9632" class="box80_25 gray_line"> - <input type="text" value="1478" class="box80_25 gray_line"> </td> </tr> <!-- } 무통장입금 끝 --> </tbody> </table> </div> <!-- } 할인 및 적립 끝 --> </section> <!-- } 결제정보 끝 --> </form>
<!--버튼--> <div class="mt50 align_c"> <input type="submit" onclick="location.href='orderresult.php'" class="box170_50 white bold line0 bg_custom2 pointer" value="결제하기" /> <input type="button" class="box170_50 custom2 bold align_c bg_white custom_line2 pointer" value="취소" /> </div> <!--//버튼-->
</div> <!-- } 주문서작성 끝 -->
</div><!-- #wrapper --> </div><!-- #container --> <script> $(function(){ form_data = $("#order_form").serialize(); //alert(form_data);
$(".r_zipcode_class").click(function(){ // 배송지정보 주소오픈 postSearch3("consignee_zipcode","","consignee_addr_m"); });
$(".s_zipcode_class").click(function(){ // 주문자정보 주소오픈 postSearch3("s_zipcode","","s_addr_m"); });
$(document).on("click",".deli_zipcode_class",function(){ // 배송지 추가에서 주소오픈 postSearch3("ds_zipcode","","ds_addr_m"); });
$(".addr_fill_sender").click(function(){ // 주문자와 동일 get_addr_list(0); });
$(".addr_fill_new").click(function(){ // 신규배송지 get_addr_list(-1); });
$(".add_fill_first").click(function(){ // 기본배송지 클릭시 $idx = $(this).attr("value"); get_addr_list($idx); });
$(".point_use_class").change(function(){ // 포인트 사용시 체크 처리 $cu_pt = $("input[name='cur_pt']").val(); $max_use_pt = parseInt($("input[name='max_use_pt']").val()); $min_use_pt = parseInt($("input[name='min_use_pt']").val()); $input_pt = Number($(this).val()); $(this).val($input_pt); if($input_pt>$max_use_pt){ alert('최대사용 포인트보다 많습니다.') $(this).val($max_use_pt); } if($input_pt<$min_use_pt){ alert('최소사용 포인트는 '+$min_use_pt+' 입니다.') $(this).val('0'); } $(".pt_use_class").html(formatCurrency($input_pt)); payment_price_cal(); });
$(".add_list_show").click(function(){ // 배송지 목록 보이기 $.get("deli_list.inc.php",function(rtn){ $("#modal_member_box").html(rtn).dialog({ resizable: true, height:700, width:1100, modal: true, title:"배송지목록", buttons: { 닫기: function() { $( this ).dialog( "close" ); } } }); }); }); payment_price_cal(); });
function get_addr_list($idx){ // 배송지 목록 띄우기 $.get("ajax.order_addr_get.php?idx="+$idx,function(rtn){ $("#modal_member_box").html(rtn); }); }
function postSearch3(zip1,zip2,addr1){ new daum.Postcode({ oncomplete: function(data) { // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분입니다. // 예제를 참고하여 다양한 활용법을 확인해 보세요. zoncode1 = data.zonecode.substring(0,3); zoncode2 = data.zonecode.substring(3,5);
if(1==1){ // 5자리 우편번호 사용 이전꺼 사용시엔 1==2로 세팅 $("#"+zip1).val(data.zonecode); } else { $("#"+zip1).val(data.postcode1+"-"+data.postcode2); }
// 각 주소의 노출 규칙에 따라 주소를 조합한다. // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다. var fullAddr = ''; // 최종 주소 변수 var extraAddr = ''; // 조합형 주소 변수
// 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다. if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우 fullAddr = data.roadAddress;
} else { // 사용자가 지번 주소를 선택했을 경우(J) fullAddr = data.jibunAddress; }
// 사용자가 선택한 주소가 도로명 타입일때 조합한다. if(data.userSelectedType === 'R'){ //법정동명이 있을 경우 추가한다. if(data.bname !== ''){ extraAddr += data.bname; } // 건물명이 있을 경우 추가한다. if(data.buildingName !== ''){ extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName); } // 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다. extraAddr = (extraAddr !== '' ? ' ('+ extraAddr +')' : ''); }
$("#"+addr1).val(fullAddr+" "+extraAddr+" "); post_close(); }, width : '100%', height : '100%' }).embed("daum_juso_rayer");
$("#daum_juso_rayer").show();
}
function post_close(){ $('#daum_juso_rayer').hide(); $("#addr_d").focus(); }
function payment_price_cal(){ // 총 결제금액 계산 함수 $all_price = Number($("input[name='all_price']").val()); $deli_price = Number($("input[name='deli_price']").val()); $use_pt = Number($("input[name='use_pt']").val()); if($("input[name='use_pt']").val()==undefined){ $use_pt = 0; } $pay_price = $all_price-$deli_price-$use_pt; $(".pay_price_class").html(formatCurrency($pay_price));
}
function noEvent(){ // F5 리로드 방지 if(event.keyCode == 116) { event.keyCode = 2; return false; }else if(event.ctrlKey && (event.keyCode==78 || event.keyCode == 82)) { return false; } } <?php if($id==''){ // 관리자 로그인되어 있으면 F5허용?> document.onkeydown = noEvent; <?php }?>
</script> <?php include_once($j3_shop_path."/shop_footer.php"); ?> <div id="modal_member_box" title="거래처수정" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;"></div> <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script> <div id="daum_juso_rayer" style="background:#fff;border: 5px solid currentColor; left: 50%; top: 50%; width: 500px; height: 460px; overflow: hidden; margin-top: -235px; margin-left: -155px; display:none ; position: fixed; z-index: 10000; -webkit-overflow-scrolling: touch;"><input type='button' onclick="$('#daum_juso_rayer').hide();" value='close' style='top:0px;width:40px;height:20px;right:0px;padding:0px;'> <iframe src="about:blank" frameborder="0" style="margin: 0px;margin-top:30px; padding: 0px; border: 0px currentColor; left: 0px; top: 0px; width: 100%; height: 90%; overflow: hidden; position: absolute; min-width: 300px;"></iframe> </div>
|