답변 3개
이건 var $el_qty = $("input[name^=ct_qty]"); 이부분을 합산해서 보여주는 소스를 추가해야 할듯 하다
어디까지 바라는 거냐? 어디를 봐야 할지 모른다고 해서 위치를 찾아 줬으면 알아서 해라
댓글을 작성하려면 로그인이 필요합니다.
추가 피해자 방지 https://sir.kr/conflictconsultation/245" rel="nofollow noreferrer noopener" target="_blank">https://sir.kr/conflictconsultation/245
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
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("총 금액 : "+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("총 금액 "+number_format(String(total))+" 원");
} else { cached_function.apply(this, arguments); // use .apply() to call it } }; }()); } //end if check function
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인