COMING SOON 🚀

채택완료

포인트 배송비까지 포함하려하려면 어떻게 수정하는게 좋을까요

Copy
if (temp_point < od_price) {

    alert("테스트1 - 구매 가격보다 포인트가 적습니다.");

    f.od_temp_point.select();

    return false;
    }

 

배송비를 포함해서 하고 싶은데 어떻게 수정하는게 좋을까요?

|

답변 2개 / 댓글 5개

채택된 답변
+20 포인트

Copy
if (temp_point < od_price + send_cost + send_cost2) {
    alert("테스트1 - 구매 가격보다 포인트가 적습니다.");
    f.od_temp_point.select();
    return false;
    }

답변에 대한 댓글 5개

if (temp_point > max_point) {
alert(max_point + "점 이상 결제할 수 없습니다.");
f.od_temp_point.select();
return false;
}

에러가 발생하는데 해결할 방법이 없을까요 선생님 ㅠ_ㅠ
에러내용을 알려주세요
62000점이 원가이면 배송비가 3000점 붙여서 결제하게끔 주신 코드를 입력하면
65000점이 결제되어야하는데 65000점을 입력하면
62000점 이상 결제할 수 없습니다 라고 뜹니다. 아래 사진첨부
var max_point_and_cost = max_point + send_cost + send_cost2;
if (temp_point > max_point_and_cost ) {
alert(max_point_and_cost + "점 이상 결제할 수 없습니다.");
f.od_temp_point.select();
return false;
}
에러 창이 뜹니다..
그냥 Error

답변을 작성하려면 로그인이 필요합니다.