영카트 포인트 사용 조건문 관련 문의 드립니다. 채택완료
안녕하세요..고수님들
영카트에서 하기와 같은 포인트 결제 조건문이 있는데요.. 이 것을 판매가가 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원 이하일때 포인트 결제 필수..
</p>
<p> if (typeof(f.od_temp_point) != "undefined") {</p>
<p> temp_point = parseInt(f.od_temp_point.value) || 0;</p>
<p> if(od_price <= 5000 && temp_point <= 0) {</p>
<p> alert("포인트를 0 이상 입력하세요.");</p>
<p> f.od_temp_point.select();</p>
<p> return false;</p>
<p> }</p>
<p> </p>
<p> if (f.od_temp_point.value)</p>
<p> {</p>
<p> var point_unit = parseInt(<?php echo $default['de_settle_point_unit']; ?>);</p>
<p> temp_point = parseInt(f.od_temp_point.value) || 0;</p>
<p> </p>
<p> if (temp_point < 0) {</p>
<p> alert("포인트를 0 이상 입력하세요.");</p>
<p> f.od_temp_point.select();</p>
<p> return false;</p>
<p> }</p>
<p> </p>
<p>
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인