답변 3개
/lib/shop.lib.php 파일에서 아래 함수 찾으셔서
get_item_options()
get_item_supply()
th 태그 부분에서 이미지 넣으세요.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
// 상품 선택옵션
function get_item_options($it_id, $subject)
{
global $g5;
if(!$it_id || !$subject)
return '';
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' and io_use = '1' order by io_no asc ";
$result = sql_query($sql);
if(!mysql_num_rows($result))
return '';
$str = '';
$subj = explode(',', $subject);
$subj_count = count($subj);
if($subj_count > 1) {
$options = array();
// 옵션항목 배열에 저장
for($i=0; $row=sql_fetch_array($result); $i++) {
$opt_id = explode(chr(30), $row['io_id']);
for($k=0; $k<$subj_count; $k++) {
if(!is_array($options[$k]))
$options[$k] = array();
if($opt_id[$k] && !in_array($opt_id[$k], $options[$k]))
$options[$k][] = $opt_id[$k];
}
}
// 옵션선택목록 만들기
for($i=0; $i<$subj_count; $i++) {
$opt = $options[$i];
$opt_count = count($opt);
$disabled = '';
if($opt_count) {
$seq = $i + 1;
if($i > 0)
$disabled = ' disabled="disabled"';
$str .= '
$str .= '
$select = ''.PHP_EOL;
$str .= '
$str .= '
}
}
} else {
$str .= '
$str .= '
$select = '
if($row['io_stock_qty'] < 1)
$soldout = ' [품절]';
else
$soldout = '';
$select .= ''.PHP_EOL;
}
$select .= ''.PHP_EOL;
$str .= '
$str .= '
}
return $str;
}
댓글을 작성하려면 로그인이 필요합니다.