영카트 자바스크립트 이 함수는 어디에 있는걸까요?

영카트 자바스크립트 이 함수는 어디에 있는걸까요?

QA

영카트 자바스크립트 이 함수는 어디에 있는걸까요?

답변 2

본문

영카트 예전버전을 사용하고 있는데 요즘의 영카트 상세페이지처럼 상품정보 옆에 선택 옵션을 넣고 싶은데요

요즘걸 보면서 추가해보려고 하는데 안되네요 ㅜㅜㅜ

혹시 select_it_option_change, select_it_option_post, add_sit_sel_option 이 함수는 어디에 들어있는건지 아시는 분 계신가요?

 

  $(document).on("select_it_option_change", "select.it_option", function(e, $othis) {
        var value = $othis.val(),
            change_id = $othis.attr("id").replace("it_option_", "it_side_option_");
            alert(change_id);

        if( $("#"+change_id).length ){
            $("#"+change_id).val(value).attr("selected", "selected");
        }
    });

    $(document).on("select_it_option_post", "select.it_option", function(e, $othis, idx, sel_count, data) {
        var value = $othis.val(),
            change_id = $othis.attr("id").replace("it_option_", "it_side_option_");

        $("select.it_side_option").eq(idx+1).empty().html(data).attr("disabled", false);

        // select의 옵션이 변경됐을 경우 하위 옵션 disabled
        if( (idx+1) < sel_count) {
            $("select.it_side_option:gt("+(idx+1)+")").val("").attr("disabled", true);
        }
    });
    $(document).on("add_sit_sel_option", "#sit_sel_option", function(e, opt) {

        opt = opt.replace('name="ct_qty[', 'name="'+change_name+'[');

        var $opt = $(opt);
        $opt.removeClass("sit_opt_list");
        $("input[type=hidden]", $opt).remove();

        $(".sit_sel_option .sit_opt_added").append($opt);

    });

    $(document).on("price_calculate", "#sit_tot_price", function(e, total) {

        $(".sit_tot_price").empty().html("<span>총 금액 </span><strong>"+number_format(String(total))+"</strong> 원");

    });

 

이 질문에 댓글 쓰기 :

답변 2

/js/shop.js 파일에 해당 부분을 불러오는 스크립트가 있습니다.

 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 16,737
© SIRSOFT
현재 페이지 제일 처음으로