주문 마지막 다음버튼누를때 확인버튼 메세지 추가하고 싶습니다

주문 마지막 다음버튼누를때 확인버튼 메세지 추가하고 싶습니다

QA

주문 마지막 다음버튼누를때 확인버튼 메세지 추가하고 싶습니다

본문

'총 결제하실 금액 000중에서 포인트 0점  무통장 : 000원으로 주문하셨습니다. 금액이 올바른지 확인해주십시요'

 

이문구가 팝업으로 나오는데요 이 문구에 아래와 같이 추가로주문자 이름을 넣고 싶습니다

 

ex)

주문이 완료되었습니다

000님 주문해주셔서 감사드립니다.

 

총결제하실금액000중에서 .......생략---

 

이런식으로요

 

아래소스를 수정하면될거같은데 잘모르겠습니다

 

<script language='javascript'>
function frmorderreceipt_check(f)
{
    errmsg = "";
    errfld = "";

    settle_amount = parseFloat(f.od_amount.value) + parseFloat(f.od_send_cost.value);
    od_receipt_bank = 0;
    od_receipt_card = 0;
    od_temp_point = 0;

    if (typeof(f.od_temp_point) != 'undefined')
    {
        od_temp_point = parseFloat(no_comma(f.od_temp_point.value));
        if (od_temp_point > 0)
        {
            /*
            // 포인트 최소 결제점수
            if (od_temp_point < <?=(int)($default[de_point_settle] * $default[de_point_per] / 100)?>)
            {
                //alert("포인트 결제액은 <?=display_point($default[de_point_settle])?> 이상 가능합니다.");
                alert("포인트 결제액은 <?=display_point($default[de_point_settle] * $default[de_point_per] / 100)?> 이상 가능합니다.");
                return;
            // 가지고 있는 포인트 보다 많이 입력했다면
            }
            else
            */
            if (od_temp_point > <? echo (int)$od_temp_point ?>)
            {
                alert("포인트 결제액은 <? echo display_point($od_temp_point) ?> 까지 가능합니다.");
                return;
            }
        }
    }

    if (typeof(f.od_receipt_card) != 'undefined')
    {
        od_receipt_card = parseFloat(no_comma(f.od_receipt_card.value));
        if (od_receipt_card < <?=(int)($default[de_card_max_amount])?>)
        {
            alert("신용카드 결제액은 <?=display_amount($default[de_card_max_amount])?> 이상 가능합니다.");
            return;
        }
    }

    if (typeof(f.od_receipt_bank) != 'undefined')
    {
        od_receipt_bank = parseFloat(no_comma(f.od_receipt_bank.value));
        if (f.od_bank_account.value == "" && od_receipt_bank > 0)
        {
            alert("무통장으로 입금하실 은행 계좌번호를 선택해 주십시오.");
            f.od_bank_account.focus();
            return;
        }

        if (f.od_deposit_name.value.length < 2)
        {
            alert("입금자분 이름을 입력해 주십시오.");
            f.od_deposit_name.focus();
            return;
        }
    }

    sum = od_receipt_bank + od_receipt_card + od_temp_point;
    if (settle_amount != sum)
    {
        alert("입력하신 입금액 합계와 결제금액이 같지 않습니다."+sum+"");
        return;
    }

    // 음수일 경우 오류
    if (od_temp_point < 0 || od_receipt_card < 0 || od_receipt_bank < 0)
    {
        alert("금액은 음수가 될 수 없습니다.");
        return;
    }

    str_card = "";
    str = "총 결제하실 금액 " + number_format(f.od_settle_amount.value) + "원 중에서\n\n";
    if (typeof(f.od_temp_point) != 'undefined')
        str += "포인트 : " + number_format(f.od_temp_point.value) + "점\n\n";
    if (typeof(f.od_receipt_card) != 'undefined')
    {
        str += "신용카드 : " + number_format(f.od_receipt_card.value) + "원\n\n";
        if (parseFloat(f.od_receipt_card.value) > 0)
        {
            // 카드, 계좌이체 결제시 포인트부여 여부
            if (!f.de_card_point.value)
                str_card += "\n\n---------------------------------------\\n\\n카드, 계좌이체 결제시 적립포인트는 부여하지 않습니다.";
         }
    }
    if (typeof(f.od_receipt_bank) != 'undefined')
        str += "<?=$od_settle_case?> : " + number_format(f.od_receipt_bank.value) + "원\n\n";
    str += "으로 주문 하셨습니다.\n\n"+
           "금액이 올바른지 확인해 주십시오."+str_card;


    sw_submit = confirm(str);
    if (sw_submit == false)
        return;

    document.getElementById('id_submit').style.display = 'none';
    document.getElementById('id_saving').style.display = '';

    f.submit();
}

function compute_amount(f, fld)
{
    x = no_comma(fld.value);
    if (isNaN(x))
    {
        alert("숫자가 아닙니다.");
        fld.value = fld.defaultValue;
        fld.focus();
        return;
    }
    else if (x == "")
        x = 0;
    x = parseFloat(x);
   
    // 100점 미만 버림
    if (fld.name == "od_temp_point") {
        x = parseInt(x / 100) * 100;
    }

    fld.value = number_format(String(x));

    settle_amount = parseFloat(f.od_amount.value) + parseFloat(f.od_send_cost.value);

    od_receipt_bank = 0;
    od_receipt_card = 0;
    od_temp_point = 0;

    if (typeof(f.od_receipt_bank) != 'undefined')
        od_receipt_bank = parseFloat(no_comma(f.od_receipt_bank.value));

    if (typeof(f.od_receipt_card) != 'undefined')
        od_receipt_card = parseFloat(no_comma(f.od_receipt_card.value));

    if (typeof(f.od_temp_point) != 'undefined')
        od_temp_point   = parseFloat(no_comma(f.od_temp_point.value));

    sum = od_receipt_bank + od_receipt_card + od_temp_point;

    // 입력합계금액이 결제금액과 같지 않다면
    if (sum != settle_amount)
    {
        if (fld.name == 'od_temp_point')
        {
            if (typeof(f.od_receipt_bank) != 'undefined')
            {
                od_receipt_bank = settle_amount - (od_temp_point + od_receipt_card);
                f.od_receipt_bank.value = number_format(String(od_receipt_bank));
            }
            else if (typeof(f.od_receipt_card) != 'undefined')
            {
                od_receipt_card = settle_amount - (od_temp_point + od_receipt_bank);
                f.od_receipt_card.value = number_format(String(od_receipt_card));
            }
            else
            {
                f.od_temp_point.value = number_format(String(od_temp_point));
            }
        }
        else if (fld.name == 'od_receipt_card')
        {
            if (typeof(f.od_receipt_bank) != 'undefined')
            {
                od_receipt_bank = settle_amount - (od_temp_point + od_receipt_card);
                f.od_receipt_bank.value = number_format(String(od_receipt_bank));
            }
            else
            {
                f.od_receipt_card.value = number_format(String(od_receipt_card));
            }
        }
        else if (fld.name == 'od_receipt_bank')
        {
            if (typeof(f.od_temp_point) == 'undefined')
            {
                if (typeof(f.od_receipt_card) == 'undefined') {
                    ;
                } else {
                    od_receipt_card = settle_amount - od_receipt_bank;
                    f.od_receipt_card.value = number_format(String(od_receipt_card));
                }
            }
        }
        return;
    }
}
</script>​

 

이 질문에 댓글 쓰기 :

답변 3

   str_card = "";
  str = "주문이완료되었습니다\n";
if (typeof(f.od_deposit_name) != 'undefined')
        str += "" + number_format(f.od_deposit_name.value) + "님 주문해주셔서 감사합니다\n\n";

    if (typeof(f.od_settle_amount) != 'undefined')
        str += "총 결제하실 금액 : " + number_format(f.od_settle_amount.value) + "원 중에서\n";​

.

.

.

.

.

 

 

str_card = "";

    str = "총 결제하실 금액 " + number_format(f.od_settle_amount.value) + "원 중에서\n\n"; 

 

여기에 총 결제하실 금액 앞에 추가해주시면 되요~

답변을 작성하시기 전에 로그인 해주세요.
전체 123,127 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT