73 lines
2.0 KiB
PHP
73 lines
2.0 KiB
PHP
<?php
|
|
include_once('./_common.php');
|
|
|
|
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
|
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|
|
|
// 주문상품 재고체크 js 파일
|
|
add_javascript('<script src="'.G5_JS_URL.'/shop.order.js"></script>', 0);
|
|
|
|
// 모바일 주문인지
|
|
$is_mobile_order = is_mobile();
|
|
|
|
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');
|
|
|
|
// 새로운 주문번호 생성
|
|
$od_id = get_uniqid();
|
|
set_session('ss_order_id', $od_id);
|
|
$s_cart_id = $tmp_cart_id;
|
|
|
|
$g5['title'] = '주문서 작성';
|
|
|
|
// 전자결제를 사용할 때만 실행
|
|
if(!$is_mobile_order) {
|
|
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_easy_pay_use']) {
|
|
switch($default['de_pg_service']) {
|
|
case 'lg':
|
|
$g5['body_script'] = '';
|
|
break;
|
|
case 'inicis':
|
|
$g5['body_script'] = ' onload="javascript:enable_click()"';
|
|
break;
|
|
default:
|
|
$g5['body_script'] = ' onload="CheckPayplusInstall();"';
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
if(G5_IS_MOBILE)
|
|
include_once(G5_MSHOP_PATH.'/_head.php');
|
|
else
|
|
include_once(G5_SHOP_PATH.'/_head.php');
|
|
|
|
// 희망배송일 지정
|
|
if ($default['de_hope_date_use']) {
|
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
|
}
|
|
|
|
// 기기별 주문폼 include
|
|
if($is_mobile_order) {
|
|
$order_action_url = G5_HTTPS_MSHOP_URL.'/orderformupdate.php';
|
|
require_once(G5_MSHOP_PATH.'/orderform.sub.php');
|
|
} else {
|
|
$order_action_url = G5_HTTPS_SHOP_URL.'/orderformupdate.php';
|
|
require_once(G5_SHOP_PATH.'/orderform.sub.php');
|
|
}
|
|
|
|
if(G5_IS_MOBILE)
|
|
include_once(G5_MSHOP_PATH.'/_tail.php');
|
|
else
|
|
include_once(G5_SHOP_PATH.'/_tail.php');
|
|
?>
|