From 164c67bcda2d664fd2bffcaaf722d2fe4b6a2e16 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 1 Aug 2013 17:54:32 +0900 Subject: [PATCH 01/20] =?UTF-8?q?#270=20cartupdate=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EA=B0=84=EC=86=8C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/shop.js | 24 ++-- mobile/shop/item.php | 10 +- mobile/shop/wishlist.php | 9 +- shop/cartoption.php | 16 +-- shop/cartupdate.php | 269 ++++++++------------------------------- shop/item.php | 10 +- shop/wishlist.php | 9 +- 7 files changed, 95 insertions(+), 252 deletions(-) diff --git a/js/shop.js b/js/shop.js index 87069bcd0..ba7def26c 100644 --- a/js/shop.js +++ b/js/shop.js @@ -50,7 +50,7 @@ $(function() { var sel_count = $("select[name='it_option[]']").size(); var idx = $("select[name='it_option[]']").index($(this)); var val = $(this).val(); - var it_id = $("input[name=it_id]").val(); + var it_id = $("input[name='it_id[]']").val(); // 선택값이 없을 경우 하위 옵션은 disabled if(val == "") { @@ -161,7 +161,7 @@ $(function() { $("#sit_sel_option li button").live("click", function() { var mode = $(this).text(); var this_qty, max_qty = 9999, min_qty = 1; - var $el_qty = $(this).closest("li").find("input[name='ct_qty[]']"); + var $el_qty = $(this).closest("li").find("input[name^=ct_qty]"); var stock = parseInt($(this).closest("li").find("input[name='io_stock[]']").val()); switch(mode) { @@ -221,7 +221,7 @@ $(function() { }); // 수량직접입력 - $("input[name='ct_qty[]']").live("keyup", function() { + $("input[name^=ct_qty]").live("keyup", function() { var val= $(this).val(); if(val != "") { @@ -328,6 +328,7 @@ function sel_supply_process($el, add_exec) // 선택된 옵션 출력 function add_sel_option(type, id, option, price, stock) { + var item_code = $("input[name='it_id[]']").val(); var opt = ""; var li_class = "sit_opt_list"; if(type) @@ -340,14 +341,14 @@ function add_sel_option(type, id, option, price, stock) opt_prc = "("+number_format(String(price))+"원)"; opt += "
  • \n"; - opt += "\n"; - opt += "\n"; - opt += "\n"; + opt += "\n"; + opt += "\n"; + opt += "\n"; opt += "\n"; opt += "\n"; opt += ""+option+"\n"; opt += ""+opt_prc+"\n"; - opt += "
    \n"; + opt += "
    \n"; opt += "\n"; opt += "\n"; opt += "
    \n"; @@ -387,7 +388,7 @@ function add_sel_option(type, id, option, price, stock) function same_option_check(val) { var result = false; - $("input[name='io_value[]']").each(function() { + $("input[name^=io_value]").each(function() { if(val == $(this).val()) { result = true; return false; @@ -404,9 +405,9 @@ function same_option_check(val) function price_calculate() { var it_price = parseInt($("input[name=it_price]").val()); - var $el_prc = $("input[name='io_price[]']"); - var $el_qty = $("input[name='ct_qty[]']"); - var $el_type = $("input[name='io_type[]']"); + var $el_prc = $("input[name^=io_price]"); + var $el_qty = $("input[name^=ct_qty]"); + var $el_type = $("input[name^=io_type]"); var price, type, qty, total = 0; $el_prc.each(function(index) { @@ -421,7 +422,6 @@ function price_calculate() } }); - $("input[name=total_price]").val(total); $("#sit_tot_price").empty().html("총 금액 : "+number_format(String(total))+"원"); } diff --git a/mobile/shop/item.php b/mobile/shop/item.php index 299e6c05a..0735802d2 100644 --- a/mobile/shop/item.php +++ b/mobile/shop/item.php @@ -162,7 +162,7 @@ else
    - + @@ -404,15 +404,15 @@ else
    • - - - + + + (+0원)
      - +
      diff --git a/mobile/shop/wishlist.php b/mobile/shop/wishlist.php index 5be977fcd..d14912259 100644 --- a/mobile/shop/wishlist.php +++ b/mobile/shop/wishlist.php @@ -61,11 +61,14 @@ include_once(G4_MSHOP_PATH.'/_head.php'); { ?> 품절 - - + - + + + + + 삭제 diff --git a/shop/cartoption.php b/shop/cartoption.php index 7b115baa7..8a7529f55 100644 --- a/shop/cartoption.php +++ b/shop/cartoption.php @@ -26,12 +26,9 @@ if(!mysql_num_rows($result)) - + - - -
    • - - - - + + +
      - + @@ -128,7 +124,7 @@ if($option_2) { function formcheck(f) { var val, result = true; - $("li input[name='ct_qty[]']").each(function() { + $("li input[name^=ct_qty]").each(function() { val = $(this).val(); if(val.length < 1) { diff --git a/shop/cartupdate.php b/shop/cartupdate.php index ee4ed56df..d6bd4169a 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -1,7 +1,7 @@ $it_stock_qty) { - $error .= "{$_POST['it_name'][$i]} 의 재고수량이 부족합니다. 현재 재고수량 : $it_stock_qty\\n\\n"; - } - } - - // 오류가 있다면 오류메세지 출력 - if ($error != "") { alert($error); } - - $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, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select ) - VALUES "; - $ct_select = 0; - if($sw_direct) - $ct_select = 1; - - for ($i=0; $i<$fldcnt; $i++) - { - if ($_POST['it_id'][$i] == "" || $_POST['ct_qty'][$i] <= 0) continue; - - // 옵션있는 상품이라면 건너뜀 - if($arr_item[$i]['opt_skip']) - continue; - - // 동일옵션의 상품이 있으면 수량 더함 - $sql2 = " select ct_id - from {$g4['shop_cart_table']} - where uq_id = '$tmp_uq_id' - and it_id = '{$_POST['it_id'][$i]}' - and ct_status = '쇼핑' "; - $row2 = sql_fetch($sql2); - if($row2['ct_id']) { - $sql3 = " update {$g4['shop_cart_table']} - set ct_qty = ct_qty + {$_POST['ct_qty'][$i]} - where ct_id = '{$row2['ct_id']}' "; - sql_query($sql3); - - continue; - } - - $sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$arr_item[$i]['id']}', '{$arr_item[$i]['name']}', '쇼핑', '{$arr_item[$i]['price']}', '{$arr_item[$i]['point']}', '0', '0', '{$arr_item[$i]['name']}', '{$_POST['ct_qty'][$i]}', '0', '{$arr_item[$i]['notax']}', '', '0', '0', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )"; - $comma = ' , '; - $ct_count++; - } - - if($ct_count > 0) - sql_query($sql); -} -else if ($act == "optionmod") // 장바구니에서 옵션변경 -{ - if (!$_POST['it_id']) - alert('장바구니에 담을 상품을 선택하여 주십시오.'); - - $option_count = count($_POST['io_id']); - - if($_POST['io_type'][0] != 0) - alert('상품의 선택옵션을 선택해 주십시오.'); - - if($option_count) { - for($i=0; $i $it_stock_qty) - { - alert($_POST['io_value'][$i]." 의 재고수량이 부족합니다.\\n\\n현재 재고수량 : " . number_format($it_stock_qty) . " 개"); - } - } - //-------------------------------------------------------- - - // 기존 장바구니 자료를 먼저 삭제 - sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and it_id = '$it_id' "); - - // 장바구니에 Insert - $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, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_direct, ct_send_cost ) - VALUES "; - - for($i=0; $i<$option_count; $i++) { - $opt_id = $_POST['io_id'][$i]; - $opt_type = $_POST['io_type'][$i]; - - // 옵션테이블에 정보가 없으면 건너뜀 - if($opt_id && !$opt_list[$opt_type][$opt_id]['id']) - continue; - - $opt_price = $opt_list[$opt_type][$opt_id]['price']; - $opt_qty = $_POST['ct_qty'][$i]; - - $sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '{$_POST['io_value'][$i]}', '$opt_qty', '$i', '{$it['it_notax']}', '$opt_id', '$opt_type', '$opt_price', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$sw_direct', '$ct_send_cost' )"; - $comma = ' , '; - } - - sql_query($sql); - } else { - // 기존 장바구니 자료 삭제 - sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and it_id = '$it_id' "); - } -} else // 장바구니에 담기 { - if (!$_POST['it_id']) + $count = count($_POST['it_id']); + if ($count < 1) alert('장바구니에 담을 상품을 선택하여 주십시오.'); - $option_count = count($_POST['io_id']); - if($option_count) { - if($_POST['io_type'][0] != 0) + for($i=0; $i<$count; $i++) { + // 보관함의 상품을 담을 때 체크되지 않은 상품 건너뜀 + if($act == 'multi' && !$_POST['chk_it_id'][$i]) + continue; + + $it_id = $_POST['it_id'][$i]; + $opt_count = count($_POST['io_id'][$it_id]); + + if($opt_count && $_POST['io_type'][$it_id][0] != 0) alert('상품의 선택옵션을 선택해 주십시오.'); - for($i=0; $i $it_stock_qty) { - alert($_POST['io_value'][$i]." 의 재고수량이 부족합니다.\\n\\n현재 재고수량 : " . number_format($it_stock_qty) . " 개"); + alert($io_value." 의 재고수량이 부족합니다.\\n\\n현재 재고수량 : " . number_format($it_stock_qty) . " 개"); } } //-------------------------------------------------------- // 바로구매에 있던 장바구니 자료를 지운다. - sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_direct = 1 ", false); + if($i == 0) + sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and ct_direct = 1 ", false); + + // 옵션수정일 때 기존 장바구니 자료를 먼저 삭제 + if($act == 'optionmod') + sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' and it_id = '$it_id' "); // 장바구니에 Insert $sql = " select ct_num from {$g4['shop_cart_table']} - where it_id = '{$_POST['it_id']}' + where it_id = '$it_id' and uq_id = '$tmp_uq_id' order by ct_num desc "; $row = sql_fetch($sql); @@ -344,35 +181,39 @@ else // 장바구니에 담기 ( 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, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select ) VALUES "; - for($i=0; $i<$option_count; $i++) { - $opt_id = $_POST['io_id'][$i]; - $opt_type = $_POST['io_type'][$i]; + for($k=0; $k<$opt_count; $k++) { + $io_id = $_POST['io_id'][$it_id][$k]; + $io_type = $_POST['io_type'][$it_id][$k]; + $io_value = $_POST['io_value'][$it_id][$k]; - // 옵션테이블에 정보가 없으면 건너뜀 - if($opt_id && !$opt_list[$opt_type][$opt_id]['id']) + // 옵션정보가 존재하는데 선택된 옵션이 없으면 건너뜀 + if($lst_count && $io_id == '') continue; - $opt_price = $opt_list[$opt_type][$opt_id]['price']; - $opt_qty = $_POST['ct_qty'][$i]; + // 구매할 수 없는 옵션은 건너뜀 + if($io_id && !$opt_list[$io_type][$io_id]['use']) + continue; + + $io_price = $opt_list[$io_type][$io_id]['price']; + $ct_qty = $_POST['ct_qty'][$it_id][$k]; // 동일옵션의 상품이 있으면 수량 더함 $sql2 = " select ct_id from {$g4['shop_cart_table']} where uq_id = '$tmp_uq_id' - and it_id = '{$_POST['it_id']}' - and io_id = '{$_POST['io_id'][$i]}' + and it_id = '$it_id' + and io_id = '$io_id' and ct_status = '쇼핑' "; $row2 = sql_fetch($sql2); if($row2['ct_id']) { $sql3 = " update {$g4['shop_cart_table']} - set ct_qty = ct_qty + {$_POST['ct_qty'][$i]} + set ct_qty = ct_qty + '$ct_qty' where ct_id = '{$row2['ct_id']}' "; sql_query($sql3); - continue; } - $sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '{$_POST['io_value'][$i]}', '$opt_qty', '$ct_num', '{$it['it_notax']}', '$opt_id', '$opt_type', '$opt_price', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )"; + $sql .= $comma."( '$tmp_uq_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '$ct_num', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G4_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )"; $comma = ' , '; $ct_num++; $ct_count++; diff --git a/shop/item.php b/shop/item.php index 8cfa84f8c..56f2b2b4a 100644 --- a/shop/item.php +++ b/shop/item.php @@ -162,7 +162,7 @@ else
      - + @@ -400,15 +400,15 @@ else
      • - - - + + + (+0원)
        - +
        diff --git a/shop/wishlist.php b/shop/wishlist.php index e16ee1b34..66dc6ab62 100644 --- a/shop/wishlist.php +++ b/shop/wishlist.php @@ -61,11 +61,14 @@ include_once('./_head.php'); { ?> 품절 - - + - + + + + + From 54d5cc3021fe260485aac1b155c97193da1c21fc Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 09:27:21 +0900 Subject: [PATCH 02/20] =?UTF-8?q?=EC=9E=A5=EB=B0=94=EA=B5=AC=EB=8B=88=20?= =?UTF-8?q?=EB=8B=B4=EA=B8=B0=20=EC=A0=84=20=EC=88=98=EB=9F=89=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/item.php | 2 +- shop/item.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/shop/item.php b/mobile/shop/item.php index 0735802d2..a3270cd67 100644 --- a/mobile/shop/item.php +++ b/mobile/shop/item.php @@ -673,7 +673,7 @@ else } var val, result = true; - $("input[name='ct_qty[]']").each(function() { + $("input[name^=ct_qty]").each(function() { val = $(this).val(); if(val.length < 1) { diff --git a/shop/item.php b/shop/item.php index 56f2b2b4a..a93694a64 100644 --- a/shop/item.php +++ b/shop/item.php @@ -687,7 +687,7 @@ else } var val, result = true; - $("input[name='ct_qty[]']").each(function() { + $("input[name^=ct_qty]").each(function() { val = $(this).val(); if(val.length < 1) { From 1b2ed3ca0c54da7333f072b236831eb5767a4335 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 09:46:55 +0900 Subject: [PATCH 03/20] =?UTF-8?q?it=5Fname=5Ficon=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EC=BD=94=EB=93=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/item.php | 2 -- mobile/shop/search.php | 1 - shop/item.php | 2 -- shop/search.php | 2 +- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/mobile/shop/item.php b/mobile/shop/item.php index a3270cd67..50fe94071 100644 --- a/mobile/shop/item.php +++ b/mobile/shop/item.php @@ -237,8 +237,6 @@ else
      - -

      상품간략정보 및 구매기능


      diff --git a/mobile/shop/search.php b/mobile/shop/search.php index 6d1221c28..a9629a607 100644 --- a/mobile/shop/search.php +++ b/mobile/shop/search.php @@ -122,7 +122,6 @@ $total_count = $row['cnt']; -

    • diff --git a/shop/item.php b/shop/item.php index a93694a64..bb479d82f 100644 --- a/shop/item.php +++ b/shop/item.php @@ -215,8 +215,6 @@ else
    - -

    요약정보 및 구매

    diff --git a/shop/search.php b/shop/search.php index b013cba5d..f78820d69 100644 --- a/shop/search.php +++ b/shop/search.php @@ -135,7 +135,7 @@ $total_count = $row['cnt']; ?> - + From f7006de1754f152d838def9db1f361da8c8264a2 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 14:29:10 +0900 Subject: [PATCH 04/20] =?UTF-8?q?=ED=9A=8C=EC=9B=90=EC=9D=BC=20=EB=95=8C?= =?UTF-8?q?=20=EB=B3=B4=EA=B4=80=EB=90=9C=20=EC=9E=A5=EB=B0=94=EA=B5=AC?= =?UTF-8?q?=EB=8B=88=20=EC=83=81=ED=92=88=20uq=5Fid=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 53ff9460c..907a2b9a3 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1264,7 +1264,7 @@ function get_new_od_id() // uq_id 설정 function set_unique_id($direct) { - global $default; + global $g4, $default, $member; if ($direct) { $tmp_uq_id = get_session('ss_uq_direct'); @@ -1275,10 +1275,10 @@ function set_unique_id($direct) } else { // 비회원장바구니 uq_id 쿠키설정 if($default['de_guest_cart_use']) { - $g_cart_uq_id = get_cookie('ck_guest_cart_uqid'); - if($g_cart_uq_id) { - set_session('ss_uq_id', $g_cart_uq_id); - set_cookie('ck_guest_cart_uqid', $g_cart_uq_id, ($default['de_cart_keep_term'] * 86400)); + $tmp_uq_id = get_cookie('ck_guest_cart_uqid'); + if($tmp_uq_id) { + set_session('ss_uq_id', $tmp_uq_id); + set_cookie('ck_guest_cart_uqid', $tmp_uq_id, ($default['de_cart_keep_term'] * 86400)); } else { $tmp_uq_id = get_uniqid(); set_session('ss_uq_id', $tmp_uq_id); @@ -1291,6 +1291,20 @@ function set_unique_id($direct) set_session('ss_uq_id', $tmp_uq_id); } } + + // 보관된 회원장바구니 자료 uq_id 변경 + if($member['mb_id'] && $tmp_uq_id) { + $sql = " update {$g4['shop_cart_table']} + set uq_id = '$tmp_uq_id' + where mb_id = '{$member['mb_id']}' + and ct_status = '쇼핑' "; + if($default['de_cart_keep_term']) { + $ctime = date('Y-m-d H:i:s', G4_SERVER_TIME - ($default['de_cart_keep_term'] * 86400)); + $sql .= " and ct_time > '$ctime' "; + } + + sql_query($sql); + } } } From 9d5b854073cc13fcde92690f3198aae22fa70744 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 14:29:53 +0900 Subject: [PATCH 05/20] =?UTF-8?q?=EC=83=81=ED=92=88=EC=98=B5=EC=85=98?= =?UTF-8?q?=EC=9E=AC=EA=B3=A0=EC=97=90=EC=84=9C=20=EC=83=81=ED=92=88id?= =?UTF-8?q?=EA=B0=80=20null=20=EC=95=84=EB=8B=8C=20=EA=B2=83=EB=A7=8C=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/optionstocklist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adm/shop_admin/optionstocklist.php b/adm/shop_admin/optionstocklist.php index 67597f9b2..e3e62b904 100644 --- a/adm/shop_admin/optionstocklist.php +++ b/adm/shop_admin/optionstocklist.php @@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], "r"); $g4['title'] = '상품옵션재고관리'; include_once (G4_ADMIN_PATH.'/admin.head.php'); -$sql_search = " where 1 "; +$sql_search = " where b.it_id is not NULL "; if ($search != "") { if ($sel_field != "") { $sql_search .= " and $sel_field like '%$search%' "; From 22bc6ccc68bbad0525ff1ad752f6b71d27938ea2 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 14:31:52 +0900 Subject: [PATCH 06/20] =?UTF-8?q?=EC=83=81=ED=92=88=EC=98=B5=EC=85=98?= =?UTF-8?q?=EC=9E=AC=EA=B3=A0=EA=B4=80=EB=A6=AC=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=EC=99=80=20=EC=83=81=ED=92=88=EB=AA=85=20=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=20=EA=B3=B5=EB=B0=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/optionstocklist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adm/shop_admin/optionstocklist.php b/adm/shop_admin/optionstocklist.php index e3e62b904..bc2629a45 100644 --- a/adm/shop_admin/optionstocklist.php +++ b/adm/shop_admin/optionstocklist.php @@ -192,7 +192,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌 - + From 35c8d3e1200c06497ed1a0ed0be2f0009bd7c58e Mon Sep 17 00:00:00 2001 From: whitedot Date: Fri, 2 Aug 2013 14:35:21 +0900 Subject: [PATCH 07/20] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90:=20IE6=20gnb?= =?UTF-8?q?=20=EC=98=81=EC=97=AD=20=EB=84=88=EB=B9=84=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/default.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/default.css b/css/default.css index 4ed641460..d1ff348de 100644 --- a/css/default.css +++ b/css/default.css @@ -60,7 +60,7 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline} .gnb_js .gnb_1dli_on a {float:none;background:#333;color:#fff} .gnb_js .gnb_2dul {display:none;position:absolute;top:35px} .gnb_js .gnb_2da {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left} -.gnb_1dli_over .gnb_2dul {display:block;left:0;background:#fff} +.gnb_1dli_over .gnb_2dul {display:block;left:0;width:180px;background:#fff} .gnb_1dli_over2 .gnb_2dul {display:block;right:1px;width:180px;background:#fff} .gnb_empty {width:100%;height:35px;text-align:center;line-height:2.95em} From ed9f108eca2538a7cebed73f6d2fb974d3852842 Mon Sep 17 00:00:00 2001 From: whitedot Date: Fri, 2 Aug 2013 14:39:53 +0900 Subject: [PATCH 08/20] =?UTF-8?q?=EA=B3=B5=ED=86=B5:=20=EC=9D=B5=EC=8A=A4?= =?UTF-8?q?=ED=94=8C=EB=A1=9C=EB=9F=AC=20=EB=A9=94=ED=83=80=20=ED=83=9C?= =?UTF-8?q?=EA=B7=B8=20X-UA-Compatible=20=EC=A3=BC=EC=84=9D=20=ED=95=B4?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- head.sub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/head.sub.php b/head.sub.php index 5f867e0dc..804c8ad9b 100644 --- a/head.sub.php +++ b/head.sub.php @@ -46,8 +46,8 @@ if (defined('G4_IS_ADMIN')) { } else { echo ''.PHP_EOL; } -// echo ''; -// echo ''; +echo ''; +echo ''; ?> Date: Fri, 2 Aug 2013 15:42:02 +0900 Subject: [PATCH 16/20] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=8A=A4=ED=82=A8=20css=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/skin/shop/basic/style.css | 79 ++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 mobile/skin/shop/basic/style.css diff --git a/mobile/skin/shop/basic/style.css b/mobile/skin/shop/basic/style.css new file mode 100644 index 000000000..63108f944 --- /dev/null +++ b/mobile/skin/shop/basic/style.css @@ -0,0 +1,79 @@ + +/* ##### maintype(nn).inc.php, list.skin.(nn).php 공통 적용 시작 ##### */ +/* 공통 */ +.sct_wrap {margin:0 0 30px;zoom:1} +.sct_wrap:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap header {margin:0 0 20px;zoom:1} +.sct_wrap header:after {display:block;visibility:hidden;clear:both;content:""} +.sct_wrap h2 {float:left;margin:0 20px 0 0;padding:0;line-height:1em} +.sct_wrap h2 a {text-decoration:none} +.sct_wrap_hdesc {float:left;margin:0;padding:0;color:#777;line-height:1em} + +.sct {margin:0;padding:0;list-style:none;zoom:1} +.sct:after {display:block;visibility:hidden;clear:both;content:""} +.sct_li {position:relative} +.sct_noitem {padding:100px 0;text-align:center} + +/* 상품 목록 스킨 10 */ +.sct_10 .sct_li {float:left;margin:0 25px 15px 0;} +.sct_10 .sct_last {margin:0 0 15px !important} +.sct_10 .sct_clear {clear:both} +.sct_10 .sct_a {display:block;position:relative;text-decoration:none} +.sct_10 .sct_a:focus, .sct_10 .sct_a:hover {text-decoration:none} +.sct_10 .sct_img {display:block;margin:0 0 15px} +.sct_10 b {display:block;margin:0 0 8px;font-weight:normal} +.sct_10 s {display:block} +.sct_10 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_10 .sct_icon {} +.sct_10 .sct_icon img {} +.sct_10 .sct_sns {position:absolute;top:190px;right:20px} + +/* 상품 목록 스킨 11 */ +.sct_11 .sct_li {float:left;margin:0 25px 15px 0;} +.sct_11 .sct_last {margin:0 0 15px !important} +.sct_11 .sct_clear {clear:both} +.sct_11 .sct_a {display:block;position:relative;padding:0 0 5px;background:#f5f6fa;text-decoration:none} +.sct_11 .sct_a:focus, .sct_11 .sct_a:hover {text-decoration:none} +.sct_11 .sct_img {display:block;margin:0 0 15px} +.sct_11 b {display:block;margin:0 0 8px;padding:0 5px;font-weight:normal} +.sct_11 s {display:block} +.sct_11 .sct_cost {display:block;margin:0 0 10px;padding:0 5px;font-weight:bold} +.sct_11 .sct_icon {position:absolute;top:10px;left:-5px;margin:0 !important} +.sct_11 .sct_icon img {display:block} +.sct_11 .sct_sns {position:absolute;bottom:10px;right:10px} + +/* 상품 목록 스킨 12 */ +.sct_12 .sct_li {float:left;margin:0 16px 15px 0;} +.sct_12 .sct_last {margin:0 0 15px !important} +.sct_12 .sct_clear {clear:both} +.sct_12 .sct_arw_toleft {display:block;z-index:2;position:absolute;top:20px;left:221px;width:10px;height:19px;background:url('../img/shop/icon_arw_toleft.gif') no-repeat} +.sct_12 .sct_a {display:block;position:relative;padding:20px 10px 20px 240px;width:110px;height:190px;border:1px solid #e9e9e9;background:#f5f6fa;text-decoration:none} +.sct_12 .sct_a:focus, .sct_12 .sct_a:hover {text-decoration:none} +.sct_12 .sct_img {position:absolute;top:0;left:0} +.sct_12 b {display:block;margin:0 0 15px;font-size:1.2em;letter-spacing:-0.1em} +.sct_12 p {margin:0 0 15px;padding:0;line-height:1.5em} +.sct_12 s {display:block} +.sct_12 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_12 .sct_icon {position:absolute;bottom:25px;left:-5px;margin:0 !important} +.sct_12 .sct_icon img {display:block} +.sct_12 .sct_sns {position:absolute;bottom:20px;right:10px} + +/* 상품 목록 스킨 13 */ +.sct_13 .sct_li {float:left;margin:0 0 16px 0;width:100%} +.sct_13 .sct_last {} +.sct_13 .sct_clear {clear:both} +.sct_13 .sct_arw_toleft {display:block;z-index:2;position:absolute;top:20px;left:221px;width:10px;height:19px;background:url('../img/shop/icon_arw_toleft.gif') no-repeat} +.sct_13 .sct_a {display:block;position:relative;padding:20px 10px 20px 240px;height:190px;border:1px solid #e9e9e9;background:#f5f6fa;text-decoration:none} +.sct_13 .sct_a:focus, .sct_13 .sct_a:hover {text-decoration:none} +.sct_13 .sct_img {position:absolute;top:0;left:0} +.sct_13 b {display:block;margin:0 0 15px;font-size:1.2em;letter-spacing:-0.1em} +.sct_13 p {margin:0 0 15px;padding:0;line-height:1.5em} +.sct_13 s {display:block} +.sct_13 .sct_cost {display:block;margin:0 0 10px;font-weight:bold} +.sct_13 .sct_icon {position:absolute;bottom:25px;left:-5px;margin:0 !important} +.sct_13 .sct_icon img {display:block} +.sct_13 .sct_rel {position:absolute;bottom:20px;right:20px} +.sct_13 .sct_rel_ul {margin:0;padding:0;list-style:none} +.sct_13 .sct_rel_li {float:left;margin:0 0 0 10px} +.sct_13 .sct_sns {position:absolute;top:20px;right:20px} +/* ##### maintype(nn).inc.php, list.skin.(nn).php 공통 적용 끝 ##### */ From b7ac5d49cdb9817a9745587ee3a4ef081927b823 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 17:26:04 +0900 Subject: [PATCH 17/20] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EC=83=81?= =?UTF-8?q?=ED=92=88=EC=9D=B4=EB=AF=B8=EC=A7=80=EC=88=98=20mod=20=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/categoryform.php | 2 +- adm/shop_admin/categoryformupdate.php | 2 +- extend/shop.extend2.php | 6 ++++++ install/shop.sql | 2 +- mobile/shop/list.php | 6 +++--- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/adm/shop_admin/categoryform.php b/adm/shop_admin/categoryform.php index 54eb30510..f71e85cbf 100644 --- a/adm/shop_admin/categoryform.php +++ b/adm/shop_admin/categoryform.php @@ -238,7 +238,7 @@ $pg_anchor .= ''; - ' id="ca_mobile_list_row" required class="required frm_input" size="3"> + ' id="ca_mobile_list_mod" required class="required frm_input" size="3"> diff --git a/adm/shop_admin/categoryformupdate.php b/adm/shop_admin/categoryformupdate.php index 8ef24a3cf..9af280cda 100644 --- a/adm/shop_admin/categoryformupdate.php +++ b/adm/shop_admin/categoryformupdate.php @@ -63,7 +63,7 @@ $sql_common = " ca_skin = '$ca_skin', ca_list_row = '$ca_list_row', ca_mobile_img_width = '$ca_mobile_img_width', ca_mobile_img_height = '$ca_mobile_img_height', - ca_mobile_list_row = '$ca_mobile_list_row', + ca_mobile_list_mod = '$ca_mobile_list_mod', ca_sell_email = '$ca_sell_email', ca_use = '$ca_use', ca_stock_qty = '$ca_stock_qty', diff --git a/extend/shop.extend2.php b/extend/shop.extend2.php index fdc1f5fe2..a7246f75c 100644 --- a/extend/shop.extend2.php +++ b/extend/shop.extend2.php @@ -401,6 +401,12 @@ if (!sql_query(" select de_mobile_type1_list_mod from {$g4['shop_default_table'] CHANGE `de_mobile_type5_list_row` `de_mobile_type5_list_mod` INT(11) NOT NULL DEFAULT '0' ", true); } +// 분류 모바일 필드명 수정 +if(!sql_query(" select ca_mobile_list_mod from {$g4['shop_category_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g4['shop_category_table']}` + CHANGE `ca_mobile_list_row` `ca_mobile_list_mod` INT(11) NOT NULL DEFAULT '0' ", true); +} + // 과세, 비과세 금액 필드 추가 if(!sql_query(" select od_tax_mny from {$g4['shop_order_table']} limit 1 ", false)) { sql_query(" ALTER TABLE `{$g4['shop_order_table']}` diff --git a/install/shop.sql b/install/shop.sql index 7d21a7af6..d65bf0831 100644 --- a/install/shop.sql +++ b/install/shop.sql @@ -109,7 +109,7 @@ CREATE TABLE IF NOT EXISTS `shop_category` ( `ca_mobile_tail_html` text NOT NULL, `ca_list_mod` int(11) NOT NULL DEFAULT '0', `ca_list_row` int(11) NOT NULL DEFAULT '0', - `ca_mobile_list_row` int(11) NOT NULL DEFAULT '0', + `ca_mobile_list_mod` int(11) NOT NULL DEFAULT '0', `ca_include_head` varchar(255) NOT NULL DEFAULT '', `ca_include_tail` varchar(255) NOT NULL DEFAULT '', `ca_mb_id` varchar(255) NOT NULL DEFAULT '', diff --git a/mobile/shop/list.php b/mobile/shop/list.php index 22097bff5..9ee6412c9 100644 --- a/mobile/shop/list.php +++ b/mobile/shop/list.php @@ -84,14 +84,14 @@ if ($is_admin) echo '
    '; */ - // 총몇개 = 한줄에 몇개 * 몇줄 - $items = $ca['ca_list_mod'] * $ca['ca_list_row']; + // 총몇개 + $items = $ca['ca_mobile_list_mod']; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page == "") $page = 1; // 시작 레코드 구함 $from_record = ($page - 1) * $items; - $list = new item_list($ca['ca_skin'], $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']); + $list = new item_list($ca['ca_mobile_skin'], $ca['ca_mobile_list_mod'], 1, $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']); $list->set_category($ca['ca_id']); $list->set_is_page(true); $list->set_from_record($from_record); From 7f6e45fd1e10ac306331707918a2fc1426886f98 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 17:50:38 +0900 Subject: [PATCH 18/20] =?UTF-8?q?sql=5Forder=20=EB=B9=A0=EC=A7=84=20?= =?UTF-8?q?=EA=B2=83=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 907a2b9a3..6c486b69e 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -299,7 +299,7 @@ class item_list $sql_where = " where " . implode(" and ", $where); $sql_limit = " limit " . $this->from_record . " , " . ($this->list_mod * $this->list_row); - $sql = $sql_select . $sql_common . $sql_where . $sql_limit; + $sql = $sql_select . $sql_common . $sql_where . $sql_order . $sql_limit; $result = sql_query($sql); if ($this->is_page) { From 752bdecbef30a22aa8de882afbdd597d199e6d84 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 17:51:37 +0900 Subject: [PATCH 19/20] =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=EC=97=90=20item=5Flist=20class=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/event.php | 65 ++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/shop/event.php b/shop/event.php index 50df28bbe..2c30c7a52 100644 --- a/shop/event.php +++ b/shop/event.php @@ -26,52 +26,18 @@ echo '
    '.stripslashes($ev['ev_head_html']).'
    '; // 상품 출력순서가 있다면 if ($sort != "") - $order_by = $sort . " , "; - -// 상품 (하위 분류의 상품을 모두 포함한다.) -// 1.02.00 -// a.it_order 추가 -/* -$sql_list1 = " select a.ca_id, - a.it_id, - a.it_name, - a.it_maker, - a.it_point, - a.it_price, - a.it_stock_qty, - a.it_cust_price, - it_basic, - it_opt1, - it_opt2, - it_opt3, - it_opt4, - it_opt5, - it_opt6, - a.it_type1, - a.it_type2, - a.it_type3, - a.it_type4, - a.it_type5 "; -*/ -$sql_list1 = " select * "; -$sql_list2 = " order by $order_by a.it_order, a.it_id desc "; - -$sql_common = " from {$g4['shop_item_table']} a - left join {$g4['shop_event_item_table']} b on (a.it_id=b.it_id) - where b.ev_id = '$ev_id' - and a.it_use = '1' "; + $order_by = $sort.' '.$sortodr.' , b.it_order, b.it_id desc'; $error = ""; if ($skin) $ev['ev_skin'] = $skin; -$td_width = (int)($mod / 100); - // 리스트 유형별로 출력 -$list_file = G4_SHOP_PATH."/{$ev['ev_skin']}"; +$list_file = G4_SHOP_SKIN_PATH."/{$ev['ev_skin']}"; if (file_exists($list_file)) { + /* $list_mod = $ev['ev_list_mod']; $list_row = $ev['ev_list_row']; $img_width = $ev['ev_img_width']; @@ -84,7 +50,32 @@ if (file_exists($list_file)) $result = sql_query($sql); include $list_file; + */ + $list_mod = $ev['ev_list_mod']; + $list_row = $ev['ev_list_row']; + + include G4_SHOP_PATH.'/list.sub.php'; + include G4_SHOP_PATH.'/list.sort.php'; + + // 총몇개 = 한줄에 몇개 * 몇줄 + $items = $ev['ev_list_mod'] * $ev['ev_list_row']; + // 페이지가 없으면 첫 페이지 (1 페이지) + if ($page == "") $page = 1; + // 시작 레코드 구함 + $from_record = ($page - 1) * $items; + + $list = new item_list($ev['ev_skin'], $list_mod, $list_row, $ev['ev_img_width'], $ev['ev_img_height']); + $list->set_event($ev['ev_id']); + $list->set_is_page(true); + $list->set_order_by($order_by); + $list->set_from_record($from_record); + echo $list->run(); + + // where 된 전체 상품수 + $total_count = $list->total_count; + // 전체 페이지 계산 + $total_page = ceil($total_count / $items); } else { From c30ab332fa350806bef8256f425836c87ebaf169 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 2 Aug 2013 17:52:04 +0900 Subject: [PATCH 20/20] =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=20=EC=8A=A4=ED=82=A8=20=EC=84=A4=EC=A0=95=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemeventform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adm/shop_admin/itemeventform.php b/adm/shop_admin/itemeventform.php index 894bf72e9..439ca14b7 100644 --- a/adm/shop_admin/itemeventform.php +++ b/adm/shop_admin/itemeventform.php @@ -86,9 +86,9 @@ include_once (G4_ADMIN_PATH.'/admin.head.php'); - +