옵션 재고수량 0일 때 품절표시 추가
This commit is contained in:
@ -573,7 +573,12 @@ function get_item_options($it_id, $subject)
|
|||||||
else
|
else
|
||||||
$price = ' '.number_format($row['io_price']).'원';
|
$price = ' '.number_format($row['io_price']).'원';
|
||||||
|
|
||||||
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$price.'</option>'.PHP_EOL;
|
if(!$row['io_stock_qty'])
|
||||||
|
$soldout = ' [품절]';
|
||||||
|
else
|
||||||
|
$soldout = '';
|
||||||
|
|
||||||
|
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$price.$soldout.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
$select .= '</select>'.PHP_EOL;
|
$select .= '</select>'.PHP_EOL;
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,12 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
|
|||||||
else
|
else
|
||||||
$price = ' '.number_format($row['io_price']).'원';
|
$price = ' '.number_format($row['io_price']).'원';
|
||||||
|
|
||||||
$str .= PHP_EOL.'<option value="'.$val[$key].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$val[$key].$price.'</otpion>';
|
if(!$row['io_stock_qty'])
|
||||||
|
$soldout = ' [품절]';
|
||||||
|
else
|
||||||
|
$soldout = '';
|
||||||
|
|
||||||
|
$str .= PHP_EOL.'<option value="'.$val[$key].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$val[$key].$price.$soldout.'</otpion>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user