diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index 89c3c5b1a..e6a0e2874 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -86,37 +86,22 @@ if ($default['de_card_test']) { $g4['shop_cardpg']['kcp'] = "http://testadmin8.kcp.co.kr"; } -$sql = " select ct_id, - it_id, - it_name, - ct_qty, - ct_option, - ct_price, - ct_point, - ct_status, - ct_time, - ct_point_use, - ct_stock_use, - io_type, - io_price, - ct_num +// 주문총액 +$sql = " select SUM(IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_order + from {$g4['shop_cart_table']} + where uq_id = '{$od['uq_id']}' "; +$row = sql_fetch($sql); +$total_order = $row['sum_order']; + +// 상품목록 +$sql = " select it_id, + it_name from {$g4['shop_cart_table']} where uq_id = '{$od['uq_id']}' + and ct_num = '0' order by ct_id "; $result = sql_query($sql); -$lines = array(); -$total_order = 0; -for($i=0; $row=sql_fetch_array($result); $i++) { - $lines[$i] = $row; - if($row['io_type']) - $total_price = $row['io_price'] * $row['ct_qty']; - else - $total_price = ($row['ct_price'] + $row['io_price']) * $row['ct_qty']; - $lines[$i]['price'] = $total_price; - $total_order += $total_price; -} - $pg_anchor = '