/home/mjc1/public_html/j3demo/skinm/cart/cart01.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
<?php
Global $custinfo$od_id$list_array$total_page$list_num$total_count;
qstr_extract($_SERVER['QUERY_STRING']); // $qstr을 $_GET변수에 넣는다.
extract($_GET); // $_GET를 변수로 풀어준다.
$cate urldecode($cate);

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

$tot_deli_pirce $list_array[0]['tot_deli_price']; // 전체배송비 가져옴

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

</style>
<?php }?>
<div class="class_skin_idx_<?php echo $sk_idx;?>">
<h1 class="p15_0 align_c">장바구니</h1>

        <p class="p0_10 txt14 l_height40 gray_line_t gray_line_b2">
            <input type="checkbox" class='check_all_class mr5 box17'><label class="bold">전체선택</label>
            <span class="float_r">장바구니상품 (총 <em class="red bold"><?php echo $total_count;?></em>개)</span>
        </p>

<form name='cart_list_form' id='cart_list_form' method='post' onsubmit='return false;'>
    <input type='hidden' name='sel_del' id='sel_del' value=''>
        <!-- 장바구니목록 -->
        <div>
            <h2 class="screen_out">주문정보</h2>
<?php
    $cnt 
0;
    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']!=''){

            
$opt_name ""$addopt_name ""
            
$t_qty $info['ct_qty'];
            
$t_point $info['ct_qty']*$info['ct_point'];
            
/*if($info['opt_mode']!=''){
                $t_price = $info['ct_qty']*$info['opt_price'];
            } else {
                $t_price = $info['ct_qty']*$info['ct_price'];
            }*/
            
$t_price $info['ct_tot_amt'];

            
$ii $i+1;

            if(
$info['opt_mode']=='opt'){
                
$opt_name $info['opt_name']."({$buho}".number_format($info['opt_price']).")<br>";
            } else if(
$info['opt_mode']=='addopt'){
                
$addopt_name $info['opt_name']."({$buho}".number_format($info['opt_price']).")<br>";
            }
            
            if(
$info['opt_mode']!=''){ // 옵션상품일경우 옵션정보를 받아온다.
                
if($info['opt_price']>0){ $buho "+"; } else { $buho ""; }
            }

            while(
$list_array[$ii]['pcode']==$info['pcode'] && $list_array[$ii]['ev_code']==$info['ev_code']){ // 단일 상품이 아닌 여러옵션이나 추가옵션있는지 확인한다.
                
$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_price += $nextinfo['ct_tot_amt'];
                
$t_point += $nextinfo['ct_qty']*$nextinfo['ct_point'];

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

            
$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']); // 재고 받아옴
?>
            <!-- 상품1 -->
            <section class="p10_0 p0_10 gray_line_b2 separate_line">
                <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'];?>'>
                <input type='hidden' name='p_pack_buy[]' value='<?php echo $info['p_pack_buy'];?>'>
                <input type='hidden' name='p_ev_code[]' value='<?php echo $info['ev_code'];?>'>

                <dl class="p5_0 relative width_full height80 gray_line_b">
                    <dt class="float_l width30">
                        <input type='checkbox' name='code_idx[]' value='<?php echo $cnt;?>' class='code_idx_calss box17'>
                    </dt>
                    <dt class="float_l mr5 width80">
                        <img src="<?php echo $thumb_file get_it_thumbnail($info['pcode'],$info['pic1'],80,80);?>" alt="제품이미지" class="">
                    </dt>
                    <dd class="float_r width_66">
                        <div class="width_full ellipsis txt14 bold"><?php echo $info['ct_name'];?><p class="mt5 txt13"><?php echo $info['norm'];?></p></div>
                    </dd>
                </dl>
                <dl class="mt7 pt5 p0_10 gray_line bg_gray">
                    <dt class="mb10 relative height_full gray txt13">
                        <?php echo $opt_name;?>
                        <?php if($info['opt_mode']!='' || $addopt_name){?>
                            <input type="button" value="주문조건 추가/변경" class="mt7 width_full height26 white txt13 l_height24 none_line bg_custom1 opt_ch_class">
                        <?php }?>
                        <?php if($addopt_name!=''){?>
                            <p class='l_height24'><?php echo $addopt_name;?></p>
                        <?php }?>
                    </dt>
                    <dd class="float_l pb10 height26">
                        <label class="screen_out">수량</label>
                        <div class="relative float_l mr5 width100 height24 l_height24 gray_line">
                            <input type="text" name='ct_qty[]' title="구매수량" value="<?php echo $t_qty;?>" class="absolute ab_top_left25 width50 height24 align_c none_line">
                            <a class="absolute ab_top_right box24 gray_line_l <?php if($info['opt_mode']=='' &&  $addopt_name==''){?>qty_plus_class<?php }?>" style="background:url('<?php echo $j3_url;?>/img/mobile/item.png') 0px -38px no-repeat;"><span class="screen_out">증가</span></a>
                            <a class="absolute ab_top_left box24 gray_line_r <?php if($info['opt_mode']=='' &&  $addopt_name==''){?>qty_minus_class<?php }?>" style="background:url('<?php echo $j3_url;?>/hjwcs3/img/mobile/item.png') 0px -15px no-repeat;"><span class="screen_out">감소</span></a>
                        </div>
                        <?php if($info['opt_mode']=='' &&  $addopt_name==''){?>
                        <input type="button" value="변경" class="width50 height26 txt14 l_height24 gray_line bg_white qty_ch_class">
                        <?php }?>
                    </dd>
                    <dd class="pb10 height26 align_r txt17 bold l_height24"><?php echo number_format($t_price);?><span class="txt12">원</span></dd>
                </dl>
                <div class="mt_1 p7_0 p0_10 gray_line">
                    <table class="width_full txt13 align_l l_height19">
                        <colgroup>
                            <col class="width_30"><col class="width_70">
                        </colgroup>
                        <tr class='screen_out'>
                            <th class="gray3">총 상품금액</th>
                            <td class="align_r gray txt12"><em class="black bold">28,900</em>원</td>
                        </tr>
                        <tr>
                            <th class="gray3">배송비</th>
                            <td class="align_r gray txt12"><em class="black bold"><?php echo $p_deli_price?></em></td>
                        </tr>
                        <tr>
                            <th class="gray3">포인트</th>
                            <td class="align_r gray txt12">(+) <em class="black bold"><?php echo number_format($t_point);?></em>원</td>
                        </tr>
                        <tr class='screen_out'>
                            <th class="gray3">결제금액</th>
                            <td class="align_r gray txt12"><em class="red txt17 bold">31,000</em>원</td>
                        </tr>
                    </table>
                </div>

                <div class="mt7 height32 screen_out">
                    <a class="block float_l width_49 height30 custom2 txt14 align_c l_height30 bg_white custom_line2">상품삭제</a>
                    <a class="block float_r width_49 height32 white txt14 align_c l_height32 bg_custom2">주문하기</a>
                </div>
            </section>
<?php
            $cnt
++;
        }
    }
    if(
$cnt==0){ // 장바구니가 없을때
?>
            <section class="p10_0 p0_10 gray_line_b2 separate_line height80 align_c">
                장바구니에 담긴 상품이 없습니다.
            </section>
<?php
    
}

    if(
$tot_deli_pirce>0){
        
$deli_price_title "(+)".number_format($tot_deli_pirce);
    } else {
        
$deli_price_title "0";
    }
    
$total_price $all_price+$tot_deli_pirce;
?>
            <!-- //상품1 -->
        </div>
        <!-- //장바구니목록 -->
</form>

        <!-- 전체선택 -->
        <p class="p0_10 txt14 l_height40 gray_line_b2 separate_line">
            <input type="checkbox" class='check_all_class mr5 box17'><label class="bold">전체선택</label>
        </p>
        <!-- //전체선택 -->

        <section class="gray_line_b2 separate_line">
            <h3 class="p0_10 txt14 l_height35 gray_line_b2">최종결제금액</h3>
            <table class="m10_0 float_c width_96 txt14 l_height24">
                <colgroup>
                    <col class="width_30"><col class="width_70">
                </colgroup>
                <tr>
                    <th class="pl10 gray3 align_l">총 상품금액</th>
                    <td class="pr10 align_r"><em class="custom1 txt17 bold"><?php echo number_format($all_price);?></em>원</td>
                </tr>
                <tr>
                    <th class="pl10 gray3 align_l">배송비</th>
                    <td class="pr10 align_r"><em class="black txt17 bold"><?php echo $deli_price_title;?></em>원</td>
                </tr>
                <tr>
                    <th class="pl10 gray3 align_l">포인트</th>
                    <td class="pr10 align_r">(+) <em class="custom2 txt17 bold"><?php echo number_format($all_point);?></em>원</td>
                </tr>
                <tr>
                    <th class="pl10 gray3 align_l l_height35 bg_gray">결제금액</th>
                    <td class="pr10 align_r l_height35 bg_gray"><em class="red txt17 bold"><?php echo number_format($total_price);?></em>원</td>
                </tr>
            </table>
        </section>
        <!-- //전체선택 -->

        <section class="p15_0 p0_10 height35 bg_gray">
            <input type="submit" value="선택주문" class="float_l mr5 width_triple height37 white txt15 l_height37 none_line bg_custom1 pointer cart_sel_order_class"/>
            <input type="submit" value="전체주문" class="float_l mr5 width_triple height37 white txt15 l_height37 none_line bg_custom3 pointer cart_order_class"/>
            <input type="submit" value="선택삭제" class="float_l width_triple height37 txt15 l_height35 gray_line4 bg_white pointer cart_sel_del_class"/>
        </section>
</div>