diff --git a/js/shop.js b/js/shop.js index caae52746..b1846cb45 100644 --- a/js/shop.js +++ b/js/shop.js @@ -1,6 +1,6 @@ $(function() { // 선택옵션 - $("select[name='it_option[]']").change(function() { + $("select[name='it_option[]']").live("change", function() { var sel_count = $("select[name='it_option[]']").size(); var idx = $("select[name='it_option[]']").index($(this)); var val = $(this).val(); @@ -57,19 +57,19 @@ $(function() { }); // 추가옵션 - $("select[name='it_supply[]']").change(function() { + $("select[name='it_supply[]']").live("change", function() { var $el = $(this); // 선택옵션 자동추가 기능을 사용하려면 아래 false를 true로 설정 sel_supply_process($el, false); }); // 선택옵션 추가 - $("#sit_selopt_submit").click(function() { + $("#sit_selopt_submit").live("click", function() { sel_option_process(true); }); // 추가옵션 추가 - $("button.sit_sel_submit").click(function() { + $("button.sit_sel_submit").live("click", function() { var $el = $(this).closest("td").find("select[name='it_supply[]']"); sel_supply_process($el, true); }); @@ -118,14 +118,11 @@ $(function() { if($el.hasClass("sit_opt_list")) { if($(".sit_opt_list").size() <= 1) del_exec = false; - } else { - if($(".sit_opt_list").size() < 1) - del_exec = false; } } if(del_exec) { - $(this).closest("li").remove(); + $el.closest("li").remove(); price_calculate(); } else { alert("선택옵션은 하나이상이어야 합니다."); diff --git a/lib/shop.lib.php b/lib/shop.lib.php index f3e59be3c..009804a76 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -683,7 +683,7 @@ function print_item_options($it_id, $uq_id) { global $g4; - $sql = " select ct_option from {$g4['shop_cart_table']} where it_id = '$it_id' and uq_id = '$uq_id' order by ct_num asc "; + $sql = " select ct_option from {$g4['shop_cart_table']} where it_id = '$it_id' and uq_id = '$uq_id' order by io_type asc, ct_num asc, ct_id asc "; $result = sql_query($sql); $str = ''; diff --git a/shop/cartoption.php b/shop/cartoption.php new file mode 100644 index 000000000..d1fc9a836 --- /dev/null +++ b/shop/cartoption.php @@ -0,0 +1,161 @@ + + +
+ + \ No newline at end of file diff --git a/shop/cartsub.inc.php b/shop/cartsub.inc.php index 77573d2e6..55dcdf30b 100644 --- a/shop/cartsub.inc.php +++ b/shop/cartsub.inc.php @@ -14,6 +14,8 @@ else $colspan = 6; ?> + +