diff --git a/adm/admin.menu400.shop_1of2.php b/adm/admin.menu400.shop_1of2.php index f7f51a296..e0bc6e24c 100644 --- a/adm/admin.menu400.shop_1of2.php +++ b/adm/admin.menu400.shop_1of2.php @@ -15,14 +15,8 @@ $menu['menu400'] = array ( array('400610', '상품유형관리', G4_ADMIN_URL.'/shop_admin/itemtypelist.php', 'scf_item_type'), array('400500', '상품옵션재고관리', G4_ADMIN_URL.'/shop_admin/optionstocklist.php', 'scf_item_option'), array('400490', '마일리지관리', G4_ADMIN_URL.'/shop_admin/mileagelist.php', 'scf_mileage'), - array('400500', '배송일괄처리', G4_ADMIN_URL.'/shop_admin/deliverylist.php', 'scf_deli', 1), - array('400740', '배송업체관리', G4_ADMIN_URL.'/shop_admin/deliverycodelist.php', 'scf_deli_co', 1), - array('400630', '이벤트관리', G4_ADMIN_URL.'/shop_admin/itemevent.php', 'scf_event'), - array('400640', '이벤트일괄처리', G4_ADMIN_URL.'/shop_admin/itemeventlist.php', 'scf_event_mng'), array('400650', '쿠폰관리', G4_ADMIN_URL.'/shop_admin/couponlist.php', 'scf_coupon'), - array('400700', '내용관리', G4_ADMIN_URL.'/shop_admin/contentlist.php', 'scf_contents', 1), - array('400710', 'FAQ관리', G4_ADMIN_URL.'/shop_admin/faqmasterlist.php', 'scf_faq', 1), - array('400730', '배너관리', G4_ADMIN_URL.'/shop_admin/bannerlist.php', 'scf_banner', 1), - array('400720', '팝업레이어관리', G4_ADMIN_URL.'/shop_admin/newwinlist.php', 'scf_poplayer', 1) + array('400500', '배송일괄처리', G4_ADMIN_URL.'/shop_admin/deliverylist.php', 'scf_deli', 1), + array('400740', '배송업체관리', G4_ADMIN_URL.'/shop_admin/deliverycodelist.php', 'scf_deli_co', 1) ); ?> \ No newline at end of file diff --git a/adm/admin.menu500.shop_2of2.php b/adm/admin.menu500.shop_2of2.php index ea761e56d..815b527b6 100644 --- a/adm/admin.menu500.shop_2of2.php +++ b/adm/admin.menu500.shop_2of2.php @@ -7,6 +7,12 @@ $menu['menu500'] = array ( array('500100', '상품판매순위', G4_ADMIN_URL.'/shop_admin/itemsellrank.php', 'sst_rank'), array('500120', '주문내역출력', G4_ADMIN_URL.'/shop_admin/orderprint.php', 'sst_print_order', 1), array('500130', '전자결제내역', G4_ADMIN_URL.'/shop_admin/ordercardhistory.php', 'sst_pg', 1), + array('400630', '이벤트관리', G4_ADMIN_URL.'/shop_admin/itemevent.php', 'scf_event'), + array('400640', '이벤트일괄처리', G4_ADMIN_URL.'/shop_admin/itemeventlist.php', 'scf_event_mng'), + array('400700', '내용관리', G4_ADMIN_URL.'/shop_admin/contentlist.php', 'scf_contents', 1), + array('400710', 'FAQ관리', G4_ADMIN_URL.'/shop_admin/faqmasterlist.php', 'scf_faq', 1), + array('400730', '배너관리', G4_ADMIN_URL.'/shop_admin/bannerlist.php', 'scf_banner', 1), + array('400720', '팝업레이어관리', G4_ADMIN_URL.'/shop_admin/newwinlist.php', 'scf_poplayer', 1), array('500140', '보관함현황', G4_ADMIN_URL.'/shop_admin/wishlist.php', 'sst_wish'), array('500200', 'SMS 문자전송', G4_ADMIN_URL.'/shop_admin/smssend.php', 'sst_sms'), array('500210', '가격비교사이트', G4_ADMIN_URL.'/shop_admin/price.php', 'sst_compare', 1) diff --git a/adm/board_list.php b/adm/board_list.php index f63296f83..a8f821efc 100644 --- a/adm/board_list.php +++ b/adm/board_list.php @@ -115,8 +115,8 @@ $colspan = 15; 수정'; - $one_copy = '복사'; + $one_update = '
  • 수정
  • '; + $one_copy = '
  • 복사
  • '; ?> @@ -156,7 +156,15 @@ $colspan = 15; - + +
    + + +
    + 수정'; + $s_upd = '
  • 수정
  • '; ?> @@ -160,7 +160,14 @@ $colspan = 8; - + +
    + + +
    + 수정'; - //$s_del = '삭제'; + $s_mod = '
  • 수정
  • '; + //$s_del = '
  • 삭제
  • '; } - $s_grp = '그룹'; + $s_grp = '
  • 그룹
  • '; $leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', G4_SERVER_TIME); $intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', G4_SERVER_TIME); @@ -199,7 +199,15 @@ $colspan = 15; -
    + +
    + + +
    + >
    diff --git a/adm/poll_list.php b/adm/poll_list.php index b198bd513..fad175aba 100644 --- a/adm/poll_list.php +++ b/adm/poll_list.php @@ -103,7 +103,7 @@ $colspan = 6; $row2 = sql_fetch($sql2); $po_etc = ($row['po_etc']) ? "사용" : "미사용"; - $s_mod = '수정'; + $s_mod = '
  • 수정
  • '; //$s_del = '삭제'; ?> @@ -116,7 +116,14 @@ $colspan = 6; - + +
    + + +
    + - - 배너수정 - 배너삭제 + +
    + + +
    diff --git a/adm/shop_admin/categorylist.php b/adm/shop_admin/categorylist.php index 3df814e25..7b7ca8501 100644 --- a/adm/shop_admin/categorylist.php +++ b/adm/shop_admin/categorylist.php @@ -129,13 +129,13 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌 $s_level = ''; $s_level_input_size = 40 - $level *5; // 하위 분류일 수록 입력칸 넓이 작아짐 - 지운아빠 2013-04-02 - if ($level+2 < 6) $s_add = ''.($level+2).'단 추가'; // 분류는 5단계까지만 가능 + if ($level+2 < 6) $s_add = '
  • '.($level+2).'단 추가
  • '; // 분류는 5단계까지만 가능 else $s_add = ''; - $s_upd = ''.get_text($row['ca_name']).' 수정'; - $s_vie = ''.get_text($row['ca_name']).' 이동'; + $s_upd = '
  • '.get_text($row['ca_name']).' 수정
  • '; + $s_vie = '
  • '.get_text($row['ca_name']).' 이동
  • '; if ($is_admin == 'super') - $s_del = ''.get_text($row['ca_name']).' 삭제'; + $s_del = '
  • '.get_text($row['ca_name']).' 삭제
  • '; // 해당 분류에 속한 상품의 갯수 $sql1 = " select COUNT(*) as cnt from {$g4['shop_item_table']} @@ -162,7 +162,17 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌 > - + +
    + + +
    + 자료가 한 건도 없습니다.\n"; diff --git a/adm/shop_admin/contentlist.php b/adm/shop_admin/contentlist.php index f86ba1721..de11c2c15 100644 --- a/adm/shop_admin/contentlist.php +++ b/adm/shop_admin/contentlist.php @@ -45,10 +45,15 @@ $result = sql_query($sql); - - <?php echo htmlspecialchars2($row['co_subject']); ?> 보기 - <?php echo htmlspecialchars2($row['co_subject']); ?> 수정 - <?php echo htmlspecialchars2($row['co_subject']); ?> 삭제 + +
    + + +
    + $("#tr_cp_maximum").hide(); $("#tr_cp_trunc").hide(); $("#cp_method_btn").click(function() { @@ -222,10 +223,12 @@ function change_type(cp_type) if(cp_type == "0") { $("#cp_amount_unit").text("원"); $("#cp_amount_unit").closest("tr").find("label").text("할인금액"); + $("#tr_cp_maximum").hide(); $("#tr_cp_trunc").hide(); } else { $("#cp_amount_unit").text("%"); $("#cp_amount_unit").closest("tr").find("label").text("할인비율"); + $("#tr_cp_maximum").show(); $("#tr_cp_trunc").show(); } } diff --git a/adm/shop_admin/couponlist.php b/adm/shop_admin/couponlist.php index 2df5d71be..652aa1362 100644 --- a/adm/shop_admin/couponlist.php +++ b/adm/shop_admin/couponlist.php @@ -148,7 +148,14 @@ $colspan = 8;
    ~ - <?php echo $row['cp_id']; ?> 수정 + +
    + + +
    + - - <?php echo stripslashes($row['dl_company']); ?> 홈페이지 - <?php echo stripslashes($row['dl_company']); ?> 수정 - <?php echo stripslashes($row['dl_company']); ?> 삭제 + +
    + + +
    - - - - - - <?php echo stripslashes($row['fa_subject']); ?> 수정 - <?php echo stripslashes($row['fa_subject']); ?> 삭제 - - + + + + + +
    + + +
    + +
  • FAQ는 무제한으로 등록할 수 있습니다
  • FAQ추가를 눌러 FAQ Master를 생성합니다. (하나의 FAQ 타이틀 생성 : 자주하시는 질문, 이용안내..등 )
  • -
  • 생성한 FAQ Master 의 상세보기를 눌러 세부 내용을 관리할 수 있습니다.
  • +
  • 생성한 FAQ Master 의 제목을 눌러 세부 내용을 관리할 수 있습니다.
  • @@ -47,7 +47,6 @@ $result = sql_query($sql); ID 제목 FAQ수 - 상세보기 관리 @@ -59,13 +58,17 @@ $result = sql_query($sql); ?> - + - 상세보기 - - <?php echo stripslashes($row['fm_subject']); ?> 보기 - <?php echo stripslashes($row['fm_subject']); ?> 수정 - <?php echo stripslashes($row['fm_subject']); ?> 삭제 + +
    + + +
    value="1"> - - <?php echo htmlspecialchars2(cut_str($row['it_name'],250, 보기"> - <?php echo htmlspecialchars2(cut_str($row['it_name'],250, 복사"> - <?php echo htmlspecialchars2(cut_str($row['it_name'],250, 수정"> - + +
    + + +
    diff --git a/adm/shop_admin/itempslist.php b/adm/shop_admin/itempslist.php index 062ba8adf..21677dadb 100644 --- a/adm/shop_admin/itempslist.php +++ b/adm/shop_admin/itempslist.php @@ -134,9 +134,14 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌 - - <?php echo $row['is_subject']; ?> 수정 - <?php echo $row['is_subject']; ?> 삭제 + +
    + + +
    diff --git a/adm/shop_admin/itemqalist.php b/adm/shop_admin/itemqalist.php index fe8cb965e..865595a36 100644 --- a/adm/shop_admin/itemqalist.php +++ b/adm/shop_admin/itemqalist.php @@ -129,9 +129,14 @@ if ($sfl || $stx) // 검색 결과일 때만 처음 버튼을 보여줌 - - <?php echo $row['iq_subject']; ?> 수정 - <?php echo $row['iq_subject']; ?> 삭제 + +
    + + +
    > - 수정 + +
    + + +
    + - - - - - - - - > - > - > - > - > - <?php echo cut_str(stripslashes($row['it_name']), 60, 수정"> - - + + + + + + + > + > + > + > + > + +
    + + +
    + + + 자료가 없습니다.'; - ?> + if (!$i) + echo '자료가 없습니다.'; + ?> diff --git a/adm/shop_admin/newwinlist.php b/adm/shop_admin/newwinlist.php index fc8e480ed..dcd9ec7c4 100644 --- a/adm/shop_admin/newwinlist.php +++ b/adm/shop_admin/newwinlist.php @@ -41,21 +41,26 @@ $result = sql_query($sql); - - - - - - 시간 - px - px - px - px - - <?php echo $row['nw_subject']; ?> 수정 - <?php echo $row['nw_subject']; ?> 삭제 - - + + + + + + 시간 + px + px + px + px + +
    + + +
    + + > - 수정 + +
    + + +
    + - - - - -
    - 주문일시 -
    - - - -
    - - - - -
    누적 - - - - - - - - - <?php echo $lines[$i]['od_id']; ?> 수정 - <?php echo $lines[$i]['od_id']; ?> 삭제 - - + ?> + + + + +
    + 주문일시 +
    + + + +
    + + + + +
    누적 + + + + + + + + +
    + + +
    + + \ No newline at end of file diff --git a/install/shop.sql b/install/shop.sql index 5da38de42..4e3e6589c 100644 --- a/install/shop.sql +++ b/install/shop.sql @@ -75,7 +75,8 @@ CREATE TABLE IF NOT EXISTS `shop_cart` ( `ct_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `ct_ip` varchar(25) NOT NULL DEFAULT '', `ct_send_cost` varchar(255) NOT NULL, - `ct_direct` tinyint(4) NOT NULL, + `ct_direct` tinyint(4) NOT NULL DEFAULT '0', + `ct_select` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`ct_id`), KEY `uq_id` (`uq_id`), KEY `ct_num` (`ct_num`) diff --git a/js/common.js b/js/common.js index be587bfce..c17e6343b 100644 --- a/js/common.js +++ b/js/common.js @@ -608,16 +608,46 @@ $(function(){ sv_hide = true; }); + // 셀렉트 ul + var sel_hide = false; + $('.sel_btn').click(function() { + $('.sel_ul').removeClass('sel_on'); + $(this).siblings('.sel_ul').addClass('sel_on'); + }); + + $(".sel_wrap").hover( + function() { + sel_hide = false; + }, + function() { + sel_hide = true; + } + ); + + $('.sel_a').focusin(function() { + sel_hide = false; + }); + + $('.sel_a').focusout(function() { + sel_hide = true; + }); + $(document).click(function() { - if(sv_hide) { + if(sv_hide) { // 사이드뷰 해제 $(".sv").removeClass("sv_on"); } + if (sel_hide) { // 셀렉트 ul 해제 + $('.sel_ul').removeClass('sel_on'); + } }); $(document).focusin(function() { - if(sv_hide) { + if(sv_hide) { // 사이드뷰 해제 $(".sv").removeClass("sv_on"); } + if (sel_hide) { // 셀렉트 ul 해제 + $('.sel_ul').removeClass('sel_on'); + } }); $("textarea#wr_content[maxlength]").live("keyup change", function() { @@ -629,17 +659,3 @@ $(function(){ } }); }); - -// 모달 레이어 http://mytory.net/archives/783 참조 -function winMask(){ // 모달 레이어 배경 - //화면의 높이와 너비를 구한다. - var maskHeight = $(document).height(); - var maskWidth = $(window).width(); - - //마스크의 높이와 너비를 화면 것으로 만들어 전체 화면을 채운다. - $('#win_mask').css({'width':maskWidth,'height':maskHeight}); - - //애니메이션 효과 - $('#win_mask').fadeTo("fast",0.8); -} -// 모달 레이어 끝 \ No newline at end of file diff --git a/js/modernizr.custom.70111.js b/js/modernizr.custom.70111.js new file mode 100644 index 000000000..1a81489fb --- /dev/null +++ b/js/modernizr.custom.70111.js @@ -0,0 +1,4 @@ +/* Modernizr 2.6.2 (Custom Build) | MIT & BSD + * Build: http://modernizr.com/download/#-cssclasses-testallprops-css_overflow_scrolling + */ +;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(prefixes.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b){for(var d in a){var e=a[d];if(!A(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}function D(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return z(b,"string")||z(b,"undefined")?B(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),C(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e});for(var E in p)w(p,E)&&(u=E.toLowerCase(),e[u]=p[E](),s.push((e[u]?"":"no-")+u));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)w(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},x(""),i=k=null,e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),Modernizr.addTest("overflowscrolling",function(){return Modernizr.testAllProps("overflowScrolling")}); \ No newline at end of file diff --git a/mobile/shop/cart.php b/mobile/shop/cart.php index 1923a2a89..5424d4d87 100644 --- a/mobile/shop/cart.php +++ b/mobile/shop/cart.php @@ -3,14 +3,13 @@ include_once('./_common.php'); $g4['title'] = '장바구니'; include_once(G4_MSHOP_PATH.'/_head.php'); -$s_uq_id = get_session('ss_uq_id'); ?>
    -
    + @@ -20,7 +19,7 @@ $s_uq_id = get_session('ss_uq_id'); - + @@ -91,7 +90,7 @@ $s_uq_id = get_session('ss_uq_id'); - + ">

    장바구니의 상품을 주문하시려면 주문하기를 클릭하세요. 비우기는 장바구니의 상품을 모두 비웁니다.

    쇼핑 계속하기 - 주문하기 - 선택삭제 - 비우기 + + + @@ -221,21 +220,11 @@ function form_check(act) { if (act == "buy") { f.act.value = act; - - + f.submit(); } else if (act == "alldelete") { f.act.value = act; - f.action = "./cartupdate.php"; f.submit(); } else if (act == "seldelete") @@ -246,7 +235,6 @@ function form_check(act) { } f.act.value = act; - f.action = "./cartupdate.php"; f.submit(); } diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index d9695da91..7df602f2d 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -68,6 +68,7 @@ ob_start(); b.ca_id from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) where a.uq_id = '$s_uq_id' + and a.ct_select = '1' and a.ct_num = '0' "; if($default['de_cart_keep_term']) { $ctime = date('Y-m-d H:i:s', G4_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); @@ -167,7 +168,8 @@ ob_start(); } // for 끝 if ($i == 0) { - echo ''; + //echo ''; + alert('장바구니가 비어 있습니다.', G4_SHOP_URL.'/cart.php'); } else { // 배송비 계산 if ($default['de_send_cost_case'] == '없음') @@ -707,7 +709,7 @@ $(function() { $.post( "./orderitemcoupon.php", - { it_id: it_id }, + { it_id: it_id, sw_direct: "" }, function(data) { $cp_btn_el.after(data); } @@ -780,7 +782,6 @@ $(function() { $("#od_coupon_frm").remove(); var $this = $(this); var amount = parseInt($("input[name=org_od_amount]").val()); - var send_cost = parseInt($("input[name=org_send_cost]").val()); $.post( "./ordercoupon.php", { amount: amount }, diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index e8050dabc..3205cdfb7 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -37,7 +37,8 @@ $sql = " select it_id, io_type, ct_option from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' "; + where uq_id = '$tmp_uq_id' + and ct_select = '1' "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { @@ -52,6 +53,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++) $error .= "{$row['ct_option']} 의 재고수량이 부족합니다. 현재고수량 : $it_stock_qty 개\\n\\n"; } +if($i == 0) + alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php'); + if ($error != "") { $error .= "다른 고객님께서 {$od_name}님 보다 먼저 주문하신 경우입니다. 불편을 끼쳐 죄송합니다."; @@ -65,7 +69,7 @@ $i_temp_point = (int)$_POST['od_temp_point']; // 주문금액이 상이함 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_amount - from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' "; + from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_select = '1' "; $row = sql_fetch($sql); $tot_ct_amount = $row['od_amount']; @@ -112,7 +116,8 @@ if($is_member) { $sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' - and it_id = '$it_id' "; + and it_id = '$it_id' + and ct_select = '1' "; $ct = sql_fetch($sql); $item_price = $ct['sum_price']; @@ -206,7 +211,7 @@ if($is_member && $send_cost > 0) { $dc = 0; if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_amount)) { if($cp['cp_type']) { - $dc = floor(($tot_od_amount * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + $dc = floor(($send_cost * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; } else { $dc = $cp['cp_amount']; } @@ -372,10 +377,13 @@ else // 주문번호를 얻는다. $od_id = get_session('ss_order_uniqid'); +// 주문상품의 uq_id 변경을 위한 uq_id를 얻는다. +$uq_id = get_uniqid(); + // 주문서에 입력 $sql = " insert {$g4['shop_order_table']} set od_id = '$od_id', - uq_id = '$tmp_uq_id', + uq_id = '$uq_id', mb_id = '{$member['mb_id']}', od_pwd = '$od_pwd', od_name = '$od_name', @@ -438,9 +446,11 @@ if (($od_receipt_card > 0 || $od_receipt_hp > 0) && $default['de_card_point'] == $sql_card_point = " , ct_point = '0' "; } $sql = "update {$g4['shop_cart_table']} - set ct_status = '주문' + set uq_id = '$uq_id', + ct_status = '주문' $sql_card_point - where uq_id = '$tmp_uq_id' "; + where uq_id = '$tmp_uq_id' + and ct_select = '1' "; $result = sql_query($sql, false); // 주문정보 입력 오류시 kcp 결제 취소 @@ -453,7 +463,7 @@ if(!$result) { echo "

    $sql

    " . mysql_errno() . " : " . mysql_error() . "

    error file : {$_SERVER['PHP_SELF']}"; // 주문삭제 - sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$tmp_uq_id' "); + sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' "); exit; } @@ -488,8 +498,9 @@ if($is_member) { $cp_amt = (int)$arr_it_cp_amt[$cp_it_id]; $sql = " update {$g4['shop_cart_table']} set cp_amount = '$cp_amt' - where uq_id = '$tmp_uq_id' + where uq_id = '$uq_id' and it_id = '$cp_it_id' + and ct_select = '1' and ct_num = '0' "; sql_query($sql); } @@ -562,20 +573,14 @@ if($default['de_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'] // orderview 에서 사용하기 위해 tmp에 넣고 -set_session('ss_temp_uq_id', $tmp_uq_id); +set_session('ss_temp_uq_id', $uq_id); // 주문번호제거 set_session('ss_order_uniqid', ''); -// ss_uq_id 기존자료 세션에서 제거 +// 기존자료 세션에서 제거 if (get_session('ss_direct')) set_session('ss_uq_direct', ''); -else - set_session('ss_uq_id', ''); -// 비회원장바구니 쿠키 초기화 -if(get_cookie('ck_guest_cart_uqid')) - set_cookie('ck_guest_cart_uqid', '', 0); - -goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uq_id='.$tmp_uq_id); +goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uq_id='.$uq_id); ?> diff --git a/mobile/shop/shop.head.php b/mobile/shop/shop.head.php index b15ee0e68..843b00594 100644 --- a/mobile/shop/shop.head.php +++ b/mobile/shop/shop.head.php @@ -7,6 +7,9 @@ include_once(G4_LIB_PATH.'/connect.lib.php'); include_once(G4_LIB_PATH.'/popular.lib.php'); ?> + + +

    판매가 소계 포인트
    장바구니에 담긴 상품이 없습니다.
    장바구니에 담긴 상품이 없습니다.
    @@ -48,7 +52,7 @@ $s_uq_id = get_session('ss_uq_id'); - + @@ -124,7 +128,7 @@ $s_uq_id = get_session('ss_uq_id'); - +

    장바구니의 상품을 주문하시려면 주문하기를 클릭하세요. 비우기는 장바구니의 상품을 모두 비웁니다.

    쇼핑 계속하기 - 주문하기 - 선택삭제 - 비우기 + + + @@ -243,12 +247,10 @@ $(function() { // 옵션수정 닫기 $("#mod_option_close").live("click", function() { $("#mod_option_frm").remove(); - $("#win_mask, .window").hide(); $(".mod_options").eq(close_btn_idx).focus(); }); $("#win_mask").click(function () { $("#mod_option_frm").remove(); - $("#win_mask").hide(); $(".mod_options").eq(close_btn_idx).focus(); }); @@ -260,22 +262,17 @@ function form_check(act) { if (act == "buy") { - f.act.value = act; - - + + f.act.value = act; + f.submit(); } else if (act == "alldelete") { f.act.value = act; - f.action = "./cartupdate.php"; f.submit(); } else if (act == "seldelete") @@ -286,7 +283,6 @@ function form_check(act) { } f.act.value = act; - f.action = "./cartupdate.php"; f.submit(); } diff --git a/shop/cartupdate.php b/shop/cartupdate.php index e8ff31846..e8a7333ec 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -22,8 +22,29 @@ if ($member['mb_level'] < $default['de_level_sell']) alert('상품을 구입할 수 있는 권한이 없습니다.'); } +if($act == "buy") +{ + if(!count($_POST['ct_chk'])) + alert("주문하실 상품을 하나이상 선택해 주십시오."); -if ($act == "d") // 삭제이면 + $fldcnt = count($_POST['it_id']); + for($i=0; $i<$fldcnt; $i++) { + $ct_chk = $_POST['ct_chk'][$i]; + if($ct_chk) { + $it_id = $_POST['it_id'][$i]; + $sql = " update {$g4['shop_cart_table']} + set ct_select = '1' + where it_id = '$it_id' and uq_id = '$tmp_uq_id' "; + sql_query($sql); + } + } + + if ($is_member) // 회원인 경우 + goto_url(G4_SHOP_URL.'/orderform.php'); + else + goto_url(G4_BBS_URL.'/login.php?url='.urlencode(G4_SHOP_URL.'/orderform.php')); +} +else if ($act == "d") // 삭제이면 { $sql = " delete from {$g4['shop_cart_table']} where ct_id = '$ct_id' @@ -38,10 +59,10 @@ else if ($act == "alldelete") // 모두 삭제이면 } else if ($act == "seldelete") // 선택삭제 { - $fldcnt = count($_POST['it_id']); - if(!$fldcnt) + if(!count($_POST['ct_chk'])) alert("삭제하실 상품을 하나이상 선택해 주십시오."); + $fldcnt = count($_POST['it_id']); for($i=0; $i<$fldcnt; $i++) { $ct_chk = $_POST['ct_chk'][$i]; if($ct_chk) { @@ -326,10 +347,15 @@ else // 장바구니에 담기 else $ct_num = 0; + if($sw_direct) + $ct_select = 1; + else + $ct_select = 0; + $ct_count = 0; $comma = ''; $sql = " INSERT INTO {$g4['shop_cart_table']} - ( uq_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_direct ) + ( uq_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, io_id, io_type, io_price, ct_time, ct_ip, ct_direct, ct_select ) VALUES "; for($i=0; $i<$option_count; $i++) { @@ -350,7 +376,7 @@ else // 장바구니에 담기 continue; } - $sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '$ct_num', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$sw_direct' )"; + $sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$_POST['it_id']}', '{$_POST['it_name']}', '쇼핑', '{$_POST['it_price']}', '{$_POST['it_point']}', '0', '0', '{$_POST['io_value'][$i]}', '{$_POST['ct_qty'][$i]}', '$ct_num', '{$_POST['io_id'][$i]}', '{$_POST['io_type'][$i]}', '{$_POST['io_price'][$i]}', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$sw_direct', '$ct_select' )"; $comma = ' , '; $ct_num++; $ct_count++; diff --git a/shop/orderform.php b/shop/orderform.php index 2163f6507..a633b81ee 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -18,9 +18,6 @@ else { if (get_cart_count($tmp_uq_id) == 0) alert('장바구니가 비어 있습니다.', G4_SHOP_URL.'/cart.php'); -// 포인트 결제 대기 필드 추가 -//sql_query(" ALTER TABLE `$g4[shop_order_table]` ADD `od_temp_point` INT NOT NULL AFTER `od_temp_card` ", false); - $g4['title'] = '주문서 작성'; include_once('./_head.php'); @@ -148,6 +145,7 @@ setTimeout("init_pay_button();",300); b.ca_id3 from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) where a.uq_id = '$s_uq_id' + and a.ct_select = '1' and a.ct_num = '0' "; if($default['de_cart_keep_term']) { $ctime = date('Y-m-d H:i:s', G4_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); @@ -245,7 +243,8 @@ setTimeout("init_pay_button();",300); } // for 끝 if ($i == 0) { - echo ''; + //echo ''; + alert('장바구니가 비어 있습니다.', G4_SHOP_URL.'/cart.php'); } else { // 배송비 계산 if ($default['de_send_cost_case'] == '없음') @@ -915,7 +914,7 @@ $(function() { $.post( "./orderitemcoupon.php", - { it_id: it_id }, + { it_id: it_id, sw_direct: "" }, function(data) { $cp_btn_el.after(data); } @@ -988,7 +987,6 @@ $(function() { $("#od_coupon_frm").remove(); var $this = $(this); var amount = parseInt($("input[name=org_od_amount]").val()); - var send_cost = parseInt($("input[name=org_send_cost]").val()); $.post( "./ordercoupon.php", { amount: amount }, diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index ab900a55f..e77021ca9 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -20,7 +20,7 @@ else $tmp_uq_id = get_session('ss_uq_id'); if (get_cart_count($tmp_uq_id) == 0)// 장바구니에 담기 - alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', './cart.php'); + alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php'); $error = ""; // 장바구니 상품 재고 검사 @@ -31,7 +31,8 @@ $sql = " select it_id, io_type, ct_option from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' "; + where uq_id = '$tmp_uq_id' + and ct_select = '1' "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { @@ -46,6 +47,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++) $error .= "{$row['ct_option']} 의 재고수량이 부족합니다. 현재고수량 : $it_stock_qty 개\\n\\n"; } +if($i == 0) + alert('장바구니가 비어 있습니다.\\n\\n이미 주문하셨거나 장바구니에 담긴 상품이 없는 경우입니다.', G4_SHOP_URL.'/cart.php'); + if ($error != "") { $error .= "다른 고객님께서 {$od_name}님 보다 먼저 주문하신 경우입니다. 불편을 끼쳐 죄송합니다."; @@ -59,7 +63,7 @@ $i_temp_point = (int)$_POST['od_temp_point']; // 주문금액이 상이함 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as od_amount - from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' "; + from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_select = '1' "; $row = sql_fetch($sql); $tot_ct_amount = $row['od_amount']; @@ -106,7 +110,8 @@ if($is_member) { $sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' - and it_id = '$it_id' "; + and it_id = '$it_id' + and ct_select = '1' "; $ct = sql_fetch($sql); $item_price = $ct['sum_price']; @@ -200,7 +205,7 @@ if($is_member && $send_cost > 0) { $dc = 0; if($cp['cp_id'] && ($cp['cp_minimum'] <= $tot_od_amount)) { if($cp['cp_type']) { - $dc = floor(($tot_od_amount * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; + $dc = floor(($send_cost * ($cp['cp_amount'] / 100)) / $cp['cp_trunc']) * $cp['cp_trunc']; } else { $dc = $cp['cp_amount']; } @@ -366,10 +371,13 @@ else // 주문번호를 얻는다. $od_id = get_session('ss_order_uniqid'); +// 주문상품의 uq_id 변경을 위한 uq_id를 얻는다. +$uq_id = get_uniqid(); + // 주문서에 입력 $sql = " insert {$g4['shop_order_table']} set od_id = '$od_id', - uq_id = '$tmp_uq_id', + uq_id = '$uq_id', mb_id = '{$member['mb_id']}', od_pwd = '$od_pwd', od_name = '$od_name', @@ -431,9 +439,11 @@ if (($od_receipt_card > 0 || $od_receipt_hp > 0) && $default['de_card_point'] == $sql_card_point = " , ct_point = '0' "; } $sql = "update {$g4['shop_cart_table']} - set ct_status = '주문' + set uq_id = '$uq_id', + ct_status = '주문' $sql_card_point - where uq_id = '$tmp_uq_id' "; + where uq_id = '$tmp_uq_id' + and ct_select = '1' "; $result = sql_query($sql, false); // 주문정보 입력 오류시 kcp 결제 취소 @@ -446,7 +456,7 @@ if(!$result) { echo "

    $sql

    " . mysql_errno() . " : " . mysql_error() . "

    error file : {$_SERVER['PHP_SELF']}"; // 주문삭제 - sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$tmp_uq_id' "); + sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' "); exit; } @@ -482,8 +492,9 @@ if($is_member) { $cp_amt = (int)$arr_it_cp_amt[$cp_it_id]; $sql = " update {$g4['shop_cart_table']} set cp_amount = '$cp_amt' - where uq_id = '$tmp_uq_id' + where uq_id = '$uq_id' and it_id = '$cp_it_id' + and ct_select = '1' and ct_num = '0' "; sql_query($sql); } @@ -556,20 +567,14 @@ if($default['de_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'] // orderview 에서 사용하기 위해 tmp에 넣고 -set_session('ss_temp_uq_id', $tmp_uq_id); +set_session('ss_temp_uq_id', $uq_id); // 주문번호제거 set_session('ss_order_uniqid', ''); -// ss_uq_id 기존자료 세션에서 제거 +// 기존자료 세션에서 제거 if (get_session('ss_direct')) set_session('ss_uq_direct', ''); -else - set_session('ss_uq_id', ''); -// 비회원장바구니 쿠키 초기화 -if(get_cookie('ck_guest_cart_uqid')) - set_cookie('ck_guest_cart_uqid', '', 0); - -goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uq_id='.$tmp_uq_id); +goto_url(G4_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uq_id='.$uq_id); ?> diff --git a/shop/orderitemcoupon.php b/shop/orderitemcoupon.php index 19795d7e0..a2d39d4f8 100644 --- a/shop/orderitemcoupon.php +++ b/shop/orderitemcoupon.php @@ -6,11 +6,16 @@ if($is_guest) // 상품정보 $it_id = $_POST['it_id']; +$sw_direct = $_POST['sw_direct']; $sql = " select it_id, ca_id, ca_id2, ca_id3 from {$g4['shop_item_table']} where it_id = '$it_id' "; $it = sql_fetch($sql); // 상품 총 금액 -$uq_id = get_session('ss_uq_id'); +if($sw_direct) + $uq_id = get_session('ss_uq_direct'); +else + $uq_id = get_session('ss_uq_id'); + $sql = " select SUM( IF(io_type = '1', io_price * ct_qty, (ct_price + io_price) * ct_qty)) as sum_price from {$g4['shop_cart_table']} where uq_id = '$uq_id' diff --git a/shop/ordermail1.inc.php b/shop/ordermail1.inc.php index 87f92e62b..25af49c12 100644 --- a/shop/ordermail1.inc.php +++ b/shop/ordermail1.inc.php @@ -18,7 +18,8 @@ $sql = " select a.it_id, b.it_sell_email, b.it_origin from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) - where a.uq_id = '$tmp_uq_id' + where a.uq_id = '$uq_id' + and a.ct_select = '1' and a.ct_num = '0' "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) @@ -29,13 +30,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++) SUM(ct_qty) as qty from {$g4['shop_cart_table']} where it_id = '{$row['it_id']}' - and uq_id = '$tmp_uq_id' "; + and uq_id = '$uq_id' + and ct_select = '1' "; $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' + where it_id = '{$row['it_id']}' and uq_id = '$uq_id' and ct_select = '1' order by io_type asc, ct_num asc, ct_id asc "; $result2 = sql_query($sql2); diff --git a/shop/ordermail2.inc.php b/shop/ordermail2.inc.php index 383110162..e23decc22 100644 --- a/shop/ordermail2.inc.php +++ b/shop/ordermail2.inc.php @@ -39,7 +39,8 @@ $sql = " select b.it_sell_email, a.it_id, a.it_name from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) - where a.uq_id = '$tmp_uq_id' + where a.uq_id = '$uq_id' + and a.ct_select = '1' and a.ct_num = '0' and b.it_sell_email <> '' "; $result = sql_query($sql); @@ -51,13 +52,14 @@ for ($i=0; $row=sql_fetch_array($result); $i++) SUM(ct_qty) as qty from {$g4['shop_cart_table']} where it_id = '{$row['it_id']}' - and uq_id = '$tmp_uq_id' "; + and uq_id = '$uq_id' + and ct_select = '1' "; $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' + where it_id = '{$row['it_id']}' and uq_id = '$uq_id' and ct_select = '1' order by io_type asc, ct_num asc, ct_id asc "; $result2 = sql_query($sql2); diff --git a/shop/shop.tail.php b/shop/shop.tail.php index 1794783f4..82b61e111 100644 --- a/shop/shop.tail.php +++ b/shop/shop.tail.php @@ -35,8 +35,6 @@ $admin = get_admin("super"); -

    - /style.css">
    -

    +

    @@ -26,7 +26,6 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 document.fzip.addr1.focus(); - 0) { ?>
    건 가나다순 정렬
    판매가 소계 포인트
    장바구니에 담긴 상품이 없습니다.
    장바구니에 담긴 상품이 없습니다.