답변 3개 / 댓글 2개
추가 피해자 방지 https://sir.kr/conflictconsultation/245
shop.js 최 하단함수를 수정하면 될듯합니다.
function price_calculate()
{
var it_price = parseInt($("input#it_price").val());
if(isNaN(it_price))
return;
var $el_prc = $("input.io_price");
var $el_qty = $("input[name^=ct_qty]");
var $el_type = $("input[name^=io_type]");
var price, type, qty, total = 0;
$el_prc.each(function(index) {
price = parseInt($(this).val());
qty = parseInt($el_qty.eq(index).val());
type = $el_type.eq(index).val();
if(type == "0") { // 선택옵션
total += (it_price + price) * qty;
} else { // 추가옵션
total += price * qty;
}
});
$("#sit_tot_price").empty().html("<span>총 금액 :</span> "+number_format(String(total))+"원");
}
또는 shop.overide.js
하단에
if (typeof price_calculate === "function") {
price_calculate = (function() {
var cached_function = price_calculate;
return function() {
if( $(".2017_renewal_itemform").length ){
var it_price = parseInt($("input#it_price").val());
if(isNaN(it_price))
return;
var $el_prc = $("input.io_price");
var $el_qty = $("input[name^=ct_qty]");
var $el_type = $("input[name^=io_type]");
var price, type, qty, total = 0;
$el_prc.each(function(index) {
price = parseInt($(this).val());
qty = parseInt($el_qty.eq(index).val());
type = $el_type.eq(index).val();
if(type == "0") { // 선택옵션
total += (it_price + price) * qty;
} else { // 추가옵션
total += price * qty;
}
});
$("#sit_tot_price").empty().html("<span>총 금액 </span><strong>"+number_format(String(total))+"</strong> 원");
} else {
cached_function.apply(this, arguments); // use .apply() to call it
}
};
}());
} //end if check function
답변을 작성하려면 로그인이 필요합니다.
