Esempio n. 1
0
     if ($i > 0) {
         $good_info .= chr(30);
     }
     $good_info .= "seq=" . ($i + 1) . chr(31);
     $good_info .= "ordr_numb={$od_id}_" . sprintf("%04d", $i) . chr(31);
     $good_info .= "good_name=" . addslashes($row['it_name']) . chr(31);
     $good_info .= "good_cntx=" . $row['ct_qty'] . chr(31);
     $good_info .= "good_amtx=" . $row['ct_price'] . chr(31);
 }
 $a1 = '<strong>';
 $a2 = '</strong>';
 $image_width = 80;
 $image_height = 80;
 $image = get_it_image($row['it_id'], $image_width, $image_height);
 $it_name = $a1 . stripslashes($row['it_name']) . $a2;
 $it_options = print_item_options($row['it_id'], $s_cart_id);
 if ($it_options) {
     $it_name .= '<div class="sod_opt">' . $it_options . '</div>';
 }
 // 복합과세금액
 if ($default['de_tax_flag_use']) {
     if ($row['it_notax']) {
         $comm_free_mny += $sum['price'];
     } else {
         $tot_tax_mny += $sum['price'];
     }
 }
 $point = $sum['point'];
 $sell_price = $sum['price'];
 // 쿠폰
 if ($is_member) {
Esempio n. 2
0
$sql .= " group by a.it_id ";
$sql .= " order by a.ct_id ";
$result = sql_query($sql);
$cart_count = sql_num_rows($result);
if (!$cart_count) {
    alert_close('조회하실 주문정보가 없습니다.');
}
$it_send_cost = 0;
$item = array();
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,\n\t\t\t\t\tSUM(ct_point * ct_qty) as point,\n\t\t\t\t\tSUM(ct_qty) as qty\n\t\t\t\tfrom {$g5['g5_shop_cart_table']}\n\t\t\t\twhere it_id = '{$row['it_id']}'\n\t\t\t\t  and od_id = '{$od_id}' ";
    $sum = sql_fetch($sql);
    $item[$i] = $row;
    $item[$i]['pt_it'] = apms_pt_it($row['pt_it'], 1);
    $item[$i]['it_options'] = print_item_options($row['it_id'], $od_id, $row['pt_msg1'], $row['pt_msg2'], $row['pt_msg3']);
    // 배송비
    $sc = sql_fetch(" select * from {$g5['apms_sendcost']} where sc_flag = '1' and od_id = '{$od_id}' and it_id = '{$row['it_id']}' and pt_id = '{$member['mb_id']}' ");
    if ($sc['sc_type']) {
        $sc_type = $sc['sc_type'];
        $sc_price = $sc['sc_price'];
    } else {
        $sc_type = '무료';
        $sc_price = 0;
    }
    $point = $sum['point'];
    $sell_price = $sum['price'];
    $item[$i]['send'] = $sc_type;
    $item[$i]['sendcost'] = $sc_price;
    $item[$i]['point'] = $point;
    $item[$i]['sell_price'] = $sell_price;
Esempio n. 3
0
     $goods_it_id = $row['it_id'];
 }
 $goods_count++;
 // 에스크로 상품정보
 if ($default['de_escrow_use']) {
     if ($i > 0) {
         $good_info .= chr(30);
     }
     $good_info .= "seq=" . ($i + 1) . chr(31);
     $good_info .= "ordr_numb={$od_id}_" . sprintf("%04d", $i) . chr(31);
     $good_info .= "good_name=" . addslashes($row['it_name']) . chr(31);
     $good_info .= "good_cntx=" . $row['ct_qty'] . chr(31);
     $good_info .= "good_amtx=" . $row['ct_price'] . chr(31);
 }
 $it_name = stripslashes($row['it_name']);
 $it_options = print_item_options($row['it_id'], $s_cart_id, $row['pt_msg1'], $row['pt_msg2'], $row['pt_msg3']);
 // 복합과세금액
 if ($default['de_tax_flag_use']) {
     if ($row['it_notax']) {
         $comm_free_mny += $sum['price'];
     } else {
         $tot_tax_mny += $sum['price'];
     }
 }
 $point = $sum['point'];
 $sell_price = $sum['price'];
 // 쿠폰
 $cp_button = false;
 if ($is_member) {
     $cp_count = 0;
     $sql = " select cp_id\n\t\t\t\t\tfrom {$g5['g5_shop_coupon_table']}\n\t\t\t\t\twhere mb_id IN ( '{$member['mb_id']}', '전체회원' )\n\t\t\t\t\t  and cp_start <= '" . G5_TIME_YMD . "'\n\t\t\t\t\t  and cp_end >= '" . G5_TIME_YMD . "'\n\t\t\t\t\t  and cp_minimum <= '{$sell_price}'\n\t\t\t\t\t  and (\n\t\t\t\t\t\t\t( cp_method = '0' and cp_target = '{$row['it_id']}' )\n\t\t\t\t\t\t\tOR\n\t\t\t\t\t\t\t( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) )\n\t\t\t\t\t\t  ) ";
Esempio n. 4
0
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $list[$i] = $row;
    $list[$i]['num'] = $total_count - ($page - 1) * $rows - $i;
    $list[$i]['href'] = G5_SHOP_URL . '/item.php?it_id=' . $row['it_id'];
    $list[$i]['sale'] = $row['ct_price'] * $row['ct_qty'];
    if ($row['ct_notax']) {
        $net = $list[$i]['sale'];
    } else {
        list($net) = apms_vat($list[$i]['sale']);
    }
    $list[$i]['net'] = $net;
    $list[$i]['qty'] = $row['ct_qty'];
    $list[$i]['profit'] = $row['mk_profit'];
    $list[$i]['benefit'] = $row['mk_benefit'];
    $list[$i]['total'] = $row['mk_profit'] + $row['mk_benefit'];
    $list[$i]['rate'] = $list[$i]['net'] > 0 ? round($list[$i]['total'] / $list[$i]['net'] * 1000) / 10 : 0;
    $list[$i]['options'] = print_item_options($row['it_id'], $row['od_id'], $row['pt_msg1'], $row['pt_msg2'], $row['pt_msg3']);
    //구매회원
    $list[$i]['buyer'] = '비회원';
    if ($row['mb_id']) {
        $mb = get_member($row['mb_id'], 'mb_nick, mb_email, mb_homepage');
        if ($mb['mb_nick']) {
            $list[$i]['buyer'] = apms_sideview($row['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['wr_homepage']);
        }
    }
}
// 페이징
$write_pages = G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'];
$list_page = './?ap=' . $ap . '&amp;fr_date=' . $fr_date . '&amp;to_date=' . $to_date . '&amp;sca=' . $sca . '&amp;save_stx=' . $stx . '&amp;stx=' . $stx . '&amp;page=';
include_once $skin_path . '/mkt.itemlist.skin.php';