주문현황
입금완료미배송내역
미입금주문내역
사용후기
상품문의
';
// 주문상태에 따른 합계 금액
function get_order_status_sum($status)
{
global $g5;
$sql = " select count(*) as cnt,
sum(od_cart_price + od_send_cost + od_send_cost2 - od_cancel_price) as price
from {$g5['g5_shop_order_table']}
where od_status = '$status' ";
$row = sql_fetch($sql);
$info = array();
$info['count'] = (int)$row['cnt'];
$info['price'] = (int)$row['price'];
$info['href'] = './orderlist.php?od_status='.$status;
return $info;
}
// 일자별 주문 합계 금액
function get_order_date_sum($date)
{
global $g5;
$sql = " select sum(od_cart_price + od_send_cost + od_send_cost2) as orderprice,
sum(od_cancel_price) as cancelprice
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date' ";
$row = sql_fetch($sql);
$info = array();
$info['order'] = (int)$row['orderprice'];
$info['cancel'] = (int)$row['cancelprice'];
return $info;
}
// 일자별 결제수단 주문 합계 금액
function get_order_settle_sum($date)
{
global $g5, $default;
$case = array('신용카드', '계좌이체', '가상계좌', '무통장', '휴대폰');
$info = array();
// 결제수단별 합계
foreach($case as $val)
{
$sql = " select sum(od_cart_price + od_send_cost + od_send_cost2 - od_receipt_point - od_cart_coupon - od_coupon - od_send_coupon) as price,
count(*) as cnt
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date'
and od_settle_case = '$val' ";
$row = sql_fetch($sql);
$info[$val]['price'] = (int)$row['price'];
$info[$val]['count'] = (int)$row['cnt'];
}
// 포인트 합계
$sql = " select sum(od_receipt_point) as price,
count(*) as cnt
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date'
and od_receipt_point > 0 ";
$row = sql_fetch($sql);
$info['포인트']['price'] = (int)$row['price'];
$info['포인트']['count'] = (int)$row['cnt'];
// 쿠폰 합계
$sql = " select sum(od_cart_coupon + od_coupon + od_send_coupon) as price,
count(*) as cnt
from {$g5['g5_shop_order_table']}
where SUBSTRING(od_time, 1, 10) = '$date'
and ( od_cart_coupon > 0 or od_coupon > 0 or od_send_coupon > 0 ) ";
$row = sql_fetch($sql);
$info['쿠폰']['price'] = (int)$row['price'];
$info['쿠폰']['count'] = (int)$row['cnt'];
return $info;
}
function get_max_value($arr)
{
foreach($arr as $key => $val)
{
if(is_array($val))
{
$arr[$key] = get_max_value($val);
}
}
sort($arr);
return array_pop($arr);
}
?>
$res[0], // 결과코드
'coin' => $res[1], // 고객 잔액 (충전제만 해당)
'gpay' => $res[2], // 고객의 건수 별 차감액 표시 (충전제만 해당)
'payment' => $res[3] // 요금제 표시, A:충전제, C:정액제
);
}
?>
처리해야할 주문
| 상태변경 |
건수 |
금액 |
| 주문 -> 입금 |
|
|
| 입금 -> 준비 |
|
|
| 준비 -> 배송 |
|
|
| 배송 -> 완료 |
|
|
주문현황
=0; $i--) {
$date = date('Y-m-d', strtotime('-'.$i.' days', G5_SERVER_TIME));
$x_val[] = $date;
$arr_order[] = get_order_date_sum($date);
}
$max_y = get_max_value($arr_order);
$max_y = ceil(($max_y) / 1000) * 1000;
$y_val = array();
$y_val[] = $max_y;
for($i=4; $i>=1; $i--) {
$y_val[] = $max_y * (($i * 2) / 10);
}
$max_height = 240;
$h_val = array();
$js_val = array();
$offset = 10; // 금액이 상대적으로 작아 높이가 0일 때 기본 높이로 사용
foreach($arr_order as $val) {
if($val['order'] > 0)
$h1 = intval(($max_height * $val['order']) / $max_y) + $offset;
else
$h1 = 0;
if($val['cancel'] > 0)
$h2 = intval(($max_height * $val['cancel']) / $max_y) + $offset;
else
$h2 = 0 ;
$h_val['order'][] = $h1;
$h_val['cancel'][] = $h2;
}
?>
결제수단별 주문현황
=0; $i--)
{
$date = date("Y-m-d", strtotime('-'.$i.' days', G5_SERVER_TIME));
$info[$date] = get_order_settle_sum($date);
}
?>
| |
=0; $i--) {
$date = date("Y-m-d", strtotime('-'.$i.' days', G5_SERVER_TIME));
$info[$date] = get_order_settle_sum($date);
$day = substr($date, 5, 5).' ('.get_yoil($date).')';
$info_key[] = $date;
?>
|
| 건수 |
금액 |
|
|
|
1:1문의
1:1문의 목록
| 분류 |
제목 |
작성자 |
보기 |
|
|
|
보기 |
자료가 없습니다. | ';
?>
상품문의
상품문의 목록
| 회원명 |
제목 |
수정 |
|
|
수정 |
자료가 없습니다. | ';
?>
사용후기
사용후기 목록
| 회원명 |
제목 |
수정 |
|
|
![<?php cut_str($row['is_subject'],40); ?> 수정](./img/icon_mod.jpg) |
자료가 없습니다. | ';
?>
주문현황
입금완료 미배송내역
입금완료 미배송내역
| 주문번호 |
주문자 |
입금액 |
결제방법 |
수정 |
0 and od_misu <= 0 and od_invoice = ''
order by od_id desc
limit $max_limit ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row1 = sql_fetch($sql1);
$name = get_sideview($row['mb_id'], get_text($row['od_name']), $row1['mb_email'], $row1['mb_homepage']);
$settle_method = "";
if ($row['od_settle_case'])
{
$settle_method = $row['od_settle_case'];
}
else
{
$settle_method .= '미입력';
if ($row['od_receipt_point']) $settle_method .= '포인트';
}
?>
|
|
|
|
수정 |
자료가 없습니다. | ';
?>
미입금 주문내역
미입금 주문내역
| 주문번호 |
주문자 |
주문액 |
결제방법 |
수정 |
0
order by od_id desc
limit $max_limit ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row1 = sql_fetch($sql1);
$name = get_sideview($row['mb_id'], get_text($row['od_name']), $row1['mb_email'], $row1['mb_homepage']);
$settle_method = "";
if ($row['od_settle_case'])
{
$settle_method = $row['od_settle_case'];
}
else
{
$settle_method .= '미입력';
if ($row['od_receipt_point']) $settle_method .= '포인트';
}
?>
|
|
|
|
수정 |
자료가 없습니다. | ';
?>
*/ ?>