diff --git a/adm/shop_admin/deliverylist.php b/adm/shop_admin/deliverylist.php index a750a5873..fc81c82f7 100644 --- a/adm/shop_admin/deliverylist.php +++ b/adm/shop_admin/deliverylist.php @@ -34,7 +34,7 @@ if ($sel_ca_id != "") { if ($sel_field == "") $sel_field = "od_id"; $sql_common = " from {$g4['shop_order_table']} a - left join {$g4['shop_cart_table']} b on (a.uq_id=b.uq_id) + left join {$g4['shop_cart_table']} b on (a.od_id=b.od_id) $sql_search "; // 테이블의 전체 레코드수만 얻음 @@ -171,7 +171,6 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 - diff --git a/adm/shop_admin/deliverylistupdate.php b/adm/shop_admin/deliverylistupdate.php index f8c2b29c7..3ecde04b1 100644 --- a/adm/shop_admin/deliverylistupdate.php +++ b/adm/shop_admin/deliverylistupdate.php @@ -51,18 +51,17 @@ for ($m=0; $m 0 diff --git a/adm/shop_admin/ordercartupdate.php b/adm/shop_admin/ordercartupdate.php index b12f8578d..fce4a9548 100644 --- a/adm/shop_admin/ordercartupdate.php +++ b/adm/shop_admin/ordercartupdate.php @@ -44,7 +44,7 @@ for ($i=0; $i<$cnt; $i++) $ct_id = $_POST['ct_id'][$k]; $sql = " select * from {$g4['shop_cart_table']} - where uq_id = '$uq_id' + where od_id = '$od_id' and ct_id = '$ct_id' "; $ct = sql_fetch($sql); if(!$ct['ct_id']) @@ -76,7 +76,7 @@ for ($i=0; $i<$cnt; $i++) $sql = " update {$g4['shop_cart_table']} set ct_qty = '$ct_qty' where ct_id = '$ct_id' - and uq_id = '$uq_id' "; + and od_id = '$od_id' "; sql_query($sql); $mod_history .= G4_TIME_YMDHIS.' '.$ct['ct_option'].' 수량변경 '.$ct['ct_qty'].' -> '.$ct_qty."\n"; } @@ -141,7 +141,7 @@ for ($i=0; $i<$cnt; $i++) { $point_use = 0; //insert_point($mb_id, (-1) * ($ct[ct_point] * $ct[ct_qty]), "주문번호 $od_id ($ct_id) 취소"); - delete_point($mb_id, "@delivery", $mb_id, "$od_id,$uq_id,$ct_id"); + delete_point($mb_id, "@delivery", $mb_id, "$od_id,$ct_id"); } // 히스토리에 남김 @@ -153,7 +153,7 @@ for ($i=0; $i<$cnt; $i++) ct_stock_use = '$stock_use', ct_status = '$ct_status', ct_history = CONCAT(ct_history,'$ct_history') - where uq_id = '$uq_id' + where od_id = '$od_id' and ct_id = '$ct_id' "; sql_query($sql); } diff --git a/adm/shop_admin/orderdelete.php b/adm/shop_admin/orderdelete.php index f4999a7b3..540324719 100644 --- a/adm/shop_admin/orderdelete.php +++ b/adm/shop_admin/orderdelete.php @@ -6,16 +6,16 @@ check_demo(); auth_check($auth[$sub_menu], "d"); -if ($od_id && $uq_id) +if ($od_id) { // 장바구니 삭제 - sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$uq_id' "); + sql_query(" delete from {$g4['shop_cart_table']} where od_id = '$od_id' "); // 카드결제내역 삭제 - sql_query(" delete from {$g4['shop_card_history_table']} where od_id = '$od_id' and uq_id = '$uq_id' "); + sql_query(" delete from {$g4['shop_card_history_table']} where od_id = '$od_id' "); // 주문서 삭제 - sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' "); + sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' "); } if ($return_url) diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index 3e12eeba9..f511f5621 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -43,14 +43,14 @@ if (!isset($order_not_point)) { for ($i=0; $row=sql_fetch_array($result); $i++) { // 회원 ID 를 얻는다. - $tmp_row = sql_fetch("select od_id, mb_id from {$g4['shop_order_table']} where uq_id = '{$row['uq_id']}' "); + $tmp_row = sql_fetch("select od_id, mb_id from {$g4['shop_order_table']} where od_id = '{$row['od_id']}' "); // 회원이면서 포인트가 0보다 크다면 if ($tmp_row['mb_id'] && $row['ct_point'] > 0) { $po_point = $row['ct_point'] * $row['ct_qty']; $po_content = "$cart_title3 {$tmp_row['od_id']} ({$row['ct_id']}) $cart_title4"; - insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['uq_id']},{$row['ct_id']}"); + insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['ct_id']}"); } sql_query("update {$g4['shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' "); @@ -95,7 +95,7 @@ $sql = " select it_id, cp_amount, ct_notax from {$g4['shop_cart_table']} - where uq_id = '{$od['uq_id']}' + where od_id = '{$od['od_id']}' and ct_num = '0' order by ct_id "; $result = sql_query($sql); @@ -123,7 +123,6 @@ $pg_anchor .='
  • 결제상세정보 확인
  • - @@ -172,7 +171,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • // 상품의 옵션정보 $sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price from {$g4['shop_cart_table']} - where uq_id = '{$od['uq_id']}' + where od_id = '{$od['od_id']}' and it_id = '{$row['it_id']}' order by ct_num "; $res = sql_query($sql); @@ -291,7 +290,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • - + @@ -332,7 +331,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • break; } - $sql = " select it_name, ct_option from {$g4['shop_cart_table']} where uq_id = '{$od['uq_id']}' and ct_id = '$rq_ct_id' "; + $sql = " select it_name, ct_option from {$g4['shop_cart_table']} where od_id = '{$od['od_id']}' and ct_id = '$rq_ct_id' "; $rq_ct = sql_fetch($sql); $rq_subject = $rq_row['rq_time'].' '.$rq_ct['it_name'].' '.$rq_ct['ct_option']; if($rq_item_count > 1) @@ -340,7 +339,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • $rq_subject .= ' '.$type.'요청'; if($rq_row['rq_id'] != $rq_id) { - $order_href = './orderform.php?od_id='.$od['od_id'].'&uq_id='.$od['uq_id'].'&rq_id='.$rq_row['rq_id'].'&'.$qstr.'#anc_sodr_request'; + $order_href = './orderform.php?od_id='.$od['od_id'].'&rq_id='.$rq_row['rq_id'].'&'.$qstr.'#anc_sodr_request'; $rq_subject = ''.$rq_subject.''; } @@ -550,7 +549,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • 현금영수증 확인 - 현금영수증 발급 + 현금영수증 발급 @@ -929,7 +928,7 @@ $pg_anchor .='
  • 결제상세정보 확인
  • diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php index a58152bb4..93948fe99 100644 --- a/adm/shop_admin/orderlist.php +++ b/adm/shop_admin/orderlist.php @@ -24,12 +24,12 @@ if ($search != "") $page = 1; } -if ($sel_field == "") $sel_field = "od_id"; -if ($sort1 == "") $sort1 = "od_id"; +if ($sel_field == "") $sel_field = "a.od_id"; +if ($sort1 == "") $sort1 = "a.od_id"; if ($sort2 == "") $sort2 = "desc"; $sql_common = " from {$g4['shop_order_table']} a - left join {$g4['shop_cart_table']} b on (a.uq_id=b.uq_id) + left join {$g4['shop_cart_table']} b on (a.od_id=b.od_id) $sql_search "; // 김선용 200805 : 조인 사용으로 전체카운트가 일정레코드 이상일 때 지연시간 문제가 심각하므로 변경 @@ -37,7 +37,7 @@ $sql_common = " from {$g4['shop_order_table']} a $result = sql_query(" select DISTINCT od_id ".$sql_common); $total_count = mysql_num_rows($result); */ -$sql = " select count(distinct od_id) as cnt " . $sql_common; +$sql = " select count(distinct a.od_id) as cnt " . $sql_common; $row = sql_fetch($sql); $total_count = $row['cnt']; @@ -103,7 +103,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 - + @@ -102,7 +102,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌