/home/mjc1/public_html/j3demo/shop/order.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
<?php
include_once("./_common.php");
include_once(
$j3_shop_path."/shop_header.php");

if(
$_POST['s_name']!='' && $_POST['s_email']!='' && $id_ccode=='0'){
    
$_SESSION['ss_s_name'] = $_POST['s_name'];
    
$_SESSION['ss_s_email'] = $_POST['s_email'];
}

if(
$id_ccode!=''){ 
    
$list_num $config['page_line'];
    if (
$page 1) { $page 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
    
$get_row "Y"// 장바구니 정보를 가져옴
    
$list_array customer_order_list($id_ccode$where2$page$list_num);

    
$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'];
} else {
    
alert("회원만 가능한 페이지 입니다. 로그인하시기 바랍니다.","{$j3_shop_url}/login.php");
}

?>
<div id="container">
    <div id="wrapper">

<?php
    skin_module_show
("orderlist",$sample_idx); // 주문리스트 스킨을 불러온다.
    
if($id_ccode=='0' && $configshop['guest_buy']=='1'){
?>
        <div class="mt50 align_c">
            <input type="submit" class="box170_50 white bold line0 bg_custom2 pointer gust_order_class" value="비회원주문조회" />
        </div>
<?php
    
}
?>

    </div><!-- #wrapper -->
</div><!-- #container -->
<script>
$(function(){
    $(".prod_use_class").click(function(){ // 상품 후기 작성
        $idx = $(this).closest("tr").find("input[name='midx']").val();
        $.get("order_prod_use_reg.inc.php?idx="+$idx,function(rtn){
            $("#modal_member_box").html(rtn).dialog({
                resizable: true, height:900, width:820, modal: true, title:"상품후기 [작성]",
                buttons: {
                    저장: function() {
                        prod_use_save();
                    },
                    닫기: function() {
                        $( this ).dialog( "close" );
                    }
                }
            });
        })
    });
    
    $(".prod_deli_comp_class").click(function(){ // 고객 수령완료 처리
        if(confirm('수령완료 처리 하시겠습니까?')){
            $idx = $(this).closest("tr").find("input[name='midx']").val();
            form_data = "mode=deli_comp&idx="+$idx;
            $.ajax({type:"post", url:"ajax.orderlist_process.php", data:form_data, async:false, dataType : "xml", 
                success:function(xml){    
                    var v_mode = $(xml).find("mode").text();
                    var v_mode_ok = $(xml).find("mode_ok").text();
                    var v_msg = $(xml).find("msg").text();
                    if(v_mode_ok!='Y'){
                        alert(v_msg);
                    } else {
                        document.location.reload();
                    }
                },
                error:function(rtn,status,error){    alert(error);        }
            });
        }
    });

    $(".deli_detail_search").click(function(){
        $deli_company = $("#deli_company").val();
        $tracking_number = $("#tracking_number").val();
        alert("네이버 배송조회를 통해서 조회합니다. 검색창에서 조회버튼을 누르세요.");
        window.open("https://search.naver.com/search.naver?where=nexearch&sm=top_hty&fbm=1&ie=utf8&query="+$deli_company+"+"+$tracking_number,"deli_search","width=1024, height=768, scollbars=yes");
    });

    $(".gust_order_class").click(function(){
        $("#modal_member_box2").dialog({
            resizable: true, height:350, width:600, modal: true, title:"",
            buttons: {
                "조회하기": function() {
                    guest_order_list();
                }
            }
        });
    });
});

function guest_order_list(){
    $form_obj = $("#gust_order_form");
    if($form_obj.find("input[name='s_name']").val()==''){
        alert('주문자명을 입력하시기 바랍니다.'); return;
    }
    if($form_obj.find("input[name='s_email']").val()==''){
        alert('주문자이메일을 입력하시기 바랍니다.'); return;
    }
    $form_obj.submit();
}

function modal_close(){
    setTimeout(function(){
        $("#modal_member_box").dialog("close");
    },500);
    
}
</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>
<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 class="p10_20">
<form name='gust_order_form' id='gust_order_form' method='post' action="?">
        <table class="width_full top_bold_line">
            <caption class="mt10 mb10 l_height30 txt17 align_l bold">비회원 주문조회 <!--<a><span class="more float_r pl10 box120_30 txt13 gray_line">나의 상담내역</span></a>--></caption>
            <colgroup>
                <col class="width140"><col><col class="width300">
            </colgroup>

            <tbody>
            <tr>
                <td class="p10_20 align_c v_align_t gray_line_b2 bg_gray">주문자명</td>
                <td colspan="3" class="p10_20 txt14 gray2 gray_line_b2 bg_gray l_height25">
                    <input type='text' name='s_name' class='box120_30 gray_line' value=''>
                </td>
            </tr>
            <tr>
                <td class="p10_20 align_c v_align_t gray_line_b2 bg_gray">주문자이메일 or 주문자핸드폰</td>
                <td colspan="3" class="p10_20 txt14 gray2 gray_line_b2 bg_gray l_height25">
                    <input type='text' name='s_email' class='box200_30 gray_line' value=''>
                </td>
            </tr>

        </table>
</form>
    </div>
</div>