옵션항목 수정 시 기존 설정값 있으면 적용되도록 수정

This commit is contained in:
chicpro
2014-01-02 14:28:51 +09:00
parent ed913ca1ea
commit 0cd084cc2a
3 changed files with 34 additions and 2 deletions

View File

@ -128,6 +128,21 @@ if($po_run) {
$opt_stock_qty = 0;
$opt_noti_qty = 0;
$opt_use = 1;
// 기존에 설정된 값이 있는지 체크
if($_POST['w'] == 'u') {
$sql = " select io_price, io_stock_qty, io_noti_qty, io_use
from {$g5['g5_shop_item_option_table']}
where it_id = '{$_POST['it_id']}'
and io_id = '$opt_id'
and io_type = '0' ";
$row = sql_fetch($sql);
$opt_price = (int)$row['io_price'];
$opt_stock_qty = (int)$row['io_stock_qty'];
$opt_noti_qty = (int)$row['io_noti_qty'];
$opt_use = (int)$row['io_use'];
}
?>
<tr>
<td class="td_chk">