From fab9c27ccae7a1ae2ec168ac7f65e171bbc0c67f Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 10 Jun 2013 11:56:21 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=90=EB=A7=A4=EC=9E=90=20=EB=B0=9C?= =?UTF-8?q?=EC=86=A1=20=EB=A9=94=EC=9D=BC=EC=97=90=20=ED=8C=90=EB=A7=A4?= =?UTF-8?q?=EA=B0=80=EA=B2=A9=20=EB=82=98=EC=98=A4=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8D=98=20=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 --- shop/ordermail2.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shop/ordermail2.inc.php b/shop/ordermail2.inc.php index 7569e7fc3..383110162 100644 --- a/shop/ordermail2.inc.php +++ b/shop/ordermail2.inc.php @@ -45,6 +45,15 @@ $sql = " select b.it_sell_email, $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { + // 합계금액 계산 + $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, + SUM(ct_point * ct_qty) as point, + SUM(ct_qty) as qty + from {$g4['shop_cart_table']} + where it_id = '{$row['it_id']}' + and uq_id = '$tmp_uq_id' "; + $sum = sql_fetch($sql); + // 옵션정보 $sql2 = " select ct_option, ct_qty from {$g4['shop_cart_table']} @@ -68,6 +77,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) $list[$i]['it_simg'] = get_it_image($row['it_id'], $default['de_simg_width'], $default['de_simg_height']); $list[$i]['it_name'] = $row['it_name']; $list[$i]['it_opt'] = $options; + $list[$i]['ct_price'] = $sum['price']; $subject = $config['cf_title'].' - 주문 알림 메일 (주문자 '.$od_name.'님)'; ob_start();