선택 옵션 추가 옵션 구분.ㅠㅠㅠㅠ
본문
영카트 5사용중인데요..... type구분이...ㅠㅠ
영카트 기본 제공소스가 선택 옵션 / 추가옵션 선택시 한부분에 다같이 나오게 되는데...이걸 밑에처럼
선택옵션 선택시 선택옵션 하단에
추가옵션 선택시 추가옵션 하단에 나타내게 하고싶은데..방법이 멀까요
하다하다 안되서.ㅠㅠ
jquery 소스
// 선택된 옵션 출력
}
{
var item_code = $("input[name='it_id[]']").val();
var opt = "";
var li_class = "sit_opt_list";
if(type)
li_class = "sit_spl_list";
var opt_prc;
var it_price = parseInt($("input#it_price").val());
if(parseInt(price) >= 0)
opt_prc = "(+"+number_format(String(price))+"원)";
else
opt_prc = "("+number_format(String(price))+"원)";
opt += "<li class=\""+li_class+"\">";
opt += "<input type=\"hidden\" name=\"io_type["+item_code+"][]\" value=\""+type+"\">";
opt += "<input type=\"hidden\" name=\"io_id["+item_code+"][]\" value=\""+id+"\">";
opt += "<input type=\"hidden\" name=\"io_value["+item_code+"][]\" value=\""+option+"\">";
opt += "<input type=\"hidden\" class=\"io_price\" value=\""+price+"\">";
opt += "<input type=\"hidden\" class=\"io_stock\" value=\""+stock+"\">";
opt += "<span class=\"sit_opt_subj\">"+option+"</span>";
opt += "<span> | 수량 <button type=\"button\" class=\"sit_qty_minus btn_frmline\">-</button>";
opt += "<input type=\"text\" name=\"ct_qty["+item_code+"][]\" value=\"1\" class=\"frm_input\" size=\"5\">";
opt += "<button type=\"button\" class=\"sit_qty_plus btn_frmline\">+</button>";
opt += "<button type=\"button\" class=\"sit_opt_del btn_frmline\">삭제</button></span>";
opt += "</li>";
if($("#sit_sel_option > ul").size() < 1) {
$("#sit_sel_option").html("<ul id=\"sit_opt_added\"></ul>");
$("#sit_sel_option > ul").html(opt);
} else{
if(type) {
if($("#sit_sel_option .sit_spl_list").size() > 0) {
$("#sit_sel_option .sit_spl_list:last").after(opt);
} else {
if($("#sit_sel_option .sit_opt_list").size() > 0) {
$("#sit_sel_option .sit_opt_list:last").after(opt);
} else {
$("#sit_sel_option > ul").html(opt);
}
}
} else {
if($("#sit_sel_option .sit_opt_list").size() > 0) {
$("#sit_sel_option .sit_opt_list:last").after(opt);
} else {
if($("#sit_sel_option .sit_spl_list").size() > 0) {
$("#sit_sel_option .sit_spl_list:first").before(opt);
} else {
$("#sit_sel_option > ul").html(opt);
}
}
}
}
price_calculate();
}
item.form.skin.php 파일 소스 내에 옵션 나타내는 부분
<?php if ($is_orderable) { ?>
<?php } ?>
<section id="sit_sel_option">
<h3>선택된 옵션</h3>
<?php
if(!$option_item) {
if(!$it['it_buy_min_qty'])
$it['it_buy_min_qty'] = 1;
?>
<ul id="sit_opt_added">
<li class="sit_opt_list">
<input type="hidden" name="io_type[<?php echo $it_id; ?>][]" value="0">
<input type="hidden" name="io_id[<?php echo $it_id; ?>][]" value="">
<input type="hidden" name="io_value[<?php echo $it_id; ?>][]" value="<?php echo $it['it_name']; ?>">
<input type="hidden" class="io_price" value="0">
<input type="hidden" class="io_stock" value="<?php echo $it['it_stock_qty']; ?>">
<span class="sit_opt_subj"><?php echo $it['it_name']; ?></span>
<span>
<label for="ct_qty_<?php echo $i; ?>" >수량</label>
<button type="button" class="sit_qty_minus btn_frmline">-</button>
<input type="text" name="ct_qty[<?php echo $it_id; ?>][]" value="<?php echo $it['it_buy_min_qty']; ?>" id="ct_qty_<?php echo $i; ?>" class="frm_input" size="5">
<button type="button" class="sit_qty_plus btn_frmline">+</button>
</span>
</li>
</ul>
<script>
$(function() {
price_calculate();
});
</script>
<?php } ?>
</section>
<!-- } 선택된 옵션 끝 -->
<!-- 총 구매액 -->
<div id="sit_tot_price"></div>
<?php } ?>
!-->!-->
답변을 작성하시기 전에 로그인 해주세요.