diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php
index ba9084755..0d1db2a2a 100644
--- a/adm/shop_admin/configformupdate.php
+++ b/adm/shop_admin/configformupdate.php
@@ -133,7 +133,7 @@ $sql = " update {$g4['shop_default_table']}
de_sms_use4 = '$de_sms_use4',
de_sms_use5 = '$de_sms_use5',
de_sms_hp = '$de_sms_hp',
- de_item_use_use = '$de_item_use_use',
+ de_item_use_use = '$de_item_use_use',
de_code_dup_use = '$de_code_dup_use',
de_cart_keep_term = '$de_cart_keep_term',
de_guest_cart_use = '$de_guest_cart_use',
diff --git a/adm/shop_admin/index.php b/adm/shop_admin/index.php
index 3f68c43e9..a049d8ab4 100644
--- a/adm/shop_admin/index.php
+++ b/adm/shop_admin/index.php
@@ -134,7 +134,7 @@ $pg_anchor = '
자료가 없습니다. ';
+ if ($i == 0) echo '자료가 없습니다. ';
?>
diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php
index d581c6dd9..620449e04 100644
--- a/adm/shop_admin/orderform.php
+++ b/adm/shop_admin/orderform.php
@@ -243,8 +243,8 @@ $pg_anchor = '
원
+
+ 추가배송비
+
+ 원
+
+
\ No newline at end of file
diff --git a/install/install_db.php b/install/install_db.php
index bc916b05c..0dac5dacc 100644
--- a/install/install_db.php
+++ b/install/install_db.php
@@ -284,7 +284,7 @@ if($shop_install) {
de_simg_height = '$simg_height',
de_mimg_width = '$mimg_width',
de_mimg_height = '$mimg_height',
- de_item_ps_use = '1',
+ de_item_use_use = '1',
de_level_sell = '1',
de_code_dup_use = '1',
de_sms_cont1 = '{이름}님의 회원가입을 축하드립니다.\nID:{회원아이디}\n{회사명}',
diff --git a/install/shop.sql b/install/shop.sql
index 8bb824f28..7ed5c3ca5 100644
--- a/install/shop.sql
+++ b/install/shop.sql
@@ -280,7 +280,7 @@ CREATE TABLE IF NOT EXISTS `shop_default` (
`de_sms_hp` varchar(255) NOT NULL DEFAULT '',
`de_kcp_mid` varchar(255) NOT NULL DEFAULT '',
`de_iche_use` tinyint(4) NOT NULL DEFAULT '0',
- `de_item_ps_use` tinyint(4) NOT NULL DEFAULT '0',
+ `de_item_use_use` tinyint(4) NOT NULL DEFAULT '0',
`de_code_dup_use` tinyint(4) NOT NULL DEFAULT '0',
`de_cart_keep_term` int(11) NOT NULL DEFAULT '0',
`de_guest_cart_use` tinyint(4) NOT NULL DEFAULT '0',
@@ -598,6 +598,7 @@ CREATE TABLE IF NOT EXISTS `shop_order` (
`od_memo` text NOT NULL,
`od_send_cost` int(11) NOT NULL DEFAULT '0',
`od_send_coupon` int(11) NOT NULL DEFAULT '0',
+ `od_send_cost2` int(11) NOT NULL DEFAULT '0',
`od_temp_amount` int(11) NOT NULL DEFAULT '0',
`od_temp_point` int(11) NOT NULL DEFAULT '0',
`od_receipt_amount` int(11) NOT NULL DEFAULT '0',
diff --git a/lib/shop.lib.php b/lib/shop.lib.php
index 18c8211c7..7d0c780fc 100644
--- a/lib/shop.lib.php
+++ b/lib/shop.lib.php
@@ -884,8 +884,8 @@ function alert_opener($msg='', $url='')
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
- echo " ";
- echo "
diff --git a/mobile/shop/itemuse.inc.php b/mobile/shop/itemuse.inc.php
deleted file mode 100644
index ee3ef4c50..000000000
--- a/mobile/shop/itemuse.inc.php
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
-
- 번호
- 제목
- 작성자
- 작성일
- 평점
-
-
-]+>#iS", "g4_thumb", $is_content);
-
- $thumb = new g4_thumb(G4_DATA_PATH.'/itemuse', 500);
- $is_content = $thumb->run($is_content);
-
- $is_time = substr($row['is_time'], 2, 14);
-?>
-
-
- .
-
- 작성자
-
- 작성일
-
- 상태
-
-
-
-
-
- 문의내용
-
-
-
- 답변
-
-
-
-
-
-
-
-
-
-
- 수정
- 삭제
-
-
-
-
-
-
-
-
- 번
-
-
-
-
-
-
-
-
-
-
-
-
-
수정
-
삭제
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-if (!$i)
-{
- echo '등록된 사용후기가 없습니다. ';
-}
-?>
-
-
-
-
-사용후기 쓰기 새 창
-
-
\ No newline at end of file
diff --git a/mobile/shop/itemuseform.php b/mobile/shop/itemuseform.php
new file mode 100644
index 000000000..00927b490
--- /dev/null
+++ b/mobile/shop/itemuseform.php
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mobile/shop/itemuselist.php b/mobile/shop/itemuselist.php
new file mode 100644
index 000000000..5baca346a
--- /dev/null
+++ b/mobile/shop/itemuselist.php
@@ -0,0 +1,153 @@
+
+
+전체보기
+
+
+
+선택
+>상품명
+>상품코드
+>후기제목
+후기제목
+작성자명
+작성자아이디
+
+
+
+
+
+
+
+
+
+ ';
+ ?>
+
+
+
+
+
+
+
+
+ 작성자
+
+ 작성일
+
+ 평가점수
+
+
+
+
+
+
+
+ 보기
+
+
+
+ 0) echo '';
+ if ($i == 0) echo '
자료가 없습니다.
';
+ ?>
+
+
+
+
+
+
+
+
+
diff --git a/mobile/shop/list.php b/mobile/shop/list.php
index e627dbf60..00f97b6da 100644
--- a/mobile/shop/list.php
+++ b/mobile/shop/list.php
@@ -106,7 +106,7 @@ $qstr1 .= 'ca_id='.$ca_id;
if($skin)
$qstr1 .= '&skin='.$skin;
$qstr1 .='&ev_id='.$ev_id.'&sort='.$sort.'&sortodr='.$sortodr;
-echo get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&page=');
+echo get_paging($config['cf_mobile_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&page=');
?>
">
+
+
@@ -478,6 +480,10 @@ ob_end_clean();
총 주문금액
원
+
+
+ 추가배송비
+ 0 원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)
@@ -701,6 +707,7 @@ ob_end_clean();
$(function() {
var $cp_btn_el;
var $cp_row_el;
+ var zipcode = "";
$(".it_coupon_btn").click(function() {
$cp_btn_el = $(this);
@@ -802,6 +809,7 @@ $(function() {
var subj = $el.find("input[name='o_cp_subj[]']").val();
var od_amount = parseInt($("input[name=org_od_amount]").val());
var send_cost = $("input[name=org_send_cost]").val();
+ var item_coupon = parseInt($("input[name=item_coupon]").val());
if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
@@ -811,8 +819,10 @@ $(function() {
$("input[name=od_send_cost]").val(send_cost);
$("input[name=sc_cp_id]").val("");
+ $("#sc_coupon_btn").text("쿠폰적용");
+ $("#sc_coupon_cancel").remove();
- $("input[name=od_amount]").val(od_amount - amount);
+ $("input[name=od_amount]").val(od_amount - item_coupon - amount);
$("input[name=od_cp_id]").val(cp_id);
calculate_order_amount();
$("#od_coupon_frm").remove();
@@ -828,11 +838,16 @@ $(function() {
$("#od_coupon_cancel").live("click", function() {
var org_amount = $("input[name=org_od_amount]").val();
- $("input[name=od_amount]").val(org_amount);
+ var item_coupon = parseInt($("input[name=item_coupon]").val());
+ $("input[name=od_amount]").val(org_amount - item_coupon);
+ $("input[name=od_send_cost]").val($("input[name=org_send_cost]").val());
+ $("input[name=sc_cp_id]").val("");
calculate_order_amount();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
+ $("#sc_coupon_btn").text("쿠폰적용");
+ $("#sc_coupon_cancel").remove();
});
$("#sc_coupon_btn").click(function() {
@@ -885,6 +900,21 @@ $(function() {
$(this).remove();
});
+ $("#od_b_addr2").focus(function() {
+ var zip1 = $("#od_b_zip1").val().replace(/[^0-9]/g, "");
+ var zip2 = $("#od_b_zip2").val().replace(/[^0-9]/g, "");
+ if(zip1 == "" || zip2 == "")
+ return false;
+
+ var code = String(zip1) + String(zip2);
+
+ if(zipcode == code)
+ return false;
+
+ zipcode = code;
+ calculate_sendcost(code);
+ });
+
$("#od_settle_bank").bind("click", function() {
$("[name=od_deposit_name]").val( $("[name=od_b_name]").val() );
$("#settle_bank").show();
@@ -931,14 +961,22 @@ function calculate_total_amount()
$("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원");
$("input[name=good_mny]").val(tot_sell_amount);
- $("input[name=od_amount]").val(sell_amount);
- $("input[name=org_od_amount]").val(sell_amount);
+ $("input[name=od_amount]").val(sell_amount - tot_cp_amount);
$("input[name=od_send_cost]").val(send_cost);
- 0) { ?>
+ $("input[name=item_coupon]").val(tot_cp_amount);
+ 0) { ?>
$("input[name=od_cp_id]").val("");
+ if($("#od_coupon_cancel").size()) {
+ $("#od_coupon_btn").text("쿠폰적용");
+ $("#od_coupon_cancel").remove();
+ }
0) { ?>
$("input[name=sc_cp_id]").val("");
+ if($("#sc_coupon_cancel").size()) {
+ $("#sc_coupon_btn").text("쿠폰적용");
+ $("#sc_coupon_cancel").remove();
+ }
$("input[name=od_temp_point]").val(0);
0 && $is_member) { ?>
@@ -951,7 +989,8 @@ function calculate_order_amount()
{
var sell_amount = parseInt($("input[name=od_amount]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val());
- var tot_amount = sell_amount + send_cost;
+ var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
+ var tot_amount = sell_amount + send_cost + send_cost2;
$("form[name=sm_form] input[name=good_mny]").val(tot_amount);
$("#od_tot_amount").text(number_format(String(tot_amount)));
@@ -982,6 +1021,20 @@ function calculate_temp_point()
$("input[name=max_temp_point]").val(temp_point);
}
+function calculate_sendcost(code)
+{
+ $.post(
+ "./ordersendcost.php",
+ { zipcode: code },
+ function(data) {
+ $("input[name=od_send_cost2]").val(data);
+ $("#od_send_cost2").text(number_format(String(data)));
+
+ calculate_order_amount();
+ }
+ );
+}
+
/* 결제방법에 따른 처리 후 결제등록요청 실행 */
function kcp_approval()
{
@@ -1255,6 +1308,8 @@ function gumae2baesong(f)
f.od_b_zip2.value = f.od_zip2.value;
f.od_b_addr1.value = f.od_addr1.value;
f.od_b_addr2.value = f.od_addr2.value;
+
+ calculate_sendcost(String(f.od_b_zip1.value) + String(f.od_b_zip2.value));
}
diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php
index cc95183a2..62a32e795 100644
--- a/mobile/shop/orderformupdate.php
+++ b/mobile/shop/orderformupdate.php
@@ -64,6 +64,7 @@ if ($error != "")
$i_amount = (int)$_POST['od_amount'];
$i_send_cost = (int)$_POST['od_send_cost'];
+$i_send_cost2 = (int)$_POST['od_send_cost2'];
$i_temp_point = (int)$_POST['od_temp_point'];
@@ -251,6 +252,17 @@ if ((int)($send_cost - $tot_sc_cp_amount) !== $i_send_cost) {
die("Error..");
}
+// 추가배송비가 상이함
+$zipcode = $od_b_zip1 . $od_b_zip2;
+$sql = " select sc_id, sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
+$tmp = sql_fetch($sql);
+if(!$tmp['sc_id'])
+ $send_cost2 = 0;
+else
+ $send_cost2 = (int)$tmp['sc_amount'];
+if($send_cost2 !== $i_send_cost2)
+ die("Error...");
+
// 결제포인트가 상이함
$tot_amount = $tot_sell_amount + $send_cost;
// 회원이면서 포인트사용이면
@@ -271,7 +283,7 @@ if($default['de_mileage_use']) {
}
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0))
- die("Error...");
+ die("Error....");
if ($od_temp_point)
{
@@ -294,7 +306,7 @@ if($default['de_mileage_use']) {
}
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point'])
- die("Error...");
+ die("Error....");
if ($od_temp_point)
{
@@ -303,7 +315,7 @@ if($default['de_mileage_use']) {
}
}
-$i_amount = $i_amount + $i_send_cost - $i_temp_point;
+$i_amount = $i_amount + $i_send_cost + $i_send_cost2 - $i_temp_point;
if ($od_settle_case == "무통장")
{
@@ -425,6 +437,7 @@ $sql = " insert {$g4['shop_order_table']}
od_memo = '$od_memo',
od_send_cost = '$od_send_cost',
od_send_coupon = '$tot_sc_cp_amount',
+ od_send_cost2 = '$od_send_cost2',
od_coupon = '$tot_od_cp_amount',
od_temp_amount = '$od_temp_amount',
od_temp_point = '$od_temp_point',
diff --git a/mobile/shop/orderinquiryview.php b/mobile/shop/orderinquiryview.php
index 4d7f1a90c..47429fe1f 100644
--- a/mobile/shop/orderinquiryview.php
+++ b/mobile/shop/orderinquiryview.php
@@ -116,6 +116,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
}
$send_cost = $od['od_send_cost'];
+ $send_cost2 = $od['od_send_cost2'];
$send_coupon = $od['od_send_coupon'];
$org_send_cost = $send_cost + $send_coupon;
?>
@@ -124,7 +125,7 @@ include_once(G4_MSHOP_PATH.'/_head.php');
@@ -151,6 +152,11 @@ include_once(G4_MSHOP_PATH.'/_head.php');
원
+ 0) { ?>
+ 추가배송비
+ 원
+
+
총계
원
diff --git a/shop/item.php b/shop/item.php
index 5f8984d9e..45f4e9f9c 100644
--- a/shop/item.php
+++ b/shop/item.php
@@ -7,9 +7,6 @@ if (G4_IS_MOBILE) {
}
include_once(G4_LIB_PATH.'/iteminfo.lib.php');
-include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
-
-$captcha_html = captcha_html();
// 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함
$token = md5(uniqid(rand(), true));
@@ -597,10 +594,12 @@ else
상품문의
-
+
+
diff --git a/shop/itemqa.php b/shop/itemqa.php
new file mode 100644
index 000000000..079546fd2
--- /dev/null
+++ b/shop/itemqa.php
@@ -0,0 +1,208 @@
+
+
+
+ 등록된 상품문의
+
+ ";
+ //if ($row[iq_answer]) $qa .= " ";
+ //$qa = "$qa";
+
+ $iq_stats = '';
+ $iq_answer = '';
+ $iq_flag = 0;
+ if ($row['iq_answer'])
+ {
+ $iq_answer = conv_content($row['iq_answer'],0);
+ $iq_stats = '답변완료';
+ } else {
+ $iq_stats = '답변전';
+ $iq_answer = '답변이 등록되지 않았습니다.';
+ $iq_flag = 1;
+ }
+
+ if ($i == 0) echo '';
+ ?>
+
+
+ .
+
+ 작성자
+
+ 작성일
+
+ 상태
+
+
+
+
+
+ 문의내용
+
+
+
+ 답변
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = 0) echo ' ';
+
+ if (!$i) echo '상품문의가 없습니다.
';
+ ?>
+
+
+ 1) {
+ $str .= '처음 '.PHP_EOL;
+ }
+
+ $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
+ $end_page = $start_page + $write_pages - 1;
+
+ if ($end_page >= $total_page) $end_page = $total_page;
+
+ if ($start_page > 1) $str .= '이전 '.PHP_EOL;
+
+ if ($total_page > 1) {
+ for ($k=$start_page;$k<=$end_page;$k++) {
+ if ($cur_page != $k)
+ $str .= ''.$k.' 페이지 '.PHP_EOL;
+ else
+ $str .= '열린 '.$k.' 페이지 '.PHP_EOL;
+ }
+ }
+
+ if ($total_page > $end_page) $str .= '다음 '.PHP_EOL;
+
+ if ($cur_page < $total_page) {
+ $str .= '맨끝 '.PHP_EOL;
+ }
+
+ if ($str)
+ return "{$str} ";
+ else
+ return "";
+}
+
+echo itemqa_page($config['cf_write_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&page=", "");
+?>
+
+
+
+
\ No newline at end of file
diff --git a/shop/itemqaform.php b/shop/itemqaform.php
new file mode 100644
index 000000000..4189f6544
--- /dev/null
+++ b/shop/itemqaform.php
@@ -0,0 +1,74 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php
new file mode 100644
index 000000000..bdb4ecff3
--- /dev/null
+++ b/shop/itemqaformupdate.php
@@ -0,0 +1,95 @@
+
diff --git a/shop/itemuse.php b/shop/itemuse.php
index 26d20c098..65408f70f 100644
--- a/shop/itemuse.php
+++ b/shop/itemuse.php
@@ -7,7 +7,7 @@ $it_id = $_REQUEST['it_id'];
$itemuse_form = "./itemuseform.php?it_id=".$it_id;
$itemuse_list = "./itemuselist.php";
-include_once(G4_PATH.'/head.sub.php');
+//include_once(G4_PATH.'/head.sub.php');
?>
@@ -15,7 +15,7 @@ include_once(G4_PATH.'/head.sub.php');
\ No newline at end of file
diff --git a/shop/itemuseform.php b/shop/itemuseform.php
index c6fab9cae..3ce57e4fd 100644
--- a/shop/itemuseform.php
+++ b/shop/itemuseform.php
@@ -1,5 +1,11 @@
) {
alert("내용은 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+is_content_editor_data.length+" 글자");
- CKEDITOR.instances.is_content.focus();
+ CKEDITOR.instances.is_content.focus();
return false;
}
diff --git a/shop/itemuselist.php b/shop/itemuselist.php
index ff44347ce..8e10a48eb 100644
--- a/shop/itemuselist.php
+++ b/shop/itemuselist.php
@@ -1,5 +1,11 @@
+ 0) { // 추가배송비가 있다면 ?>
+
+ 추가배송비
+
+
+
+
주문합계
diff --git a/shop/mail/orderupdate2.mail.php b/shop/mail/orderupdate2.mail.php
index 0e997f1fb..97a9aa912 100644
--- a/shop/mail/orderupdate2.mail.php
+++ b/shop/mail/orderupdate2.mail.php
@@ -65,6 +65,13 @@ $ft_a_st = 'display:block;padding:30px 0;background:#484848;color:#fff;text-alig
+ 0) { // 추가배송비가 있다면 ?>
+
+ 추가배송비
+
+
+
+
주문합계
diff --git a/shop/orderform.php b/shop/orderform.php
index a2b0c20d5..a60e0af83 100644
--- a/shop/orderform.php
+++ b/shop/orderform.php
@@ -299,6 +299,8 @@ setTimeout("init_pay_button();",300);
+
+
총 주문금액
원
+
+ 추가배송비
+ 0 원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)
+
@@ -905,6 +911,7 @@ setTimeout("init_pay_button();",300);
$(function() {
var $cp_btn_el;
var $cp_row_el;
+ var zipcode = "";
$(".it_coupon_btn").click(function() {
$cp_btn_el = $(this);
@@ -1006,6 +1013,7 @@ $(function() {
var subj = $el.find("input[name='o_cp_subj[]']").val();
var od_amount = parseInt($("input[name=org_od_amount]").val());
var send_cost = $("input[name=org_send_cost]").val();
+ var item_coupon = parseInt($("input[name=item_coupon]").val());
if(parseInt(amount) == 0) {
if(!confirm(subj+"쿠폰의 할인 금액은 "+amount+"원입니다.\n쿠폰을 적용하시겠습니까?")) {
@@ -1015,8 +1023,10 @@ $(function() {
$("input[name=od_send_cost]").val(send_cost);
$("input[name=sc_cp_id]").val("");
+ $("#sc_coupon_btn").text("쿠폰적용");
+ $("#sc_coupon_cancel").remove();
- $("input[name=od_amount]").val(od_amount - amount);
+ $("input[name=od_amount]").val(od_amount - item_coupon - amount);
$("input[name=od_cp_id]").val(cp_id);
calculate_order_amount();
$("#od_coupon_frm").remove();
@@ -1032,11 +1042,16 @@ $(function() {
$("#od_coupon_cancel").live("click", function() {
var org_amount = $("input[name=org_od_amount]").val();
- $("input[name=od_amount]").val(org_amount);
+ var item_coupon = parseInt($("input[name=item_coupon]").val());
+ $("input[name=od_amount]").val(org_amount - item_coupon);
+ $("input[name=od_send_cost]").val($("input[name=org_send_cost]").val());
+ $("input[name=sc_cp_id]").val("");
calculate_order_amount();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
+ $("#sc_coupon_btn").text("쿠폰적용");
+ $("#sc_coupon_cancel").remove();
});
$("#sc_coupon_btn").click(function() {
@@ -1089,6 +1104,21 @@ $(function() {
$(this).remove();
});
+ $("#od_b_addr2").focus(function() {
+ var zip1 = $("#od_b_zip1").val().replace(/[^0-9]/g, "");
+ var zip2 = $("#od_b_zip2").val().replace(/[^0-9]/g, "");
+ if(zip1 == "" || zip2 == "")
+ return false;
+
+ var code = String(zip1) + String(zip2);
+
+ if(zipcode == code)
+ return false;
+
+ zipcode = code;
+ calculate_sendcost(code);
+ });
+
$("#od_settle_bank").bind("click", function() {
$("[name=od_deposit_name]").val( $("[name=od_b_name]").val() );
$("#settle_bank").show();
@@ -1131,14 +1161,22 @@ function calculate_total_amount()
$("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원");
$("input[name=good_mny]").val(tot_sell_amount);
- $("input[name=od_amount]").val(sell_amount);
- $("input[name=org_od_amount]").val(sell_amount);
+ $("input[name=od_amount]").val(sell_amount - tot_cp_amount);
$("input[name=od_send_cost]").val(send_cost);
- 0) { ?>
+ $("input[name=item_coupon]").val(tot_cp_amount);
+ 0) { ?>
$("input[name=od_cp_id]").val("");
+ if($("#od_coupon_cancel").size()) {
+ $("#od_coupon_btn").text("쿠폰적용");
+ $("#od_coupon_cancel").remove();
+ }
0) { ?>
$("input[name=sc_cp_id]").val("");
+ if($("#sc_coupon_cancel").size()) {
+ $("#sc_coupon_btn").text("쿠폰적용");
+ $("#sc_coupon_cancel").remove();
+ }
$("input[name=od_temp_point]").val(0);
0 && $is_member) { ?>
@@ -1151,7 +1189,8 @@ function calculate_order_amount()
{
var sell_amount = parseInt($("input[name=od_amount]").val());
var send_cost = parseInt($("input[name=od_send_cost]").val());
- var tot_amount = sell_amount + send_cost;
+ var send_cost2 = parseInt($("input[name=od_send_cost2]").val());
+ var tot_amount = sell_amount + send_cost + send_cost2;
$("input[name=good_mny]").val(tot_amount);
$("#od_tot_amount").text(number_format(String(tot_amount)));
@@ -1182,6 +1221,20 @@ function calculate_temp_point()
$("input[name=max_temp_point]").val(temp_point);
}
+function calculate_sendcost(code)
+{
+ $.post(
+ "./ordersendcost.php",
+ { zipcode: code },
+ function(data) {
+ $("input[name=od_send_cost2]").val(data);
+ $("#od_send_cost2").text(number_format(String(data)));
+
+ calculate_order_amount();
+ }
+ );
+}
+
function forderform_check(f)
{
errmsg = "";
@@ -1394,6 +1447,8 @@ function gumae2baesong(f)
f.od_b_zip2.value = f.od_zip2.value;
f.od_b_addr1.value = f.od_addr1.value;
f.od_b_addr2.value = f.od_addr2.value;
+
+ calculate_sendcost(String(f.od_b_zip1.value) + String(f.od_b_zip2.value));
}
diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php
index 603ceac49..178e3d99b 100644
--- a/shop/orderformupdate.php
+++ b/shop/orderformupdate.php
@@ -58,6 +58,7 @@ if ($error != "")
$i_amount = (int)$_POST['od_amount'];
$i_send_cost = (int)$_POST['od_send_cost'];
+$i_send_cost2 = (int)$_POST['od_send_cost2'];
$i_temp_point = (int)$_POST['od_temp_point'];
@@ -245,6 +246,17 @@ if ((int)($send_cost - $tot_sc_cp_amount) !== $i_send_cost) {
die("Error..");
}
+// 추가배송비가 상이함
+$zipcode = $od_b_zip1 . $od_b_zip2;
+$sql = " select sc_id, sc_amount from {$g4['shop_sendcost_table']} where sc_zip1 <= '$zipcode' and sc_zip2 >= '$zipcode' ";
+$tmp = sql_fetch($sql);
+if(!$tmp['sc_id'])
+ $send_cost2 = 0;
+else
+ $send_cost2 = (int)$tmp['sc_amount'];
+if($send_cost2 !== $i_send_cost2)
+ die("Error...");
+
// 결제포인트가 상이함
$tot_amount = $tot_od_amount + ($send_cost - $tot_sc_cp_amount);
// 회원이면서 포인트사용이면
@@ -265,7 +277,7 @@ if($default['de_mileage_use']) {
}
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0))
- die("Error...");
+ die("Error....");
if ($od_temp_point)
{
@@ -288,7 +300,7 @@ if($default['de_mileage_use']) {
}
if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_point'])
- die("Error...");
+ die("Error....");
if ($od_temp_point)
{
@@ -297,7 +309,7 @@ if($default['de_mileage_use']) {
}
}
-$i_amount = $i_amount + $i_send_cost - $i_temp_point;
+$i_amount = $i_amount + $i_send_cost + $i_send_cost2 - $i_temp_point;
if ($od_settle_case == "무통장")
{
@@ -419,6 +431,7 @@ $sql = " insert {$g4['shop_order_table']}
od_memo = '$od_memo',
od_send_cost = '$od_send_cost',
od_send_coupon = '$tot_sc_cp_amount',
+ od_send_cost2 = '$od_send_cost2',
od_coupon = '$tot_od_cp_amount',
od_temp_amount = '$od_temp_amount',
od_temp_point = '$od_temp_point',
diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php
index 6e4091eaa..6d20f607d 100644
--- a/shop/orderinquiryview.php
+++ b/shop/orderinquiryview.php
@@ -128,6 +128,7 @@ if(openwin != null) {
}
$send_cost = $od['od_send_cost'];
+ $send_cost2 = $od['od_send_cost2'];
$send_coupon = $od['od_send_coupon'];
$org_send_cost = $send_cost + $send_coupon;
?>
@@ -136,7 +137,7 @@ if(openwin != null) {
@@ -163,6 +164,11 @@ if(openwin != null) {
원
+ 0) { ?>
+ 추가배송비
+ 원
+
+
총계
원
diff --git a/shop/ordermail1.inc.php b/shop/ordermail1.inc.php
index 25af49c12..4569fca08 100644
--- a/shop/ordermail1.inc.php
+++ b/shop/ordermail1.inc.php
@@ -71,4 +71,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
// 배송비가 있다면 총계에 더한다
if ($od_send_cost)
$ttotal_amount += $od_send_cost;
+
+// 추가배송비가 있다면 총계에 더한다
+if ($od_send_cost2)
+ $ttotal_amount += $od_send_cost2;
?>
\ No newline at end of file
diff --git a/shop/ordersendcost.php b/shop/ordersendcost.php
new file mode 100644
index 000000000..6c2505954
--- /dev/null
+++ b/shop/ordersendcost.php
@@ -0,0 +1,19 @@
+= $code ";
+$row = sql_fetch($sql);
+
+if(!$row['sc_id'])
+ die('0');
+
+die($row['sc_amount']);
+?>
\ No newline at end of file