From b3fc7561ed96b641a0bafd67e462cd0e6f7ebbbb Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 28 Nov 2013 09:36:19 +0900 Subject: [PATCH] =?UTF-8?q?get=20=EB=B0=A9=EC=8B=9D=20=EA=B5=AC=EB=A7=A4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20=ED=92=88?= =?UTF-8?q?=EC=A0=88=20=EC=B5=9C=EC=86=8C=EC=A3=BC=EB=AC=B8=EC=88=98?= =?UTF-8?q?=EB=9F=89=20=EC=B2=B4=ED=81=AC=ED=86=A0=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 --- shop/itembuy.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shop/itembuy.php b/shop/itembuy.php index 6b51148e4..b15a05998 100644 --- a/shop/itembuy.php +++ b/shop/itembuy.php @@ -8,6 +8,12 @@ $io_id = $_GET['opt']; $sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' "; $it = sql_fetch($sql); +if(!$it['it_id']) + alert('상품정보가 존재하지 않습니다.', G5_SHOP_URL); + +if(is_soldout($it['it_id'])) + alert('상품의 재고가 부족하여 구매할 수 없습니다.', G5_SHOP_URL); + // 상품옵션체크 $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' and io_type = '0' and io_use = '1' "; $cnt = sql_fetch($sql); @@ -15,6 +21,10 @@ $cnt = sql_fetch($sql); if(($io_id && !$cnt['cnt']) || (!$io_id && $cnt['cnt'])) alert('상품의 옵션정보가 변경됐습니다.\\n상품페이지에서 다시 주문해 주십시오.', G5_SHOP_URL.'/item.php?it_id='.$it_id); +// 최소구매수량이 있으면 상세페이지에서 다시 주문토록 안내 +if($it['it_buy_min_qty'] > 1) + alert(get_text($it['it_name']).' 상품은 최소 '.number_format($it['it_buy_min_qty']).' 이상 구매하셔야 합니다.\\n상품페이지에서 다시 주문해 주십시오.', G5_SHOP_URL.'/item.php?it_id='.$it_id); + // 옵션정보 if($io_id && $it['it_option_subject']) { $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '$it_id' and io_id = '$io_id' ";