item.form.skin에서

item.form.skin에서

QA

item.form.skin에서

본문

        <div id="sit_tot_price"></div> 

가격을 합은 어디서 계산을 하나요?

이 질문에 댓글 쓰기 :

답변 4

/js/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))+"원");

 

에 정의된 파일 같습니다..

너무 감사합니다.많이 도움이 되네요 분석한지 얼마안되서요 저도 게시판에 뎃글남길 날이 오겠죠?

답변을 작성하시기 전에 로그인 해주세요.
전체 15
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT