/home/mjc1/public_html/j3demo/skin/orderview/orderview01.php


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
<?php
Global $oinfo$ord_cancel_do ,$ord_delete_do$payinfo_hide;

qstr_extract($_SERVER['QUERY_STRING']); // $qstr을 $_GET변수에 넣는다.
extract($_GET); // $_GET를 변수로 풀어준다.
$cate urldecode($cate);

$cur_img_url $j3_img_url."/".$sk['sk_img_path'];

if(
$configshop['ord_man_type']>&& $oinfo['ordstate']==&& $oinfo['deposit']==0){
    
$ord_man_yn "Y";
}

if(
$skin_css!=''){
    echo 
$skin_css;
} else {
?>
<!-- 상단 카테고리 내 위치 -->
<style>

</style>
<?php }?>

<div class="class_skin_idx_<?php echo $sk_idx;?>">
<!-- 주문상세정보 시작 { -->
        <div class="pt20">
            
            <!-- 주문정보확인 시작 { -->
            <section class="gray_line2">
                <div class="p20_50 gray_line6">
                    <label class="mr10 txt15 bold">주문일자</label><span class="mr50 cost3"><?php echo str_replace("-",".",$oinfo['orddate']);?></span>
                    <label class="pl50 mr10 txt15 bold gray_l_line">주문번호</label><span class="mr50 custom1 cost1"><?php echo $oinfo['od_id']?></span>

                    <!--<input type="button" class="box100_25 white bold line0 bg_custom1 pointer" value="재구매" />
                    <input type="button" class="box100_25 custom1 bold align_c bg_white custom_line1 pointer" value="주문취소" />-->
<?php if($oinfo['tracking_number']!='' && $oinfo['ordstate']>='2'){?>
                    <input type="button" class="box100_25 white bold line0 bg_custom1 pointer deli_detail_search" value="배송조회" />
<?php }?>
                </div>
            </section>


            <!-- 상품내역 시작 { -->
            <section class="mt30">
                <table class="width_full top_bold_line">
                    <caption class="mb10 txt14 align_l bold">상품내역</caption>
                    <colgroup>
                        <col class="width140">
                        <col class="width140">
                        <col class="width400 ellipsis">
                        <col class="width100">
                        <col class="width140">
                        <col class="width140">
                        <col class="width140">
<?php if($ord_man_yn=="Y"){ ?>
                        <col class="width100">
<?php ?>
                    </colgroup>
                    <thead>
                    <tr>
                        <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>
<?php if($ord_man_yn=="Y"){ ?>
                        <th scope="col" class="p15_0 txt14 gray_line_b">관리</th>
<?php ?>
                    </tr>
                    </thead>
                    <tbody>
<?php
    $list_array 
$oinfo['row'];
    for(
$i=0;$i<count($list_array);$i++){
        
$info=$list_array[$i];
        if(
$info['pcode']=='1' && strpos("xx".$info['pname'],"방문수령")>0){ $visit_take $info['pname']; }
        if((
$info['pcode']=='1' && $info['pname']=='쇼핑몰배송비') || ($info['pcode']=='1' && $info['pname']=='도서/산간배송비') || ($info['pcode']=='1' && strpos("xx".$info['pname'],"방문수령")>0)){ continue; } // 배송비는 패스
        
$opt_name "";

        
$ii $i+1;
        
$t_qty $info['qty'];
        
//$t_price = $info['qty']*$info['opt_price'];
        
$t_price $info['tot_amt'];
        if(
$info['opt_price']>0){ $buho "+"; } else { $buho ""; }
        if(
$info['opt_mode']!=''){
            
$opt_name $info['pname']."({$buho}".number_format($info['opt_price']).")";
            if(
$ord_man_yn=="Y"){
                
$opt_name .= "&nbsp;<input type='checkbox' name='opt_ck[]' value='{$info['midx']}§{$info['seq']}§{$info['pcode']}§{$info['qty']}§{$info['pname']}'>";
            }
            
$opt_name .= "<br>";
        }
        while(
$list_array[$ii]['sc_pcode']==$info['sc_pcode'] && $list_array[$ii]['ev_code']==$info['ev_code']){
            
$nextinfo $list_array[$ii];
            
$t_qty += $nextinfo['qty'];
            if(
$nextinfo['opt_price']>0){ $buho "+"; } else { $buho ""; }
            if(
$nextinfo['opt_mode']!=''){
                
$opt_name .= $nextinfo['pname']."({$buho}".number_format($nextinfo['opt_price']).")";
                if(
$ord_man_yn=="Y"){
                    
$opt_name .= "&nbsp;<input type='checkbox' name='opt_ck[]' value='{$nextinfo['midx']}§{$nextinfo['seq']}§{$nextinfo['pcode']}§{$nextinfo['qty']}§{$nextinfo['pname']}'>";
                }
                
$opt_name .= "<br>";
            }
            
//$t_price += $nextinfo['qty']*$nextinfo['opt_price'];
            
$t_price += $nextinfo['tot_amt'];
            
$t_point += $nextinfo['qty']*$nextinfo['ct_point'];

            if(
$ii==100){ exit;; }
            
$ii++;
        }
        
$i=$ii-1;

        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;
            }
        }
?>
                    <tr>
                        <td class="p15_0 align_c gray_line_b2"><?php echo $oinfo['od_id'];?></td>
                        <td class="p15_0 align_c gray_line_b2"><a><img src="<?php echo $thumb_file get_it_thumbnail($info['sc_pcode'],$info['pic1'],150,150);?>" class="box80" alt=""></a></td>
                        <td class="p15_0 align_l gray_line_b2">
                            <p class="mb10 txt15 bold"><a><?php echo $info['ct_name'];?></a></p>
                            <p class="mb5 gray bold"><?php echo $opt_name;?></p>
                        </td>
                        <td class="p15_0 align_l gray_line_b2"><?php echo $info['norm'];?></td>
                        <td class="p15_0 align_c gray_line_b2">
                            <p class="gray"><span class="cost1"><?php echo number_format($t_price);?></span>원</p>
                            <p class="mt5 gray">(<?php echo number_format($t_qty);?>개)</p>
                        </td>
                        <td class="p15_0 align_c gray_line_b2">
                            <?php 
                                
echo $p_deli_price;
                            
?></td>
                        <td class="p15_0 align_c gray_line_b2">
                            <span class="custom3"><?php echo $oinfo['od_state'];?></span>
                            <!--<a class="mt5 box100_25 custom2 align_c bold l_height20 custom_line2 bg_white">배송조회</a>-->
                        <?php if($oinfo['ordstate']=='3' || 1==1){?>
                            <!--<a class="mt5 box100_25 white align_c bold l_height20 bg_custom2 prod_use_class">구매후기</a>-->
                        <?php }?>
                        </td>
<?php if($ord_man_yn=="Y"){ ?>
                        <td class="p15_0 align_c gray_line_b2">
                            <input type='button' value='수량변경' class='padd_5px item_cancel_class'>
                            <div class='screen_out cancel_box'>
                                <form name='change_form'>
                                    <input type='hidden' name='midx[]' value='<?php echo $info['midx'];?>'>
                                    <input type='hidden' name='seq[]' value='<?php echo $info['seq'];?>'>
                                    <input type='hidden' name='pcode[]' value='<?php echo $info['sc_pcode'];?>'>
                                    <input type='hidden' name='p_ev_code[]' value='<?php echo $info['ev_code'];?>'>
                                    <input type='hidden' name='omode' value='item_change'>
                                    <span class='item_name'><?php echo $info['pname'];?> <?php if($info['opt_mode']!=''){ echo "/".$info['opt_name']; }?></span><br><br>
                                    <input type='checkbox' name='c_ck' value='1'> 수량변경 : 
                                    <input type='text' name='cancel_qty' size=10 value='<?php echo $info['qty'];?>'>
                                </form>
                            </div>
        <?php if($configshop['ord_man_type']==2){ ?>
                            <br><input type='button' value='상품삭제' class='mt5 padd_5px item_del_class'>
                            <div class='screen_out del_box'>
                                <form name='delete_form'>
                                    <input type='hidden' name='midx[]' value='<?php echo $info['midx'];?>'>
                                    <input type='hidden' name='seq[]' value='<?php echo $info['seq'];?>'>
                                    <input type='hidden' name='pcode[]' value='<?php echo $info['sc_pcode'];?>'>
                                    <input type='hidden' name='p_ev_code[]' value='<?php echo $info['ev_code'];?>'>
                                    <input type='hidden' name='omode' value='item_delete'>
                                    <span class='item_name'><?php echo $info['pname'];?> <?php if($info['opt_mode']!=''){ echo "/".$info['opt_name']; }?></span><br><br>
                                    <input type='checkbox' name='c_ck' value='1'> 상품삭제 확인
                                </form>
                            </div>
        <?php ?>
                        </td>
<?php ?>
                    </tr>
<?php
    
}
?>
                    </tbody>
                </table>
                <div class='align_r pt5'>
<?php
    
if($oinfo['ordstate']=='2'){
        
$comp_date date("Y-m-d"strtotime($oinfo['deli_time'])+($configshop['deli_comp_day']*60*60*24));
        echo 
"발송일자 : ".substr($oinfo['deli_time'],0,10)." / 자동 수령완료 예상일자 : {$comp_date}";
    }
?>
                </div>
            </section>
            <!-- } 상품내역 끝 -->



            <!-- 결제내역 시작 { -->
            <section class="mt30">
                <table class="width_full top_bold_line">
                    <caption class="mb10 txt14 align_l bold">결제내역</caption>
                    <colgroup>
                        <col class="width400">
                        <col class="width400">
                        <col class="width400">
                    </colgroup>
                    <thead>
                    <tr>
                        <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>
                    <tr>
                        <td class="p10_20 l_height25 gray_line_b2">
                            <p><label class="txt13">상품합계</label><span class="float_r cost3"><?php echo number_format($oinfo['cart_price']);?></span></p>
                            <p><label class="txt13">배송비합계</label><span class="float_r cost3">(+)<?php echo number_format($oinfo['deli_price']+$oinfo['deli_price2']);?></span></p>
                        </td>
                        <td class="p10_20 l_height25 bg_gray gray_line_b2">
                            <p><label class="txt13">상품할인</label><span class="float_r cost3">(-)<?php echo number_format($oinfo['dc_price']);?></span></p>
                            <p><label class="txt13">포인트 사용</label><span class="float_r cost3">(-)<?php echo number_format($oinfo['use_point']);?></span></p>
                        </td>
                        <td rowspan="2" class="p10_20 l_height25 gray_line_b2 bg_custom2">
                            <p><label class="white txt13">총 상품금액</label><span class="float_r white cost3"><?php echo number_format($oinfo['cart_price']);?></span></p>
                            <p><label class="white txt13">배송비</label><span class="float_r white cost3">(+)<?php echo number_format($oinfo['deli_price']);?></span></p>
                            <p><label class="white txt13">도서/산간 배송비</label><span class="float_r white cost3">(+)<?php echo number_format($oinfo['deli_price2']);?></span></p>
                            <p><label class="white txt13">총 할인금액</label><span class="float_r white cost3">(-)<?php echo number_format($oinfo['dc_price']+$oinfo['use_point']);?></span></p>
                            <p class="mt15"><label class="white txt16 bold">결제할 금액</label><span class="float_r white cost1"><?php echo number_format($oinfo['tot_pay_price']);?></span></p>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="p10_20 l_height25 gray_line_b2">
                            <p>
                                <label class="bold">결제수단</label>
                                <span class="float_r width640 <?php if($payinfo_hide=='Y'){?>none<?php // 배송정보 숨김일때 보여주지 않기?>">
                                    <span class='custom2 bold'><?php echo $oinfo['pay_type'];?></span><br/>
<?php if($oinfo['pay_type']=='무통장'){ ?>
                                    입금은행 : <?php echo $oinfo['s_app_info'];?><br>
                                    입금자명 : <?php echo $oinfo['income_name'];?><br>
                                    <?php if($oinfo['deposit']=='0' && $oinfo['deposit_price']=='0'){ echo "<span class='red bold'>미입금</span> ( <span class='bold'>".number_format($oinfo['wdeposit_price'])."</span>원 입금해주시기 바랍니다.)"; } 
                                    else if(
$oinfo['deposit_price']>&& $oinfo['ord_cancel']=='1'){ echo "<span class='blue bold'>환불예정</span>"; }
                                    else if(
$oinfo['deposit_price']>&& $oinfo['wdeposit_price']>0){ echo "<span class='blue bold'>일부입금됨(".number_format($oinfo['deposit_price'])."원)</span>"; }
                                    else { echo 
"<span class='blue bold'>입금완료</span>"; }?>
<?php 
} else if($oinfo['pay_type']=='가상계좌'){ ?>
                                    입금은행 : <?php echo $oinfo['s_app_info'];?><br>
                                    <?php if($oinfo['deposit']=='0'){ echo "<span class='red bold'>미입금</span> ( <span class='bold'>".number_format($oinfo['wdeposit_price'])."</span>원 입금해주시기 바랍니다.)"; } else { echo "<span class='blue bold'>입금완료</span>"; }?>
    <?php if($oinfo['s_app_info']=='' && $oinfo['ord_cancel']=='0'){?>
                                    <a class='mt5 box80_25 white align_c bold l_height25 bg_custom2 order_pay_class'>결제하기</a>
    <?php }?>
<?php 
} else {?>
    <?php if($oinfo['deposit']=='1'){?>
                                <?php echo $oinfo['s_app_info'];?><br>
                                거래번호 : <?php echo $oinfo['s_tno'];?> / 승인번호 : <?php echo $oinfo['s_app_no'];?><br>
                                <font class="gray">승인일시 : <?php echo $oinfo['deposit_time'];?></font>
    <?php } else if($oinfo['ord_cancel']=='0'){?>
                                미입금 <a class='mt5 box80_25 white align_c bold l_height25 bg_custom2 order_pay_class'>결제하기</a>
    <?php }?>
<?php 
}?>
                                </span>
                            </p>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </section>
            <!-- } 결제내역 끝 -->


            <!-- 배송내역 시작 { -->
            <section class="mt30 width_full gray_line_b2">
                <h3 class="mb10 txt14 align_l bold">배송내역</h3>
                <!-- 수령인 시작 { -->
                <div class="float_l width800 p10_20 gray_r_line2 top_bold_line">
                    <table class="width_full">
                        <colgroup>
                            <col class="width100"><col class="">
                        </colgroup>
                        <tbody>
<?php if($visit_take!=""){ // 방문수령시?>
                        <tr>
                            <th scope="row" class="p3_0 gray2 v_align_t align_l">배송방법</th>
                            <td class="p3_0 gray2 l_height25"><?php echo $visit_take;?></td>
                        </tr>
<?php }?>
                        <tr>
                            <th scope="row" class="p3_0 gray2 v_align_t align_l">수령인</th>
                            <td class="p3_0 gray2 l_height25"><?php echo $oinfo['consignee_name'];?></td>
                        </tr>
                        <tr>
                            <th scope="row" class="p3_0 gray2 v_align_t align_l">전화번호</th>
                            <td class="p3_0 gray2 l_height25"><?php echo $oinfo['consignee_telno'];?></td>
                        </tr>
                        <tr>
                            <th scope="row" class="p3_0 gray2 v_align_t align_l">핸드폰</th>
                            <td class="p3_0 gray2 l_height25"><?php echo $oinfo['consignee_hpno'];?></td>
                        </tr>
                        <tr>
                            <th scope="row" class="p3_0 gray2 v_align_t align_l">배송지</th>
                            <td class="p3_0 gray2 l_height25">
                                우편번호 : <?php echo $oinfo['consignee_zipcode'];?><br>
                                <?php echo $oinfo['consignee_addr_m'];?><br>
                                <?php echo $oinfo['consignee_addr_d'];?>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row" class="p3_0 gray2 l_height25 v_align_t align_l">배송메모</th>
                            <td class="p3_0 gray2 l_height25"><?php echo $oinfo['transport_msg'];?></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <!-- } 수령인 끝 -->

                <!-- 주문자 시작 { -->
                <div class="float_l width400 p10_20 top_bold_line">
                    <table class="width_full">
                        <caption class="p15_0 align_l bold">주문자정보</caption>
                        <tbody>
                        <tr>
                            <td class="p3_0 gray2 l_height25"><?php echo $oinfo['s_name'];?></td>
                        </tr>
                        <tr>
                            <td class="p3_0 gray2 l_height25"><?php echo $oinfo['s_hpno'];?></td>
                        </tr>
                        <tr>
                            <td class="p3_0 gray2 l_height25"><?php echo $oinfo['s_email'];?></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <!-- } 주문자 끝 -->
            </section>
            <!-- } 배송내역 끝 -->


            <!--버튼-->
            <div class="mt50 align_c">
                <!--<input type="submit" class="box170_50 white bold line0 bg_custom2 pointer" value="재구매" />-->
<?php
    
if($ord_cancel_do){ // orderview.php의 주문취소 조건을 따름
?>
                <input type="submit" class="box170_50 white bold line0 bg_custom2 pointer order_cancel_class" value="주문취소" />
<?php
    
}
?>
<?php
    
if($ord_delete_do){ // orderview.php의 주문삭제 조건을 따름
?>
                <input type="submit" class="box170_50 white bold line0 bg_custom3 pointer order_delete_class" value="주문삭제" />
<?php
    
}
?>
                <input type="button" onclick="document.location.href='<?php echo $j3_shop_url;?>/order.php';" class="box170_50 custom2 bold align_c bg_white custom_line2 pointer" value="메인" />
            </div>
            <!--//버튼-->

        </div>
        <!-- } 주문상세정보 끝 -->
</div>