상품총금액변경
본문
안녕하세요 궁금한점이 있습니다.
shop.js또는 / shop.override.js에서
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(ceil((total) / 10) * 10)+"원");
총금액에서 ceil로 보였으면 좋겠습니다.
혹시 수정위치가 이쪽이 아닌 다른곳에서 넣어야하는지 아시는분 계실까요?
부탁드리겠습니다. 제발 부탁드리겠습니다.
곧 다들 퇴근이실텐데 퇴근하시고 좋은 하루 보내세요 ~~
!-->
답변을 작성하시기 전에 로그인 해주세요.