묻고답하기

  point 모듈에서 point.controller.php 파일중

function triggerInsertComment(&$obj)
    {
        $module_srl = $obj->module_srl;
        $member_srl = $obj->member_srl;
        if(!$module_srl || !$member_srl) return new Object();
        // Do not increase the points if the member is the author of the post
        $document_srl = $obj->document_srl;
        $oDocumentModel = getModel('document');
        $oDocument = $oDocumentModel->getDocument($document_srl);
        if(!$oDocument->isExists() || abs($oDocument->get('member_srl'))==abs($member_srl)) return new Object();
        // Get the point module information
        $oModuleModel = getModel('module');
        $config = $oModuleModel->getModuleConfig('point');
        $module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
        // Get the points of the member
        $oPointModel = getModel('point');
        $cur_point = $oPointModel->getPoint($member_srl, true);

        $point = $module_config['insert_comment'];
        if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_comment;
        // Increase the point
        $cur_point += $point;
        $this->setPoint($member_srl,$cur_point);

        return new Object();
    }

이부분을 참고로 예약모듈용 트리거를 만들고 있습니다.

예약 모듈에서 예약시 포인트 적용을 하고 싶은데, 나머지 php 부분은 비슷한 형식으로 다 추가했습니다.

이부분이 차감의 핵심인거 같은데 맞나요?

아무리 수정해봐도 적용이 안되는군요...

알고 싶은건 예약 모듈에서도 따로 무언가의 해당 코드를 추가를 해줘야 적용되는 건가요?

아니면 point 모듈에서만 수정으만으로도 예약모듈에  포인트 차감이 적용이 되는건가요?

이걸로 3일간 씨름을 하고 있습니다...

맨땅에 헤딩하는거라 저부분이 맞는건지도 모르겠네요... 

function triggerBookingTobook(&$obj)
    {
        $module_srl = $obj->module_srl;
        $member_srl = $obj->member_srl;
        $bookingSrl = $obj->bookingSrl;
        $bookingerSrl = $obj->bookingerSrl;
        if(!$bookingSrl || !$bookingerSrl) return new Object();
        // Do not increase the points if the member is the author of the post
        $productNo = $obj->productNo;
        $oDocumentModel = getModel('booking');
        $oDocument = $oDocumentModel->getDocument($productNo);
        // Get the point module information
        $oModuleModel = getModel('module');
        $config = $oModuleModel->getModuleConfig('point');
        $module_config = $oModuleModel->getModulePartConfig('point', $bookingSrl);
        // Get the points of the member
        $oPointModel = getModel('point');
        $cur_point = $oPointModel->getPoint($bookingerSrl, true);

        $point = $module_config['insert_booking'];
        if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_booking;
        // Increase the point
        $cur_point += $point;
        $this->setPoint($bookingerSrl,$cur_point);

        return new Object();

}

이부분이 수정하고 있는 소스입니다..

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
시원한물냉 게시판 정렬순서 바꾸기 [1] 2016.06.22 by sejin7940
OndineJ 영상 태그를 달았을때 글 등록이 안됩니다ㅠㅠ  
리인 ie에서 이미지 리사이징이 안 됩니다.  
멍멍 위젯에서 ipaddres질문입니다 [2] 2016.06.22 by 멍멍
산소남 유튜브 소스 붙여넣으면 전체화면이 안되요  
제투 스케치북 질문드립니다 [1] file 2016.06.22 by sejin7940
토레노 XE모바일모드 질문 [2] 2016.06.22 by 토레노
dev_**** xe 로그인 관련 문의드립니다. [2] 2016.06.22 by dev_****
흑사탕 스케치북5 게시판 댓글작성자 [10] 2016.06.22 by 흑사탕
Eric XE 설치 HTTP500 에러(최초설치) [4] 2016.06.22 by Eric
큐원 단어차단 애드온이 안되는데 도움 부탁드립니다 [2] 2016.06.21 by 큐원
기서피 누리고 정식모듈 설치 후 문제점인데요!! file  
사각고릴라 관리자페이지에서 게시판수정에 문제가 있습니다.  
elancer 사용자정의의 링크를 글제목과 썸네일에 적용하고 싶습니다. [1] 2016.06.21 by DoorWeb
토레노 안녕하세요~텍스트링크에 관해서 질문드립니다. [2] 2016.06.21 by 토레노
일홍 슬라이드에 화살표를 넣고 싶습니다. [1] 2016.06.21 by Ansi™
taekim4009 메뉴에 바로가기로 되어 있는 제목을 눌렀을때 반응이 없게 할수 있을까요? [1] 2016.06.21 by DoorWeb
행복공간공방 xedition 서브 타이틀 문의.. [1] 2016.06.21 by sejin7940
ben****0efa3 게시판 Page navigation 문제 [1] 2016.06.21 by sejin7940
어라얼랑 최근 로그인 회원 정보 가져오는 방법 문의 드려요