From 3ca77a38fb10e10e3cd629a8b4235564d7c0e864 Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 23 Oct 2024 15:23:37 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9C=84=EC=8B=9C=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=A3=BC=EB=AC=B8=ED=95=98=EA=B8=B0?= =?UTF-8?q?=EC=8B=9C=20=EC=83=81=ED=92=88=EC=9D=B4=20=EC=9E=98=EB=AA=BB=20?= =?UTF-8?q?=EC=9E=A5=EB=B0=94=EA=B5=AC=EB=8B=88=20=EB=8B=B4=EA=B8=B0?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/cartupdate.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/shop/cartupdate.php b/shop/cartupdate.php index 9479f0b98..9233bd38b 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -148,7 +148,12 @@ else // 장바구니에 담기 $post_io_ids = (isset($_POST['io_id']) && is_array($_POST['io_id'])) ? $_POST['io_id'] : array(); $post_io_types = (isset($_POST['io_type']) && is_array($_POST['io_type'])) ? $_POST['io_type'] : array(); $post_ct_qtys = (isset($_POST['ct_qty']) && is_array($_POST['ct_qty'])) ? $_POST['ct_qty'] : array(); - + + if ($count && $sw_direct) { + // 바로구매에 있던 장바구니 자료를 지운다. + sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false); + } + for($i=0; $i<$count; $i++) { // 보관함의 상품을 담을 때 체크되지 않은 상품 건너뜀 if($act == 'multi' && ! (isset($post_chk_it_id[$i]) && $post_chk_it_id[$i])) @@ -180,10 +185,6 @@ else // 장바구니에 담기 if(!$it['it_id']) alert('상품정보가 존재하지 않습니다.'); - // 바로구매에 있던 장바구니 자료를 지운다. - if($i == 0 && $sw_direct) - sql_query(" delete from {$g5['g5_shop_cart_table']} where od_id = '$tmp_cart_id' and ct_direct = 1 ", false); - // 최소, 최대 수량 체크 if($it['it_buy_min_qty'] || $it['it_buy_max_qty']) { $sum_qty = 0;