Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
주문시 재고 체크 it_soldout 도 체크할수 있도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Sep 11, 2017
1 parent 2f0276d commit 24c874f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions shop/ajax.orderstock.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@
for($i=0; $row=sql_fetch_array($result); $i++) {
$ct_qty = $row['ct_qty'];

// 해당 상품이 품절 상태인지 체크합니다.
$sql = " select it_soldout from {$g5['g5_shop_item_table']} where it_id = '".$row['it_id']."' ";
$item = sql_fetch($sql);

// 해당 상품이 품절 상태이면
if( $item['it_soldout'] ){
$item_option = $row['it_name'];
if($row['io_id'])
$item_option .= '('.$row['ct_option'].')';

die( $item_option." 상품이 품절되었습니다.\n\n장바구니에서 해당 상품을 삭제후 다시 주문해 주세요." );
}

if(!$row['io_id'])
$it_stock_qty = get_it_stock_qty($row['it_id']);
else
Expand Down

0 comments on commit 24c874f

Please sign in to comment.