From 4a9c29d3be3f6694b89083cbb54161d32a016052 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 25 Feb 2014 11:30:04 +0900 Subject: [PATCH] =?UTF-8?q?=ED=92=88=EC=A0=88=20=EC=B2=B4=ED=81=AC?= =?UTF-8?q?=EC=8B=9C=20=EC=88=98=EB=9F=89=20=EC=A4=91=EB=B3=B5=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=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 --- lib/shop.lib.php | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index b0b44bb9a..782811d78 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1840,19 +1840,10 @@ function is_soldout($it_id) $result = sql_query($sql); for($i=0; $row=sql_fetch_array($result); $i++) { - // 주문대기수량 - $sql = " select SUM(ct_qty) as qty from {$g5['g5_shop_cart_table']} - where it_id = '$it_id' - and io_id = '{$row['io_id']}' - and io_type = '{$row['io_type']}' - and ct_stock_use = 0 - and ct_status in ('주문', '입금', '준비') "; - $sum = sql_fetch($sql); - // 옵션 재고수량 $stock_qty = get_option_stock_qty($it_id, $row['io_id'], $row['io_type']); - if($stock_qty - $sum['qty'] <= 0) + if($stock_qty <= 0) $count++; } @@ -1860,19 +1851,10 @@ function is_soldout($it_id) if($i == $count) $soldout = true; } else { - // 주문대기수량 - $sql = " select SUM(ct_qty) as qty from {$g5['g5_shop_cart_table']} - where it_id = '$it_id' - and io_id = '' - and io_type = '0' - and ct_stock_use = 0 - and ct_status in ('주문', '입금', '준비') "; - $sum = sql_fetch($sql); - // 상품 재고수량 $stock_qty = get_it_stock_qty($it_id); - if($stock_qty - $sum['qty'] <= 0) + if($stock_qty <= 0) $soldout = true; }