diff --git a/adm/shop_admin/ordermail.inc.php b/adm/shop_admin/ordermail.inc.php index 822b35932..6a2fd59d0 100644 --- a/adm/shop_admin/ordermail.inc.php +++ b/adm/shop_admin/ordermail.inc.php @@ -17,42 +17,15 @@ if ($od_send_mail) unset($point_list); unset($delivery_list); - $sql = " select a.*, - b.it_opt1_subject, - b.it_opt2_subject, - b.it_opt3_subject, - b.it_opt4_subject, - b.it_opt5_subject, - b.it_opt6_subject - from {$g4['shop_cart_table']} a inner join {$g4['shop_item_table']} b on (b.it_id=a.it_id) - where a.uq_id = '{$od['uq_id']}' - order by a.ct_id "; + $sql = " select * + from {$g4['shop_cart_table']} + where uq_id = '{$od['uq_id']}' + order by ct_id "; $result = sql_query($sql); for ($i=0; $ct=mysql_fetch_array($result); $i++) { - // 상품 옵션 - $s_option = ""; - $str_split = ""; - for ($k=1; $k<=6; $k++) { - if ($ct["it_opt{$k}"] == "") { - continue; - } - - $s_option .= $str_split; - $it_opt_subject = $ct["it_opt{$k}_subject"]; - - unset($opt); - $opt = explode( ";", trim($ct["it_opt{$k}"]) ); - $s_option .= "$it_opt_subject = $opt[0]"; - $str_split = "
"; - } - - if ($s_option == "") { - $s_option = "없음"; - } - $cart_list[$i]['it_id'] = $ct['it_id']; $cart_list[$i]['it_name'] = $ct['it_name']; - $cart_list[$i]['it_opt'] = $s_option; + $cart_list[$i]['it_opt'] = $ct['ct_option']; $ct_status = $ct['ct_status']; if ($ct_status == "준비") { diff --git a/shop/ordermail1.inc.php b/shop/ordermail1.inc.php index 5ab60015a..b68098780 100644 --- a/shop/ordermail1.inc.php +++ b/shop/ordermail1.inc.php @@ -32,12 +32,29 @@ for ($i=0; $row=sql_fetch_array($result); $i++) and uq_id = '$tmp_uq_id' "; $sum = sql_fetch($sql); + // 옵션정보 + $sql2 = " select ct_option, ct_qty + from {$g4['shop_cart_table']} + where it_id = '{$row['it_id']}' and uq_id = '$tmp_uq_id' + order by io_type asc, ct_num asc, ct_id asc "; + $result2 = sql_query($sql2); + + $options = ''; + for($k=0; $row2=sql_fetch_array($result2); $k++) { + if($k == 0) + $options .= ''; + $list[$i]['g_dir'] = G4_URL; $list[$i]['it_id'] = $row['it_id']; $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_origin'] = $row['it_origin']; - $list[$i]['it_opt'] = print_item_options($row['it_id'], $tmp_uq_id); + $list[$i]['it_opt'] = $options; $list[$i]['ct_price'] = $row['ct_price']; $list[$i]['stotal_amount'] = $sum['price']; $list[$i]['stotal_point'] = $sum['point']; diff --git a/shop/ordermail2.inc.php b/shop/ordermail2.inc.php index 9cdb9d310..9e33bd04a 100644 --- a/shop/ordermail2.inc.php +++ b/shop/ordermail2.inc.php @@ -46,10 +46,27 @@ for ($i=0; $row=sql_fetch_array($result); $i++) { unset($list); + // 옵션정보 + $sql2 = " select ct_option, ct_qty + from {$g4['shop_cart_table']} + where it_id = '{$row['it_id']}' and uq_id = '$tmp_uq_id' + order by io_type asc, ct_num asc, ct_id asc "; + $result2 = sql_query($sql2); + + $options = ''; + for($k=0; $row2=sql_fetch_array($result2); $k++) { + if($k == 0) + $options .= ''; + $list['it_id'] = $row['it_id']; $list['it_simg'] = get_it_image($row['it_id'], $default['de_simg_width'], $default['de_simg_height']); $list['it_name'] = $row['it_name']; - $list['it_opt'] = print_item_options($row['it_id'], $tmp_uq_id); + $list['it_opt'] = $options; $subject = $config['cf_title'].' - 주문 알림 메일 (주문자 '.$od_name.'님)'; ob_start();