선택옵션 질문 채택완료
Copy
if($is_div === 'div') {
$str .= '<div class="get_item_options">'.PHP_EOL;
$str .= '<label for="it_option_1">'.$subj[0].'</label>'.PHP_EOL;
} else {
$str .= '<tr>'.PHP_EOL;
$str .= '<th><label for="it_option_1">'.$subj[0].'</label></th>'.PHP_EOL;
}
$select = '<select id="it_option_1" class="it_option">'.PHP_EOL;
$select .= '<option value="">선택</option>'.PHP_EOL;
$price_ratio = 1.1;
for($i=0; $row=sql_fetch_array($result); $i++) {
$io_price = $row['io_price'] * $price_ratio;
if($io_price >= 0)
$price = ' + '.number_format($io_price).'원';
else
$price = ' '.number_format($io_price).'원';
if($row['io_stock_qty'] < 1)
$soldout = ' [품절]';
else
$soldout = '';
$select .= '<option value="'.$row['io_id'].','.$io_price.','.$row['io_stock_qty'].'">'.$row['io_id'].$price.$soldout.'</option>'.PHP_EOL;
}
$select .= '</select>
안녕하세요 고수님들
위 소스처럼 해서 선택 옵션이 있을 때 *1.1로 수정을 하였는데
선택 옵션을 2개 이상으로 하였을 경우엔 *1.1이 풀립니다 혹시 어디쪽을 수정해야 하는지
아시는 분 계실까요? ㅠㅠ
오늘 하루도 좋은 하루 보내세요
답변 1개
채택된 답변
+20 포인트
eyekiss
5년 전
/js/shop.js 파일에..
function sel_option_process(add_exec) 함수를 수정하면 됩니다.
it_price * 1.1;
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
5년 전
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
복 받으세효!