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
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
|
<?php $sub_menu = "300200"; include("./_common.php"); include("./auth_check.php"); // 관리자 권한 체크 include($j3_adm_path."/shop_header.php");
if($configshop['j3_ftp_upload']=='1'){ $page_mode = "product_reg"; echo "<div style='display:none;'>";include_once("./product_img_mapping_do.php"); echo "</div>";// 천년3 이미지매핑 처리 }
if($code!=''){
product_s_check($code); // product_s 테이블 정보 체크후 없으면 생성
$cinfo = product_info_get($code,"Y"); // 상품정보 가져오기 $p_type = explode("^",$cinfo['p_type']);
$add_prod_array = prod_addopt_get($code, $admin_page, ""); //추가옵션 상품을 가져온다. if($_SESSION['id_seller']=='Y'){ if($cinfo['seller_ccode']!=$_SESSION['id_ccode']){ alert("해당 상품을 수정할 권한이 없습니다."); } } }
// 분류명 가져오기 $cate_array = cate_lv2_list_get_adm();
if($cinfo['p_sort']==''){ $cinfo['p_sort'] = 0; } if($cinfo['p_min_buy']==''){ $cinfo['p_min_buy'] = 0; } if($cinfo['p_max_buy']==''){ $cinfo['p_max_buy'] = 0; }
if($cont_cate_code!=''){ $cinfo['prod_cate_code_s'] = $cont_cate_code; }
$maker_array = product_maker_get(); // 메이커 정보 가져온다.
//_pr($cinfo);
if($code=='' && $app_id=='mjflower'){ $cinfo['p_price_tel'] = "1"; $cinfo['p_jegomax'] = "1"; } ?> <style> .p_deli_type_show1, .p_deli_type_show2 { display:none; } #item_mobile_explain, #item_explain { width:100%;height:300px; } </style> <script src="<?php echo $j3_lib_url?>/ckeditor/ckeditor.js"></script> <div id="wrap" class='container_wrap'> <div id="sub-title"> <h2>상품 <?php if($code==''){?>신규<?php } else {?>수정<?php }?></h2> <div class="sub-location"> <a href="./index.php" class="home"><span class="screen_out">홈</span></a> <span class="location-gt"></span> <a>상품관리</a> <span class="location-gt"></span> <a>상품관리</a> </div> </div>
<form name='product_reg_form' method='post' action='ajax.product_reg_process.php' enctype="multipart/form-data"> <input type='hidden' name='qstr' value=''> <input type='hidden' name='code' value='<?php echo $cinfo['code'];?>'>
<div class='cust_modal1'> <h4>기본정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">기본정보</caption> <colgroup> <col style="width:100px;"><col style="width:230px;"> <col style="width:100px;"><col style="width:230px;"> <col style="width:100px;"><col style="width:230px;"> </colgroup>
<tbody> <tr> <th>코드</th> <td> <input type='text' name='code1' class='input_readonly width_80' value='<?php echo $cinfo['code1'];?>' maxlength=6> <?php if($code==''){ echo "<input type='checkbox' name='code_auto' value='1' checked> 코드자동"; } ?> </td> <th>쇼핑몰분류</th> <td> <select name='prod_cate_code_s' style='width:200px;'> <?php foreach($cate_array as $key=>$val){ if($val['code']==$cinfo['prod_cate_code_s']){ $selected = "selected"; } else { $selected = ""; } echo "<option value='{$val['code']}' $selected>{$val['name']}</option>"; } ?> </select> </td> <th>바코드</th> <td><input type='text' name='pce_bcode1' class='' value='<?php echo $cinfo['pce_bcode1'];?>' ></td> </tr> <tr> <th>상품명</th> <td colspan=3><input type='text' name='name' class='width_500' value='<?php echo $cinfo['name'];?>'></td> <th>규격</th> <td><input type='text' name='norm' class='' value='<?php echo $cinfo['norm'];?>'></td> </tr> <tr> </tr> <tr> <th>부가세</th> <td> <?php echo taxyn_select($cinfo['tax_yn']);?> </td> <th>무게</th> <td><input type='text' name='prod_wt' class='' value='<?php echo $cinfo['prod_wt'];?>' ></td> <th>단위</th> <td><input type='text' name='unit' class='' value='<?php echo $cinfo['unit'];?>' ></td> </tr> <tr> <th>제조사(메이커)</th> <td > <select name='maker'> <?php foreach($maker_array as $key=>$m){ if($cinfo['maker_code']==$m['code']){ $std = "selected"; } else { $std = ""; } echo " <option value='{$m['code']}^{$m['name']}' {$std}>{$m['name']}</option>"; } ?> </select> </td> <th>원산지</th> <td><input type='text' name='p_origin' class='' value='<?php echo $cinfo['p_origin'];?>' maxlength=50></td> <th>유통기한</th> <td><input type='text' name='p_expdate' class='' value='<?php echo $cinfo['p_expdate'];?>' maxlength=50></td> </tr> <tr> <th>비고(천년3)</th> <td colspan=3><input type='text' name='remarks' class='width_500' value='<?php echo $cinfo['remarks'];?>'></td> <th>쇼핑몰 재고관리</th> <td> <input type='radio' name='p_jegomax' value='1' id='p_jegomax0' <?php if($cinfo['p_jegomax']=='1'){?>checked<?php }?>> <label for='p_jegomax0'>무한재고</label> <input type='radio' name='p_jegomax' value='0' id='p_jegomax1' <?php if($cinfo['p_jegomax']=='0' || $cinfo['p_jegomax']==''){?>checked<?php }?>> <label for='p_jegomax1'>관리함</label> </td> </tr> <tr> <th>비고(쇼핑몰)</th> <td colspan=5><input type='text' name='p_bigo' class='width_500' value='<?php echo $cinfo['p_bigo'];?>'> <br><span class='help_info'>쇼핑몰 리스트와 상품상세에서 천년비고와 쇼핑몰비고 중에 한개만 표시할수 있습니다. 해당 옵션은 쇼핑몰환경설정 옵션에 있습니다. 원한다면 표시안함도 가능합니다.</span></td> </tr> <?php if($app_id=='ryunen' || $app_id=='wittenglish'){ ?> <tr> <th>위트북 영역</th> <td> <input type='text' name='wt_range' class='' value='<?php echo $cinfo['wt_range'];?>' > </td> <th>위트북 대상</th> <td><input type='text' name='wt_target' class='' value='<?php echo $cinfo['wt_target'];?>' ></td> <th>위트북 사양</th> <td><input type='text' name='wt_spec' class='' value='<?php echo $cinfo['wt_spec'];?>' ></td> </tr> <tr> <th>위트북 출시일</th> <td colspan=5> <input type='text' name='wt_birth' class='' value='<?php echo $cinfo['wt_birth'];?>' > </td> </tr> <?php } ?> <?php if($cinfo['set_yn']=='1'){ $sql = "select a.*, m.*, d.* from product_set a inner join product_m m on a.child_pcode = m.code inner join product_d d on a.child_pcode = d.pcode and d.ocode = '{$configshop['office_code']}' where parent_pcode = '{$cinfo['code']}' "; $res2 = mysql_query($sql,$connect_j3); $cnt = 1; while($s_info = mysql_fetch_array($res2)){ ?> <tr> <th>구성품 <?php echo $cnt;?></th> <td><?php echo $s_info['name']?></td> <td><?php echo $s_info['norm']?></td> <td><?php echo $s_info['child_qty']?></td> <td><?php echo number_format($s_info['saleprice'])?></td> <td> <?php echo number_format($s_info['saleprice']*$s_info['child_qty'])?> <a href="product_reg.php?code=<?php echo $s_info['child_pcode'];?>">[바로가기]</a> </td> </tr> <?php $cnt++; } }
if($cinfo['set_yn']=='2'){ $sql = "select * from product_set where parent_pcode = '{$cinfo['code']}' "; $set_info = sql_fetch($sql,$connect_j3); ?> <tr> <th>상품구분</th> <td><?php echo "신박스"?></td> <th>박스/볼수</th> <td > <?php if($cinfo['boru_x_box_yn']=='0'){ $bqty = $cinfo['boru_qty']; } else { $bqty = $cinfo['box_qty']; } echo $bqty;?>개 </td> <th>해당낱개상품</th> <td><a href="product_reg.php?code=<?php echo $set_info['child_pcode'];?>">[바로가기]</a></td> </tr> <?php } ?> </table> </div>
<div class='cust_modal2'> <h4>단가 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">단가 정보</caption> <colgroup> <col style="width:100px;"><col style="width:230px;"> <col style="width:100px;"><col style="width:230px;"> <col style="width:100px;"><col style="width:230px;"> </colgroup>
<tbody> <tr> <th>매입단가</th> <td><input type='text' name='buyprice' class='number_class' value='<?php echo number_format($cinfo['buyprice']);?>'></td> <th>매출단가</th> <td> <input type='text' name='saleprice' class='number_class' value='<?php echo number_format($cinfo['saleprice']);?>'> <?php echo sellbuy_per($cinfo['buyprice'],$cinfo['saleprice']);?>% </td> <th>시중가격</th> <td><input type='text' name='marketprice' class='number_class' value='<?php echo number_format($cinfo['marketprice']);?>'></td> </tr> <tr> <th>재고</th> <td colspan=5><?php echo $cinfo['jego'];?></td> </tr> <?php if($app_id=='ryunen' || $app_id=='mjflower'){?> <tr> <th>전화문의 상품</th> <td colspan=5> <input type='checkbox' name='p_price_tel' value='1' <?php if($cinfo['p_price_tel']=='1'){?>checked<?php }?> id='p_price_tel'> <label for='p_price_tel'>전화문의표시</label> <span class='help_info'>전화문의 표시를 처리하면 단가표시를 하지 않고 상품이 주문이 안됩니다.</span> </td> </tr> <?php } ?> <?php if($app_id=='ryunen'){?> <tr> <th>멘트처리 <br>비판매상품</th> <td colspan=5> <input type='checkbox' name='p_sell_tel' value='1' <?php if($cinfo['p_sell_tel']=='1'){?>checked<?php }?> id='p_sell_tel'> <label for='p_sell_tel'>멘트처리 비판매상품</label> <span class='help_info'>해당옵션을 선택하면 해당 상품은 주문시 멘트처리되면서 주문되지 않습니다.(아래 판매가능과 달리 주문 버튼이 나옵니다.)</span> </td> </tr> <?php } ?> </table> </div>
<div class='cust_modal2'> <h4>기타정보 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">기타 정보</caption> <colgroup> <col style="width:100px;"><col style="width:230px;"> <col style="width:100px;"><col style="width:230px;"> <col style="width:100px;"><col style="width:230px;"> </colgroup>
<tbody> <tr> <th>관리안함(숨김)</th> <td> <input type='checkbox' name='hidden' value='1' <?php if($cinfo['hid_item']=='1'){?>checked<?php }?> id='hidden'> <label for='hidden'>숨김</label> </td> <th>상품품절</th> <td> <input type='checkbox' name='p_soldout' value='1' <?php if($cinfo['p_soldout']=='1'){?>checked<?php }?> id='p_soldout'> <label for='p_soldout'>품절됨</label> </td> <th>판매가능</th> <td> <input type='checkbox' name='p_use' value='1' <?php if($cinfo['p_use']=='1' || $cinfo['p_use']==''){?>checked<?php }?> id='p_use'> <label for='p_use'>판매중</label> </td> </tr> <tr> <th>최소구매수량</th> <td><input type='text' name='p_min_buy' class='width_60 number_class' value='<?php echo $cinfo['p_min_buy'];?>'></td> <th>최대구매수량</th> <td><input type='text' name='p_max_buy' class='width_60 number_class' value='<?php echo $cinfo['p_max_buy'];?>'></td> <th>포인트율</th> <td> <input type='text' name='pointrate' class='width_60 number_class' value='<?php echo $cinfo['pointrate'];?>'> % </td> </tr> <tr> <th>묶음주문수량</th> <td colspan=5> <input type='text' name='p_pack_buy' class='width_60 number_class' value='<?php echo $cinfo['p_pack_buy'];?>'> <span class='min_ch_do'> [최소구매수량에 반영]</span> <br><span class='help_info'>0이나 1이나 공백 입력시 적용이 안됩니다. 1초과 숫자 입력시 적용됩니다. 최소와 묶음의 배수가 다르게도 적용가능하므로 동일하게 할경우 왼쪽 [최소구매수량에 반영]을 눌러 최소구매수량을 변경해주세요. </td> </tr> <tr> <th>상품유형</th> <td> <input type='checkbox' name='p_type1' class='' value='1' <?php if($cinfo['p_type1']=='1'){ echo "checked"; }?> id='p_type1'><label for='p_type1'>①<?php echo prod_type_rep_txt(1);?></label> <input type='checkbox' name='p_type2' class='' value='1' <?php if($cinfo['p_type2']=='1'){ echo "checked"; }?> id='p_type2'><label for='p_type2'>②<?php echo prod_type_rep_txt(2);?></label><br> <input type='checkbox' name='p_type3' class='' value='1' <?php if($cinfo['p_type3']=='1'){ echo "checked"; }?> id='p_type3'><label for='p_type3'>③<?php echo prod_type_rep_txt(3);?></label> <input type='checkbox' name='p_type4' class='' value='1' <?php if($cinfo['p_type4']=='1'){ echo "checked"; }?> id='p_type4'><label for='p_type4'>④<?php echo prod_type_rep_txt(4);?></label> </td> <th>출력순서</th> <td><input type='text' name='p_sort' class='width_60 number_class' value='<?php echo $cinfo['p_sort'];?>'></td> <th>가격비교사이트</th> <td> <input type='checkbox' name='p_naver' value='1' <?php if($cinfo['p_naver']=='1'){?>checked<?php }?>> <label for='stock_mng_yn0'>노출함</label> </td> </tr> <tr> <th>배송비유형</th> <td> <select name='p_deli_type' class='width_200 p_deli_type_class'> <option value='0' <?php if($cinfo['p_deli_type']=='0' || $cinfo['p_deli_type']==''){ echo "selected"; }?>>쇼핑몰 기본설정</option> <option value='1' <?php if($cinfo['p_deli_type']=='1'){ echo "selected"; }?>>무료배송</option> <option value='2' <?php if($cinfo['p_deli_type']=='2'){ echo "selected"; }?>>조건부 무료배송</option> <option value='3' <?php if($cinfo['p_deli_type']=='3'){ echo "selected"; }?>>유료배송</option> <option value='4' <?php if($cinfo['p_deli_type']=='4'){ echo "selected"; }?>>수량당 부과</option> <option value='5' <?php if($cinfo['p_deli_type']=='5'){ echo "selected"; }?>>수량초과 부과</option> </select> </td> <th>설정배송비</th> <td> <span class='p_deli_type_show1'> <input type='text' name='p_deli_price' class='number_class width_100' value='<?php echo number_format($cinfo['p_deli_price']);?>'>원 </span> </td> <th>배송비 설정조건</th> <td> <span class='p_deli_type_show2'> <span class='p_deli_mm_show1'></span><input type='text' name='p_deli_mm' class='number_class width_60' value='<?php echo number_format($cinfo['p_deli_mm']);?>'><span class='p_deli_mm_show2'></span> </span> </td> </tr> <tr> <th>상품설명</th> <td colspan=5 style='padding:10px;height:400px;'> <?php if($shop_du_size>$limit_mbyte){ echo "쇼핑몰 설정용량보다 오버되고 있습니다. 이미지 파일 업로드 기능이 제한됩니다."; } ?> <textarea name='item_explain' id='item_explain'><?php echo $cinfo['item_explain'];?></textarea> </td> </tr> <tr> <th>모바일<br>상품설정</th> <td colspan=5 style='padding:10px;height:400px;'> <?php if($shop_du_size>$limit_mbyte){ echo "쇼핑몰 설정용량보다 오버되고 있습니다. 이미지 파일 업로드 기능이 제한됩니다."; } ?> <textarea name='item_mobile_explain' id='item_mobile_explain' ><?php echo $cinfo['item_mobile_explain'];?></textarea> </td> </tr> <?php if($shop_du_size>$limit_mbyte){ ?> <tr> <th>이미지</th> <td colspan=5> 쇼핑몰 설정용량보다 오버되고 있습니다. 이미지 파일 업로드 기능이 제한됩니다. </td> </tr> <?php } else { ?> <tr> <th>이미지 1</th> <td colspan=5> <input type='file' name='pic1'> <?php $v = explode("/",$cinfo['pic1']); $pic = $v[count($v)-1]; if($cinfo['pic1']!='' && file_exists("{$j3_data_path}/product/{$cinfo['code']}/{$pic}")){ $thumb_file = get_it_thumbnail($cinfo['code'],$cinfo['pic1'],50,50); ?> <img src='<?php echo $thumb_file;?>'> <input type='checkbox' name='pic1_del' value='1'> 삭제 <span class='ori_img_show'>[이미지확인]</span><br> <span class='ori_img'><img src='<?php echo get_prod_imageurl($cinfo['code'],$pic);?>'></span> <?php } ?> </td> </tr> <tr> <th>이미지 2</th> <td colspan=5> <input type='file' name='pic2'> <?php $v = explode("/",$cinfo['pic2']); $pic = $v[count($v)-1]; if($cinfo['pic2']!='' && file_exists("{$j3_data_path}/product/{$cinfo['code']}/{$pic}")){ $thumb_file = get_it_thumbnail($cinfo['code'],$cinfo['pic2'],50,50); ?> <img src='<?php echo $thumb_file;?>'> <input type='checkbox' name='pic2_del' value='1'> 삭제 <span class='ori_img_show'>[이미지확인]</span><br> <span class='ori_img'><img src='<?php echo get_prod_imageurl($cinfo['code'],$pic);?>'></span> <?php } ?> </td> </tr> <tr> <th>이미지 3</th> <td colspan=5> <input type='file' name='pic3'> <?php $v = explode("/",$cinfo['pic3']); $pic = $v[count($v)-1]; if($cinfo['pic3']!='' && file_exists("{$j3_data_path}/product/{$cinfo['code']}/{$pic}")){ $thumb_file = get_it_thumbnail($cinfo['code'],$cinfo['pic3'],50,50); ?> <img src='<?php echo $thumb_file;?>'> <input type='checkbox' name='pic3_del' value='1'> 삭제 <span class='ori_img_show'>[이미지확인]</span><br> <span class='ori_img'><img src='<?php echo get_prod_imageurl($cinfo['code'],$pic);?>'></span> <?php } ?> </td> </tr> <tr> <th>이미지 4</th> <td colspan=5> <input type='file' name='pic4'> <?php $v = explode("/",$cinfo['pic4']); $pic = $v[count($v)-1]; if($cinfo['pic4']!='' && file_exists("{$j3_data_path}/product/{$cinfo['code']}/{$pic}")){ $thumb_file = get_it_thumbnail($cinfo['code'],$cinfo['pic4'],50,50); ?> <img src='<?php echo $thumb_file;?>'> <input type='checkbox' name='pic4_del' value='1'> 삭제 <span class='ori_img_show'>[이미지확인]</span><br> <span class='ori_img'><img src='<?php echo get_prod_imageurl($cinfo['code'],$pic);?>'></span> <?php } ?> </td> </tr> <tr> <th>이미지 5</th> <td colspan=5> <input type='file' name='pic5'> <?php $v = explode("/",$cinfo['pic5']); $pic = $v[count($v)-1]; if($cinfo['pic5']!='' && file_exists("{$j3_data_path}/product/{$cinfo['code']}/{$pic}")){ $thumb_file = get_it_thumbnail($cinfo['code'],$cinfo['pic5'],50,50); ?> <img src='<?php echo $thumb_file;?>'> <input type='checkbox' name='pic5_del' value='1'> 삭제 <span class='ori_img_show'>[이미지확인]</span><br> <span class='ori_img'><img src='<?php echo get_prod_imageurl($cinfo['code'],$pic);?>'></span> <?php } ?> </td> </tr> <tr> <th>이미지 6</th> <td colspan=5> <input type='file' name='pic6'> <?php if($cinfo['pic6']!='' && file_exists("{$j3_data_path}/product/{$cinfo['code']}/{$pic}")){ $thumb_file = get_it_thumbnail($cinfo['code'],$cinfo['pic6'],50,50); ?> <img src='<?php echo $thumb_file;?>'> <input type='checkbox' name='pic6_del' value='1'> 삭제 <span class='ori_img_show'>[이미지확인]</span><br> <span class='ori_img'><img src='<?php echo get_prod_imageurl($cinfo['code'],$pic);?>'></span> <?php } ?> </td> </tr> <?php } ?> </table> <span class='help_info'>이미지파일은 3MB이하의 파일을 업로드하시기 바랍니다. 추천사이즈는 800x800픽셀의 정사각형 이미지 입니다.</span><br> <a class='thumbnail_del_class'>[상품 썸네일 삭제]</a> </div>
<div id="sub-contents-area" style='padding-left:500px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="lignt-blue-btn btn_customer_save" id=''>저장</a> <a class="gray-btn btn_cancel_save" id=''><?php if($code==''){?>취소<?php } else {?>목록<?php }?></a> </div> </div> </div>
<div class='cust_modal2'> <h4>옵션 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">추가옵션 정보</caption> <colgroup> <col style="width:100px;"><col style="width:890px;"> </colgroup>
<tbody> <tr> <th>옵션상품 적용</th> <td colspan=5> <input type='radio' name='opt_yn' value='0' <?php if($cinfo['opt_yn']=='0' || $cinfo['opt_yn']==''){?>checked<?php }?>> 일반상품 <input type='radio' name='opt_yn' value='1' <?php if($cinfo['opt_yn']=='1'){?>checked<?php }?>> 옵션상품 <span class='help_info'>옵션상품을 선택해야 아래의 선택한 옵션상품들이 적용됩니다.</span> </td> </tr> <tr> <th>옵션 상품</th> <td > <span class='btn_frmline2 add_opt_product'>상품 추가</span> <div style='overflow-y:scroll;max-height:500px;'> <table class='opt_table'> <colgroup> <col style="width:50px;"><col style="width:100px;"><col style="width:150px;"><col style="width:100px;"><col style="width:350px;"><col style="width:150px;"><col style="width:100px;"> </colgroup> <thead> <tr> <th><input type='checkbox' class='bank1_ck_all'></th> <th>이미지</th> <th>분류명</th> <th>상품코드</th> <th>상품명</th> <th>매출단가</th> <th>순서</th> </tr> </thead> <tbody > </tbody> </table> </div> <span class='btn_frmline2 del_opt_product' style='margin-bottom:5px;'>선택삭제</span> </td> </tr> </table> </div>
<div class='cust_modal2'> <h4>추가옵션 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">추가옵션 정보</caption> <colgroup> <col style="width:100px;"><col style="width:890px;"> </colgroup>
<tbody> <tr> <th>추가옵션 상품</th> <td> <span class='btn_frmline2 add_addopt_product'>상품 추가</span> <div style='overflow-y:scroll;max-height:500px;'> <table class='addopt_table' > <colgroup> <col style="width:50px;"><col style="width:100px;"><col style="width:150px;"><col style="width:100px;"><col style="width:350px;"><col style="width:150px;"><col style="width:100px;"> </colgroup> <thead> <tr> <th><input type='checkbox' class='bank2_ck_all'></th> <th>이미지</th> <th>분류명</th> <th>상품코드</th> <th>상품명</th> <th>매출단가</th> <th>순서</th> </tr> </thead> <tbody > </tbody> </table> </div> <span class='btn_frmline2 del_addopt_product' style='margin-bottom:5px;'>선택삭제</span> </td> </tr> </table> </div>
<?php if($app_id=='ryunen' || $app_id=='wittenglish'){ ?> <div class='cust_modal2'> <h4>병행상품 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">병행상품 정보</caption> <colgroup> <col style="width:100px;"><col style="width:890px;"> </colgroup>
<tbody> <tr> <th>병행상품 상품</th> <td> <span class='btn_frmline2 add_paral_product'>상품 추가</span> <div style='overflow-y:scroll;max-height:500px;'> <table class='paral_table' > <colgroup> <col style="width:50px;"><col style="width:100px;"><col style="width:150px;"><col style="width:100px;"><col style="width:350px;"><col style="width:150px;"><col style="width:100px;"> </colgroup> <thead> <tr> <th><input type='checkbox' class='bank4_ck_all'></th> <th>이미지</th> <th>분류명</th> <th>상품코드</th> <th>상품명</th> <th>매출단가</th> <th>순서</th> </tr> </thead> <tbody > </tbody> </table> </div> <span class='btn_frmline2 del_paral_product' style='margin-bottom:5px;'>선택삭제</span> </td> </tr> </table> </div> <?php } ?>
<div class='cust_modal2'> <h4>관련상품 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">관련상품 정보</caption> <colgroup> <col style="width:100px;"><col style="width:890px;"> </colgroup>
<tbody> <tr> <th>관련상품 상품</th> <td> <span class='btn_frmline2 add_rel_product'>상품 추가</span> <div style='overflow-y:scroll;max-height:500px;'> <table class='rel_table' > <colgroup> <col style="width:50px;"><col style="width:100px;"><col style="width:150px;"><col style="width:100px;"><col style="width:350px;"><col style="width:150px;"><col style="width:100px;"> </colgroup> <thead> <tr> <th><input type='checkbox' class='bank3_ck_all'></th> <th>이미지</th> <th>분류명</th> <th>상품코드</th> <th>상품명</th> <th>매출단가</th> <th>순서</th> </tr> </thead> <tbody > </tbody> </table> </div> <span class='btn_frmline2 del_rel_product' style='margin-bottom:5px;'>선택삭제</span> </td> </tr> </table> </div>
<?php if($app_id=='ryunen' || $app_id=='wittenglish'){ ?> <div class='cust_modal2'> <h4>북이미지 등록</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">북이미지 등록</caption> <colgroup> <col style="width:100px;"><col style="width:890px;"> </colgroup>
<tbody> <?php for($i=1;$i<=10;$i++){ $book_file = "book".$i; ?> <tr> <th>북이미지 <?php echo $i;?></th> <td colspan=5> <input type='file' name='<?php echo $book_file;?>'> <?php if(file_exists("{$j3_data_path}/book_img/{$cinfo['code']}/{$book_file}")){ $thumb_file = get_img_thumbnail("{$j3_data_path}/book_img/{$cinfo['code']}","{$j3_data_url}/book_img/{$cinfo['code']}","{$book_file}",100,100); ?> <img src='<?php echo $thumb_file;?>'> <input type='checkbox' name='<?php echo $book_file;?>_del' value='1'> 삭제 <span class='ori_img_show'>[이미지확인]</span><br> <span class='ori_img'><img src='<?php echo "{$j3_data_url}/book_img/{$cinfo['code']}/{$book_file}";?>' style='max-width:1000px;'></span> <?php } ?> 적정 픽셀 : 500x683px </td> </tr> <?php } ?> </table> </div> <?php } ?>
<?php if($code==''){?> <div class='cust_modal2'> <input type='checkbox' name='cate_continue' value='1' <?php if($cont_cate_code!=''){?>checked<?php }?>> 같은 분류로 여러상품을 계속 등록시 체크 </div> <?php }?>
<div class='cust_modal2'> <h4>단가 및 할인 사용 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">단가 및 할인 사용 정보</caption> <colgroup> <col style="width:100px;"><col style="width:890px;"> </colgroup>
<tbody class='prod_nulti_class'> </tbody> <tfoot> <tr> <th>아이디검색</th> <td class='left'><input type='text' name='danga_id' value=''> <input type='button' value='검색' onclick="search_danga()"></td> </tr> </tfoot> </table> </div>
<div class='cust_modal2 <?php if($code==''){?>screen_out<?php }?>'> <h4 class='chk_cate_all'>[일괄적용 정보 열기]</h4> <table class="order-sheet table-top-border screen_out chk_cate_all_table"> <caption class="screen_out">일괄적용 정보</caption> <colgroup> <col style="width:100px;"><col style="width:150px;"> <col style="width:100px;"><col style="width:150px;"> <col style="width:100px;"><col style="width:150px;"> <col style="width:100px;"><col style="width:150px;"> </colgroup>
<tbody> <tr> <th>부가세</th> <td> <input type='checkbox' name='chk_cate^tax_yn' value='1'> 분류적용 <input type='checkbox' name='chk_all^tax_yn' value='1'> 전체적용 </td> <th>무게</th> <td> <input type='checkbox' name='chk_cate^prod_wt' value='1'> 분류적용 <input type='checkbox' name='chk_all^prod_wt' value='1'> 전체적용 </td> <th>단위</th> <td> <input type='checkbox' name='chk_cate^unit' value='1'> 분류적용 <input type='checkbox' name='chk_all^unit' value='1'> 전체적용 </td> </tr> <tr> <th>규격</th> <td> <input type='checkbox' name='chk_cate^norm' value='1'> 분류적용 <input type='checkbox' name='chk_all^norm' value='1'> 전체적용 </td> <th>매입단가</th> <td> <input type='checkbox' name='chk_cate^buyprice' value='1'> 분류적용 <input type='checkbox' name='chk_all^buyprice' value='1'> 전체적용 </td> <th>매출단가</th> <td> <input type='checkbox' name='chk_cate^saleprice' value='1'> 분류적용 <input type='checkbox' name='chk_all^saleprice' value='1'> 전체적용 </td> <th>시중가격</th> <td> <input type='checkbox' name='chk_cate^marketprice' value='1'> 분류적용 <input type='checkbox' name='chk_all^marketprice' value='1'> 전체적용 </td> </tr> <tr> <th>관리안함(숨김)</th> <td> <input type='checkbox' name='chk_cate^hidden' value='1'> 분류적용 <input type='checkbox' name='chk_all^hidden' value='1'> 전체적용 </td> <th>상품품절</th> <td> <input type='checkbox' name='chk_cate^p_soldout' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_soldout' value='1'> 전체적용 </td> <th>판매가능</th> <td> <input type='checkbox' name='chk_cate^p_use' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_use' value='1'> 전체적용 </td> <th>최소구매수량</th> <td> <input type='checkbox' name='chk_cate^p_min_buy' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_min_buy' value='1'> 전체적용 </td> </tr> <tr> <th>최대구매수량</th> <td> <input type='checkbox' name='chk_cate^p_max_buy' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_max_buy' value='1'> 전체적용 </td> <th>묶음구매수량</th> <td> <input type='checkbox' name='chk_cate^p_pack_buy' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_pack_buy' value='1'> 전체적용 </td> <th>상품설명</th> <td> <input type='checkbox' name='chk_cate^item_explain' value='1'> 분류적용 <input type='checkbox' name='chk_all^item_explain' value='1'> 전체적용 </td> <th>상품설명(모바일)</th> <td > <input type='checkbox' name='chk_cate^item_mobile_explain' value='1'> 분류적용 <input type='checkbox' name='chk_all^item_mobile_explain' value='1'> 전체적용 </td> </tr> <tr> <th>배송비유형</th> <td> <input type='checkbox' name='chk_cate^p_deli_type' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_deli_type' value='1'> 전체적용 </td> <th>설정배송비</th> <td> <input type='checkbox' name='chk_cate^p_deli_price' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_deli_price' value='1'> 전체적용 </td> <th>배송비 설정조건</th> <td> <input type='checkbox' name='chk_cate^p_deli_mm' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_deli_mm' value='1'> 전체적용 </td> <th>가격비교사이트</th> <td> <input type='checkbox' name='chk_cate^p_naver' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_naver' value='1'> 전체적용 </td> </tr> <tr> <th>쇼핑몰 재고관리</th> <td> <input type='checkbox' name='chk_cate^p_jegomax' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_jegomax' value='1'> 전체적용 </td> <th>포인트율</th> <td > <input type='checkbox' name='chk_cate^pointrate' value='1'> 분류적용 <input type='checkbox' name='chk_all^pointrate' value='1'> 전체적용 </td> <th>비고(천년3)</th> <td> <input type='checkbox' name='chk_cate^remarks' value='1'> 분류적용 <input type='checkbox' name='chk_all^remarks' value='1'> 전체적용 </td> <th>비고(쇼핑몰)</th> <td> <input type='checkbox' name='chk_cate^p_bigo' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_bigo' value='1'> 전체적용 </td> </tr> <?php if($app_id=='ryunen' || $app_id=='mjflower'){?> <tr> <th>전화문의 상품</th> <td> <input type='checkbox' name='chk_cate^p_price_tel' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_price_tel' value='1'> 전체적용 </td> <th>멘트처리 비판</th> <td > <input type='checkbox' name='chk_cate^p_sell_tel' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_sell_tel' value='1'> 전체적용 </td> </tr> <?php } ?> <tr> <th>상품유형(신상)</th> <td> <input type='checkbox' name='chk_cate^p_type1' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_type1' value='1'> 전체적용 </td> <th>상품유형(히트)</th> <td> <input type='checkbox' name='chk_cate^p_type2' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_type2' value='1'> 전체적용 </td> <th>상품유형(추천)</th> <td> <input type='checkbox' name='chk_cate^p_type3' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_type3' value='1'> 전체적용 </td> <th>상품유형(인기)</th> <td> <input type='checkbox' name='chk_cate^p_type4' value='1'> 분류적용 <input type='checkbox' name='chk_all^p_type4' value='1'> 전체적용 </td> </tr> </tbody> </table> </div> </form> <div id="sub-contents-area" style='padding-left:500px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="lignt-blue-btn btn_customer_save" id=''>저장</a> <a class="gray-btn btn_cancel_save" id=''><?php if($code==''){?>취소<?php } else {?>목록<?php }?></a> </div> </div> </div> </div> <!-- wrap end--> <script> function form_save(){ // 상품 저장/수정 var form_obj = $("form[name='product_reg_form']"); if($(form_obj).find("input[name='code']").val()==''){ if($(form_obj).find("input[name='code_auto']").is(":checked")==false){ if($(form_obj).find("input[name='code1']").val()==''){ alert('코드를 입력하세요.'); return; } } }
if($(form_obj).find("input[name='name']").val()==''){ alert('상품명을 입력하세요.'); return; }
$(form_obj).find("input[name='qstr']").val('<?php echo $qstr;?>'); if(confirm('저장하시겠습니까?')){ $(form_obj).submit(); } //$(form_obj).submit(); }
function add_opt_product(){ // 추가옵션용 상품 추가 $form_obj = $("form[name='product_list_form']"); $table_obj = $(".opt_table tbody"); $ck_cnt = 0; $form_obj.find("input[name='code_idx[]']").each(function(){ if($(this).is(":checked")){ $tr_obj = $(this).closest("tr"); $codes = $tr_obj.find("input[name='codes[]']").val(); $code1 = $tr_obj.find("input[name='code1[]']").val(); $pname = $tr_obj.find("input[name='pname[]']").val(); $catename = $tr_obj.find("input[name='catename[]']").val(); $saleprice = $tr_obj.find("input[name='saleprice[]']").val(); $thumb_file = $tr_obj.find("input[name='thumb_file[]']").val();
$flag = ck_opt_product($table_obj,$codes); if($flag==false){ $table_obj.append("<tr><td class='tcenter2'><input type='checkbox' name='prod_idx[]' value='1' class='acc_idx'><input type='hidden' name='ccode1[]' value='"+$codes+"'></td><td class='tcenter2'><img src='"+$thumb_file+"' onerror='this.style.display=\"none\"' width=50></td><td>"+$catename+"</td><td class='tcenter2'>"+$code1+"</td><td>"+$pname+"</td><td class='cost'>"+formatCurrency($saleprice)+"</td><td class='tcenter2'><input type='text' name='prod_seq1[]' value='0' class='width_60'></td></tr>"); $ck_cnt++; } } }); }
function add_addopt_product(){ // 추가옵션용 상품 추가 $form_obj = $("form[name='product_list_form']"); $table_obj = $(".addopt_table tbody"); $ck_cnt = 0; $form_obj.find("input[name='code_idx[]']").each(function(){ if($(this).is(":checked")){ $tr_obj = $(this).closest("tr"); $codes = $tr_obj.find("input[name='codes[]']").val(); $code1 = $tr_obj.find("input[name='code1[]']").val(); $pname = $tr_obj.find("input[name='pname[]']").val(); $catename = $tr_obj.find("input[name='catename[]']").val(); $saleprice = $tr_obj.find("input[name='saleprice[]']").val(); $thumb_file = $tr_obj.find("input[name='thumb_file[]']").val();
$flag = ck_addopt_product($table_obj,$codes); if($flag==false){ $table_obj.append("<tr><td class='tcenter2'><input type='checkbox' name='prod_idx[]' value='1' class='acc_idx'><input type='hidden' name='ccode2[]' value='"+$codes+"'></td><td class='tcenter2'><img src='"+$thumb_file+"' onerror='this.style.display=\"none\"' width=50></td><td>"+$catename+"</td><td class='tcenter2'>"+$code1+"</td><td>"+$pname+"</td><td class='cost'>"+formatCurrency($saleprice)+"</td><td class='tcenter2'><input type='text' name='prod_seq2[]' value='0' class='width_60'></td></tr>"); $ck_cnt++; } } }); }
function add_rel_product(){ // 관련상품용 상품 추가 $form_obj = $("form[name='product_list_form']"); $table_obj = $(".rel_table tbody"); $ck_cnt = 0; $form_obj.find("input[name='code_idx[]']").each(function(){ if($(this).is(":checked")){ $tr_obj = $(this).closest("tr"); $codes = $tr_obj.find("input[name='codes[]']").val(); $code1 = $tr_obj.find("input[name='code1[]']").val(); $pname = $tr_obj.find("input[name='pname[]']").val(); $catename = $tr_obj.find("input[name='catename[]']").val(); $saleprice = $tr_obj.find("input[name='saleprice[]']").val(); $thumb_file = $tr_obj.find("input[name='thumb_file[]']").val();
$flag = ck_rel_product($table_obj,$codes); if($flag==false){ $table_obj.append("<tr><td class='tcenter2'><input type='checkbox' name='prod_idx[]' value='1' class='acc_idx'><input type='hidden' name='ccode3[]' value='"+$codes+"'></td><td class='tcenter2'><img src='"+$thumb_file+"' onerror='this.style.display=\"none\"' width=50></td><td>"+$catename+"</td><td class='tcenter2'>"+$code1+"</td><td>"+$pname+"</td><td class='cost'>"+formatCurrency($saleprice)+"</td><td class='tcenter2'><input type='text' name='prod_seq3[]' value='0' class='width_60'></td></tr>"); $ck_cnt++; } } }); }
function add_paral_product(){ // 병행상품용 상품 추가 $form_obj = $("form[name='product_list_form']"); $table_obj = $(".paral_table tbody"); $ck_cnt = 0; $form_obj.find("input[name='code_idx[]']").each(function(){ if($(this).is(":checked")){ $tr_obj = $(this).closest("tr"); $codes = $tr_obj.find("input[name='codes[]']").val(); $code1 = $tr_obj.find("input[name='code1[]']").val(); $pname = $tr_obj.find("input[name='pname[]']").val(); $catename = $tr_obj.find("input[name='catename[]']").val(); $saleprice = $tr_obj.find("input[name='saleprice[]']").val(); $thumb_file = $tr_obj.find("input[name='thumb_file[]']").val();
$flag = ck_paral_product($table_obj,$codes); if($flag==false){ $table_obj.append("<tr><td class='tcenter2'><input type='checkbox' name='prod_idx[]' value='1' class='acc_idx'><input type='hidden' name='ccode4[]' value='"+$codes+"'></td><td class='tcenter2'><img src='"+$thumb_file+"' onerror='this.style.display=\"none\"' width=50></td><td>"+$catename+"</td><td class='tcenter2'>"+$code1+"</td><td>"+$pname+"</td><td class='cost'>"+formatCurrency($saleprice)+"</td><td class='tcenter2'><input type='text' name='prod_seq4[]' value='0' class='width_60'></td></tr>"); $ck_cnt++; } } }); }
function ck_opt_product($table_obj,code){ // 이미 등록된 상품인지 체크 $ff = false; $table_obj.find("input[name='ccode1[]']").each(function(){ if(code==$(this).val()){ $ff = true;} }); return $ff; }
function ck_addopt_product($table_obj,code){ // 이미 등록된 상품인지 체크 $ff = false; $table_obj.find("input[name='ccode2[]']").each(function(){ if(code==$(this).val()){ $ff = true;} }); return $ff; }
function ck_rel_product($table_obj,code){ // 이미 등록된 상품인지 체크 $ff = false; $table_obj.find("input[name='ccode3[]']").each(function(){ if(code==$(this).val()){ $ff = true;} }); return $ff; }
function ck_paral_product($table_obj,code){ // 이미 등록된 상품인지 체크 $ff = false; $table_obj.find("input[name='ccode4[]']").each(function(){ if(code==$(this).val()){ $ff = true;} }); return $ff; }
$(function(){ $(document).on("click","input[name='code_auto']",function(){ // 코드자동 선택시 if($(this).is(":checked")){ $("input[name='code1']").addClass("input_readonly").attr("readonly",true).val("");
} else { $("input[name='code1']").removeClass("input_readonly").attr("readonly",false); } });
$(".btn_customer_save").click(function(){ form_save(); });
$(".btn_cancel_save").click(function(){ // 취소 버튼 document.location.href='product_list.php?<?php echo $_COOKIE['qstr'];?>'; });
$(".ori_img_show").css("cursor","pointer").click(function(){ $tr_obj = $(this).closest("tr"); $ori_img = $tr_obj.find(".ori_img"); if($ori_img.css("display")=="none"){ $ori_img.show(); } else { $ori_img.hide(); } });
$(".bank1_ck_all").click(function(){ // 전체선택 전체해제 if($(this).is(":checked")==true){ $(".opt_table input[name='prod_idx[]']").prop("checked",true); } else { $(".opt_table input[name='prod_idx[]']").prop("checked",false); } });
$(".bank2_ck_all").click(function(){ // 전체선택 전체해제 if($(this).is(":checked")==true){ $(".addopt_table input[name='prod_idx[]']").prop("checked",true); } else { $(".addopt_table input[name='prod_idx[]']").prop("checked",false); } });
$(".bank3_ck_all").click(function(){ // 전체선택 전체해제 if($(this).is(":checked")==true){ $(".rel_table input[name='prod_idx[]']").prop("checked",true); } else { $(".rel_table input[name='prod_idx[]']").prop("checked",false); } });
$(".bank4_ck_all").click(function(){ // 전체선택 전체해제 if($(this).is(":checked")==true){ $(".paral_table input[name='prod_idx[]']").prop("checked",true); } else { $(".paral_table input[name='prod_idx[]']").prop("checked",false); } });
$(".chk_cate_all").css("cursor","pointer").click(function(){ if($(".chk_cate_all_table").hasClass("screen_out")){ $(".chk_cate_all_table").removeClass("screen_out"); $(".chk_cate_all").html("[일괄적용 정보 닫기]"); } else { $(".chk_cate_all_table").addClass("screen_out"); $(".chk_cate_all").html("[일괄적용 정보 열기]"); } });
$(".add_opt_product").click(function(){ // 옵션상품 검색 선택 $.get("product_list.inc.php?mode=opt",function(rtn){ $("#modal_member_box2").html(rtn).dialog({ resizable: true, height:740, width:1150, modal: true, title:"상품 [검색]", buttons: { 상품선택: function() { add_opt_product(); }, 닫기: function() { $( this ).dialog( "close" ); } } }); }); });
$(".add_addopt_product").click(function(){ // 추가옵션상품 검색 선택 $.get("product_list.inc.php?mode=addopt",function(rtn){ $("#modal_member_box2").html(rtn).dialog({ resizable: true, height:740, width:1150, modal: true, title:"상품 [검색]", buttons: { 상품선택: function() { add_addopt_product(); }, 닫기: function() { $( this ).dialog( "close" ); } } }); }); });
$(".add_rel_product").click(function(){ // 관련상품 검색 선택 $.get("product_list.inc.php?mode=rel",function(rtn){ $("#modal_member_box2").html(rtn).dialog({ resizable: true, height:740, width:1150, modal: true, title:"상품 [검색]", buttons: { 상품선택: function() { add_rel_product(); }, 닫기: function() { $( this ).dialog( "close" ); } } }); }); });
$(".add_paral_product").click(function(){ // 병행상품 검색 선택 $.get("product_list.inc.php?mode=paral",function(rtn){ $("#modal_member_box2").html(rtn).dialog({ resizable: true, height:740, width:1150, modal: true, title:"상품 [검색]", buttons: { 상품선택: function() { add_paral_product(); }, 닫기: function() { $( this ).dialog( "close" ); } } }); }); });
$(".del_opt_product").click(function(){ // 옵션 상품 선택 삭제 $(".opt_table input[name='prod_idx[]']").each(function(){ if($(this).is(":checked")){ $(this).closest("tr").remove(); } }); });
$(".del_addopt_product").click(function(){ // 추가옵션 상품 선택 삭제 $(".addopt_table input[name='prod_idx[]']").each(function(){ if($(this).is(":checked")){ $(this).closest("tr").remove(); } }); });
$(".del_rel_product").click(function(){ // 관련상품 선택 삭제 $(".rel_table input[name='prod_idx[]']").each(function(){ if($(this).is(":checked")){ $(this).closest("tr").remove(); } }); }); if('<?php echo $code;?>'!=''){ $.get("ajax.product_opt_get.php?code=<?php echo $code;?>",function(rtn){ // 옵션 정보를 가져온다. $(".opt_table tbody").html(rtn); })
$.get("ajax.product_addopt_get.php?code=<?php echo $code;?>",function(rtn){ // 추가옵션 정보를 가져온다. $(".addopt_table tbody").html(rtn); })
$.get("ajax.product_rel_get.php?code=<?php echo $code;?>",function(rtn){ // 관련상품 정보를 가져온다. $(".rel_table tbody").html(rtn); })
$.get("ajax.product_paral_get.php?code=<?php echo $code;?>",function(rtn){ // 병행상품 정보를 가져온다. $(".paral_table tbody").html(rtn); }) }
$.get("ajax.product_multi_get.php?code=<?php echo $cinfo['code'];?>&prod_cate_code=<?php echo $cinfo['prod_cate_code'];?>",function(rtn){ // 단가 및 할인 사용 정보를 가져온다. $(".prod_nulti_class").html(rtn); });
$(".p_deli_type_class").change(function(){ // 배송비유형 변경시 p_deli_type_change(); });
$(".thumbnail_del_class").click(function(){ $.get("ajax.product_thumb_del.php?code=<?php echo $code;?>",function(rtn){ alert(rtn) }); });
$(".min_ch_do").css("cursor","pointer").click(function(){ $v = $("input[name='p_pack_buy']").val(); $v = parseInt($v); if($v>1){ $("input[name='p_min_buy']").val($v); } });
p_deli_type_change(); })
function p_deli_type_change(){ $v = $("select[name='p_deli_type']").val(); if($v<'2'){ $(".p_deli_type_show1, .p_deli_type_show2").hide(); } else if($v=='2'){ $(".p_deli_type_show1, .p_deli_type_show2").show(); $(".p_deli_mm_show1").html("상품금액 "); $(".p_deli_mm_show2").html("원 이상시 무료배송 "); } else if($v=='3'){ $(".p_deli_type_show1").show(); $(".p_deli_type_show2").hide(); $(".p_deli_mm_show1").html(""); $(".p_deli_mm_show2").html(""); } else if($v=='4'){ $(".p_deli_type_show1, .p_deli_type_show2").show(); $(".p_deli_mm_show1").html("수량 "); $(".p_deli_mm_show2").html("개 마다 배송비책정 "); } else if($v=='5'){ $(".p_deli_type_show1, .p_deli_type_show2").show(); $(".p_deli_mm_show1").html("수량 "); $(".p_deli_mm_show2").html("개 초과시마다 배송비책정 "); alert('수량초과시 부과는 지정수량 아래는 쇼핑몰환경설정의 배송비항목을 따르고 아래지정된 수량이상일때마다 배송비가 추가되는 형태입니다.'); } }
function search_danga(){ $id = $("input[name='danga_id']").val(); form_data = "mode=id_get&search_id="+$id+"&code=<?php echo $code?>"; $.get("ajax.product_multi_get.php?"+form_data,function(rtn){ alert(rtn); }); }
<?php if($shop_du_size>$limit_mbyte){ ?> CKEDITOR.replace( 'item_explain', { height: 400, filebrowserUploadUrl:"" } ); CKEDITOR.replace( 'item_mobile_explain', { height: 400, filebrowserUploadUrl:"" } ); <?php } else { ?> CKEDITOR.replace( 'item_explain', { height: 400 } ); CKEDITOR.replace( 'item_mobile_explain', { height: 400 } ); <?php } ?> </script> <?php //_pr($_COOKIE['qstr']); include($j3_adm_path."/shop_footer.php"); ?> <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: 300px; 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> <div id="modal_member_box2" title="거래처수정" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;"></div>
|