모바일에서 결제시 포인트 적용이 안되는 문제 채택완료
https://sir.kr/yc5_pds/454?page=4">https://sir.kr/yc5_pds/454?page=4
위 스킨을 사용중인데요
pc화면에서는 포인트 적용이 잘되는데 모바일 화면에서 결제할시
포인트 적용이 아예 안되는데 이럴 경우에는 어떻게 해야하나요?
php버전은 5.1.0 이구요
아래는 /mobile/orderform.php 소스에요
[code]
set_session("ss_direct", $sw_direct); // 장바구니가 비어있는가? if ($sw_direct) { $tmp_cart_id = get_session("ss_cart_direct"); } else { $tmp_cart_id = get_session("ss_cart_id"); }
if (get_cart_count($tmp_cart_id) == 0) alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php');
$g5['title'] = '주문서 작성';
include_once(G5_MSHOP_PATH.'/_head.php'); if ($default['de_hope_date_use']) { include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); }
// 새로운 주문번호 생성 $od_id = get_uniqid(); set_session('ss_order_id', $od_id);
$s_cart_id = $tmp_cart_id; $order_action_url = G5_HTTPS_MSHOP_URL.'/orderformupdate.php';
require_once(G5_MSHOP_PATH.'/settle_kcp.inc.php');
// 결제등록 요청시 사용할 입금마감일 $ipgm_date = date("Ymd", (G5_SERVER_TIME + 86400 * 5)); $tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정(갤럭시탭,아이패드 - 1.85, 스마트폰 - 1.0) ?>
주문하실 상품을 확인하세요.
-
판매가 수량 배송비주문금액 적립포인트
$goods = $goods_it_id = ""; $goods_count = -1;
// $s_cart_id 로 현재 장바구니 자료 쿼리 $sql = " select a.ct_id, a.it_id, a.it_name, a.ct_price, a.ct_point, a.ct_qty, a.ct_status, a.ct_send_cost, b.ca_id, b.ca_id2, b.ca_id3, b.it_notax from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) where a.od_id = '$s_cart_id' and a.ct_select = '1' "; if($default['de_cart_keep_term']) { $ctime = date('Y-m-d', G5_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); $sql .= " and substring(a.ct_time, 1, 10) >= '$ctime' "; } $sql .= " group by a.it_id "; $sql .= " order by a.ct_id "; $result = sql_query($sql);
$good_info = ''; $it_send_cost = 0; $it_cp_count = 0;
$comm_tax_mny = 0; // 과세금액 $comm_vat_mny = 0; // 부가세 $comm_free_mny = 0; // 면세금액 $tot_tax_mny = 0;
for ($i=0; $row=mysql_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 {$g5['g5_shop_cart_table']} where it_id = '{$row['it_id']}' and od_id = '$s_cart_id' "; $sum = sql_fetch($sql);
if (!$goods) { //$goods = addslashes($row[it_name]); //$goods = get_text($row[it_name]); $goods = preg_replace("/\'|\"|\||\,|\&|\;/", "", $row['it_name']); $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); }
$a1 = ''; $a2 = ''; $image_width = 50; $image_height = 50; $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 .= '
// 복합과세금액 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) { $cp_button = ''; $cp_count = 0;
$sql = " select cp_id from {$g5['g5_shop_coupon_table']} where mb_id IN ( '{$member['mb_id']}', '전체회원' ) and cp_start <= '".G5_TIME_YMD."' and cp_end >= '".G5_TIME_YMD."' and cp_minimum <= '$sell_price' and ( ( cp_method = '0' and cp_target = '{$row['it_id']}' ) OR ( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) ) ) "; $res = sql_query($sql);
for($k=0; $cp=sql_fetch_array($res); $k++) { if(is_used_coupon($member['mb_id'], $cp['cp_id'])) continue;
$cp_count++; }
if($cp_count) { $cp_button = '
'; $it_cp_count++; } }// 배송비 switch($row['ct_send_cost']) { case 1: $ct_send_cost = '착불'; break; case 2: $ct_send_cost = '무료'; break; default: $ct_send_cost = '선불'; break; } ?>
if ($i == 0) { //echo '
// 복합과세처리 if($default['de_tax_flag_use']) { $comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1); $comm_vat_mny = ($tot_tax_mny + $send_cost) - $comm_tax_mny; } ?>
- 주문
- 원 0) { ?>
- 쿠폰
- 0 원
- 배송비
- 원
- 총계
- 원
- 포인트
- 점
// 결제대행사별 코드 include (결제등록 필드) require_once(G5_MSHOP_PATH.'/kcp/orderform.1.php'); ?>