영카트 포인트 사용 조건문 관련 문의 드립니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
영카트 포인트 사용 조건문 관련 문의 드립니다.

QA

영카트 포인트 사용 조건문 관련 문의 드립니다.

답변 1

본문

안녕하세요..고수님들

 

영카트에서 하기와 같은 포인트 결제 조건문이 있는데요.. 이 것을 판매가가 5,000원 이상일 때는 오류 문구가 뜨지 않고 그냥 진행되고, 5,000원 미만일 때만 오류 문구를 뜨고 포인트를 입력해야 넘어가게 하려면 어떻게 하면 될까요??

 

    var temp_point = 0;
    if (typeof(f.od_temp_point) != "undefined") {
        if (f.od_temp_point.value)
        {
            var point_unit = parseInt(<?php echo $default['de_settle_point_unit']; ?>);
            temp_point = parseInt(f.od_temp_point.value);

            if (temp_point < 0) {
                alert("포인트를 0 이상 입력하세요.");
                f.od_temp_point.select();
                return false;
            }
 

정확한 질문의 요지는 판매가가 5,000원 이하 일때만 포인트를 사용하게 하려고 합니다.

도움 좀 부탁드립니다.

감사합니다.

 

이 질문에 댓글 쓰기 :

답변 1

아래와 같이 추가해보세요.

5000원 이하일때 포인트 결제 필수..


    if (typeof(f.od_temp_point) != "undefined") {
        temp_point = parseInt(f.od_temp_point.value) || 0;
        if(od_price <= 5000 && temp_point <= 0) {
            alert("포인트를 0 이상 입력하세요.");
            f.od_temp_point.select();
            return false;
        }
       
        if (f.od_temp_point.value)
        {
            var point_unit = parseInt(<?php echo $default['de_settle_point_unit']; ?>);
            temp_point = parseInt(f.od_temp_point.value) || 0;
 
            if (temp_point < 0) {
                alert("포인트를 0 이상 입력하세요.");
                f.od_temp_point.select();
                return false;
            }
 
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 0
© SIRSOFT
현재 페이지 제일 처음으로