채택완료

영카트 sms 질문..

2016-04-26 (화) 16:00:35 4,258

사전에 정의된 SMS프리셋

  여기에 {결재방법}을 넣어서 주문시 관라자에게 발송 이란에 넣어

  신용카든지 무통장인지 문자로 받아보려구 하는데요.

admin.shop.lib.php 이파일중에

아래처럼 해보았는데 안되는데요!

혹씨 다른곳도 어디 뭐 해줘야 하나요? 초보질문입니다

// 처리내용 SMS
function conv_sms_contents($od_id, $contents)
{
    global $g5, $config, $default;

    $sms_contents = '';

    if ($od_id && $config['cf_sms_use'] == 'icode')
    {
        $sql = " select od_id, od_name, od_invoice, od_receipt_price, od_delivery_company, od_settle_case
                    from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
        $od = sql_fetch($sql);

        $sms_contents = $contents;
        $sms_contents = str_replace("{이름}", $od['od_name'], $sms_contents);
        $sms_contents = str_replace("{입금액}", number_format($od['od_receipt_price']), $sms_contents);
        $sms_contents = str_replace("{택배회사}", $od['od_delivery_company'], $sms_contents);
        $sms_contents = str_replace("{운송장번호}", $od['od_invoice'], $sms_contents);
        $sms_contents = str_replace("{주문번호}", $od['od_id'], $sms_contents);
        $sms_contents = str_replace("{회사명}", $default['de_admin_company_name'], $sms_contents);
  $sms_contents = str_replace("{결재방법}", $od['od_settle_case'], $sms_contents);
    }

    return stripslashes($sms_contents);
}
?> 

답변 5개 / 댓글 2개

채택된 답변
+20 포인트

주문 때 관리자에게 SMS를 발송하는 부분은 shop/orderformupdate.php 파일입니다.

답변에 대한 댓글 1개

shop/orderformupdate.php 을

$sms_content = str_replace("{결재방법}", $od_settle_case, $sms_content);

하면 되네요 감사합니다!

문법상으로는 문제가 없어보이는데

{결재방법} 이부분이 세팅이 제대로 되어있는것인지 모르겠네요.

 

​ 

답변에 대한 댓글 1개

문자오는거보면 결재방법{} 이런식으로 와요 ㅠㅠ
아뇨.. 소스에서 에코로 찍어보면 값이 나오시는지

505adba3951fd8f6337124feee0e8951_1461654503_5953.jpg

값은 있어요..
 

혹시 오타는 아니실지..

결제방법 인데..

아니면 od_settle_case 에 값이 있는지부터 검사해보세요

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