From 80427e60f03c48518ce599c75b920512314aa1dd Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 28 Feb 2019 19:39:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=84=EB=A5=98=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=ED=8C=90=EB=A7=A4=EC=95=88=ED=95=A8=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=EC=8B=9C=20=ED=95=B4=EB=8B=B9=EC=83=81?= =?UTF-8?q?=ED=92=88=EC=9D=84=20=EA=B5=AC=EB=A7=A4=20=EB=AA=BB=ED=95=98?= =?UTF-8?q?=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 --- shop/ajax.orderstock.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/shop/ajax.orderstock.php b/shop/ajax.orderstock.php index ff95b0ee1..bf5c66d7b 100644 --- a/shop/ajax.orderstock.php +++ b/shop/ajax.orderstock.php @@ -49,13 +49,28 @@ for($i=0; $row=sql_fetch_array($result); $i++) { $ct_qty = $row['ct_qty']; // 해당 상품이 품절 또는 판매중지 상태인지 체크합니다. - $sql = " select it_soldout, it_use from {$g5['g5_shop_item_table']} where it_id = '".$row['it_id']."' "; + $sql = " select it_soldout, it_use, ca_id, ca_id2, ca_id3 from {$g5['g5_shop_item_table']} where it_id = '".$row['it_id']."' "; $item = sql_fetch($sql); + + $category_str = ''; + + // 분류에서 판매가능한지 체크합니다. + if( $item['it_use'] && ($item['ca_id'] || $item['ca_id2'] || $item['ca_id3']) ){ + $sql = " select ca_use from {$g5['g5_shop_category_table']} where (ca_id = '".$item['ca_id']."' or ca_id = '".$item['ca_id2']."' or ca_id = '".$item['ca_id3']."') "; + $result2 = sql_query($sql); + + while($ca=sql_fetch_array($result2)){ + if ( ! $ca['ca_use']) { + $item['it_use'] = false; + $category_str = '분류에서 '; + } + } + } // 해당 상품이 품절 상태 또는 판매중지이면 if( $item['it_soldout'] || !$item['it_use'] ){ - $soldout_txt = $item['it_soldout'] ? '품절' : '판매중지'; + $soldout_txt = $item['it_soldout'] ? '품절' : $category_str.'판매중지'; $item_option = $row['it_name']; if($row['io_id']) $item_option .= '('.$row['ct_option'].')';