and io_id like '$opt_id".chr(30)."'
*/
$sql = " select * from {$g5['g5_shop_item_option_table']}
where io_type = '0'
and it_id = '$it_id'
and io_use = '1'
and io_id like '$opt_id".chr(30)."%'
order by io_no asc ";
$result = sql_query($sql);
$option_title = '선택';
if( $op_title && ($op_title !== $option_title) && $it['it_option_subject'] ){
$array_tmps = explode(',', $it['it_option_subject']);
if( isset($array_tmps[$idx+1]) && $array_tmps[$idx+1] ){
$option_title = $array_tmps[$idx+1];
}
}
$str = '';
$opt = array();
for($i=0; $row=sql_fetch_array($result); $i++) {
$val = explode(chr(30), $row['io_id']);
$key = $idx + 1;
if(!strlen($val[$key]))
continue;
$continue = false;
foreach($opt as $v) {
if(strval($v) === strval($val[$key])) {
$continue = true;
break;
}
}
if($continue)
continue;
$opt[] = strval($val[$key]);
if($key + 1 < $sel_count) {
$str .= PHP_EOL.'';
} else {
if($row['io_price'] >= 0)
$price = ' + '.number_format($row['io_price']).'원';
else
$price = ' '.number_format($row['io_price']).'원';
$io_stock_qty = get_option_stock_qty($it_id, $row['io_id'], $row['io_type']);
if($io_stock_qty < 1)
$soldout = ' [품절]';
else
$soldout = '';
$str .= PHP_EOL.'';
}
}
echo $str;