#196 주문 메일에서 옵션 출력 코드 수정
This commit is contained in:
@ -17,42 +17,15 @@ if ($od_send_mail)
|
|||||||
unset($point_list);
|
unset($point_list);
|
||||||
unset($delivery_list);
|
unset($delivery_list);
|
||||||
|
|
||||||
$sql = " select a.*,
|
$sql = " select *
|
||||||
b.it_opt1_subject,
|
from {$g4['shop_cart_table']}
|
||||||
b.it_opt2_subject,
|
where uq_id = '{$od['uq_id']}'
|
||||||
b.it_opt3_subject,
|
order by ct_id ";
|
||||||
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 ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for ($i=0; $ct=mysql_fetch_array($result); $i++) {
|
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 = "<br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($s_option == "") {
|
|
||||||
$s_option = "없음";
|
|
||||||
}
|
|
||||||
|
|
||||||
$cart_list[$i]['it_id'] = $ct['it_id'];
|
$cart_list[$i]['it_id'] = $ct['it_id'];
|
||||||
$cart_list[$i]['it_name'] = $ct['it_name'];
|
$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'];
|
$ct_status = $ct['ct_status'];
|
||||||
if ($ct_status == "준비") {
|
if ($ct_status == "준비") {
|
||||||
|
|||||||
@ -32,12 +32,29 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
|||||||
and uq_id = '$tmp_uq_id' ";
|
and uq_id = '$tmp_uq_id' ";
|
||||||
$sum = sql_fetch($sql);
|
$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 .= '<ul>'.PHP_EOL;
|
||||||
|
$options .= '<li>'.$row2['ct_option'].' '.$row2['ct_qty'].'개</li>'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($k > 0)
|
||||||
|
$options .= '</ul>';
|
||||||
|
|
||||||
$list[$i]['g_dir'] = G4_URL;
|
$list[$i]['g_dir'] = G4_URL;
|
||||||
$list[$i]['it_id'] = $row['it_id'];
|
$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_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_name'] = $row['it_name'];
|
||||||
$list[$i]['it_origin'] = $row['it_origin'];
|
$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]['ct_price'] = $row['ct_price'];
|
||||||
$list[$i]['stotal_amount'] = $sum['price'];
|
$list[$i]['stotal_amount'] = $sum['price'];
|
||||||
$list[$i]['stotal_point'] = $sum['point'];
|
$list[$i]['stotal_point'] = $sum['point'];
|
||||||
|
|||||||
@ -46,10 +46,27 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
|||||||
{
|
{
|
||||||
unset($list);
|
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 .= '<ul>'.PHP_EOL;
|
||||||
|
$options .= '<li>'.$row2['ct_option'].' '.$row2['ct_qty'].'개</li>'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($k > 0)
|
||||||
|
$options .= '</ul>';
|
||||||
|
|
||||||
$list['it_id'] = $row['it_id'];
|
$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_simg'] = get_it_image($row['it_id'], $default['de_simg_width'], $default['de_simg_height']);
|
||||||
$list['it_name'] = $row['it_name'];
|
$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.'님)';
|
$subject = $config['cf_title'].' - 주문 알림 메일 (주문자 '.$od_name.'님)';
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|||||||
Reference in New Issue
Block a user