From 833e96c91f046d184b65846081a4e226c72ed7a5 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 30 May 2013 10:58:19 +0900 Subject: [PATCH] =?UTF-8?q?#204=20=EA=B4=80=EB=A6=AC=EC=9E=90=20=EC=A3=BC?= =?UTF-8?q?=EB=AC=B8=EC=83=81=EC=84=B8=20=EC=83=81=ED=92=88=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=B3=80=EA=B2=BD=20=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/orderform.php | 206 ++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 100 deletions(-) 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 = '