From 5edf09388aa3eb4b1d5e1fbdabcc9bdb853bac11 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 31 Jan 2017 11:50:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A3=BC=EB=AC=B8=EB=82=B4=EC=97=AD=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/ajax.orderitem.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/adm/shop_admin/ajax.orderitem.php b/adm/shop_admin/ajax.orderitem.php index 7fe63b358..0070f699a 100644 --- a/adm/shop_admin/ajax.orderitem.php +++ b/adm/shop_admin/ajax.orderitem.php @@ -76,7 +76,16 @@ $result = sql_query($sql); // 조건부무료 if($row['it_sc_type'] == 2) { - $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id); + + // 합계금액 계산 + $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, + SUM(ct_qty) as qty + from {$g5['g5_shop_cart_table']} + where it_id = '{$row['it_id']}' + and od_id = '$od_id' "; + $sum = sql_fetch($sql); + + $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $od_id); if($sendcost == 0) $ct_send_cost = '무료';