Changeset 17369


Ignore:
Timestamp:
2008/06/23 15:50:48 (16 years ago)
Author:
Yammy
Message:

仮登録完了メール再送機能
http://svn.ec-cube.net/open_trac/ticket/309
実装

Location:
branches/comu-ver2/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/Smarty/templates/default/admin/customer/index.tpl

    r17365 r17369  
    5555  } 
    5656 
     57  function fnReSendMail(customer_id) { 
     58    if (confirm('仮登録メールを再送しても宜しいですか?')) { 
     59      document.form1.mode.value = "resend_mail" 
     60      document.form1['edit_customer_id'].value = customer_id; 
     61      document.form1.submit(); 
     62      return false; 
     63    } 
     64  } 
     65 
    5766  function fnSubmit() { 
    5867    document.form1.submit(); 
     
    8190      <th>顧客名(カナ)</th> 
    8291      <td><!--{if $arrErr.kana}--><span class="attention"><!--{$arrErr.kana}--></span><br /><!--{/if}--><input type="text" name="kana" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$arrForm.kana|escape}-->" size="30" class="box30" <!--{if $arrErr.kana}--><!--{sfSetErrorStyle}--><!--{/if}--> /></td> 
     92    </tr> 
     93    <tr> 
     94      <th>会員状態</th> 
     95      <td><!--{html_checkboxes name="status" options=$arrStatus separator="&nbsp;" selected=$arrForm.status}--></td> 
    8396    </tr> 
    8497    <tr> 
     
    254267</form> 
    255268 
    256 <!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete') }--> 
     269<!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete' or $smarty.post.mode == 'resend_mail') }--> 
    257270 
    258271<!--★★検索結果一覧★★--> 
    259272<form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
    260273<!--{foreach from=$smarty.post key="key" item="item"}--> 
    261 <!--{if $key ne "mode" && $key ne "del_mode" && $key ne "edit_customer_id" && $key ne "del_customer_id" && $key ne "search_pageno" && $key ne "csv_mode" && $key ne "job" && $key ne "sex"}--><input type="hidden" name="<!--{$key|escape}-->" value="<!--{$item|escape}-->"><!--{/if}--> 
     274<!--{if $key ne "mode" && $key ne "del_mode" && $key ne "edit_customer_id" && $key ne "del_customer_id" && $key ne "search_pageno" && $key ne "csv_mode" && $key ne "job" && $key ne "sex" && $key ne "status"}--><input type="hidden" name="<!--{$key|escape}-->" value="<!--{$item|escape}-->"><!--{/if}--> 
    262275<!--{/foreach}--> 
    263276<!--{foreach from=$smarty.post.job key="key" item="item"}--> 
     
    266279<!--{foreach from=$smarty.post.sex key="key" item="item"}--> 
    267280<input type="hidden" name="sex[]" value=<!--{$item}-->> 
     281<!--{/foreach}--> 
     282<!--{foreach from=$smarty.post.status key="key" item="item"}--> 
     283<input type="hidden" name="status[]" value=<!--{$item}-->> 
    268284<!--{/foreach}--> 
    269285<input type="hidden" name="mode" value="search" /> 
     
    316332    <tr> 
    317333      <td><!--{assign var=pref value=$search_data[data].pref}--><!--{$arrPref[$pref]}--></td> 
    318       <td><!--{mailto address=$search_data[data].email encode="javascript"}--></a></td> 
     334      <td><!--{mailto address=$search_data[data].email encode="javascript"}--></a><!--{if $search_data[data].status eq 1}--><br /><a href="#" onclick="return fnReSendMail('<!--{$search_data[data].customer_id|escape}-->');">仮登録メール再送</a><!--{/if}--></td> 
    319335    </tr> 
    320336    <!--顧客<!--{$smarty.section.data.iteration}-->--> 
  • branches/comu-ver2/data/class/SC_CustomerList.php

    r16968 r17369  
    4646        if($mode == "customer") { 
    4747            // 管理者ページ顧客検索の場合仮登録会員も検索 
    48             $this->setWhere( "(status = 1 OR status = 2) AND del_flg = 0 "); 
     48            //$this->setWhere( "(status = 1 OR status = 2) AND del_flg = 0 "); 
     49            $this->setWhere( " del_flg = 0 "); 
    4950            // 登録日を示すカラム 
    5051            $regdate_col = 'dtb_customer.update_date'; 
     
    344345        } 
    345346 
     347        //会員状態 
     348        if (!isset($this->arrSql['status'])) $this->arrSql['status'] = ""; 
     349        if ( is_array( $this->arrSql['status'] ) ){ 
     350            $arrStatusVal = $this->setItemTerm( $this->arrSql['status'] ,"status" ); 
     351            foreach ($arrStatusVal as $data) { 
     352                $this->arrVal[] = $data; 
     353            } 
     354        } 
     355 
    346356        $this->setOrder( "customer_id DESC" ); 
    347357    } 
  • branches/comu-ver2/data/class/pages/admin/customer/LC_Page_Admin_Customer.php

    r16741 r17369  
    6363        $this->arrHtmlmail[1] = $this->arrMAILMAGATYPE[1]; 
    6464        $this->arrHtmlmail[2] = $this->arrMAILMAGATYPE[2]; 
     65 
     66        $this->arrStatus[1] = "仮会員"; 
     67        $this->arrStatus[2] = "本会員"; 
    6568 
    6669        //---- CSVダウンロード用 
     
    182185            switch($key) { 
    183186            case 'sex': 
     187            case 'status': 
    184188                $this->arrHidden[$key] = SC_Utils_Ex::sfMergeParamCheckBoxes($val); 
    185189                if(!is_array($val)) { 
     
    208212            } 
    209213        } 
    210         if ($_POST['mode'] == "search" || $_POST['mode'] == "csv"  || $_POST['mode'] == "delete" || $_POST['mode'] == "delete_all") { 
     214        // 登録メール再送 
     215        if ($_POST['mode'] == "resend_mail") { 
     216            $CONF = $objDb->sf_getBasisData(); 
     217            $this->CONF = $CONF; 
     218            $objMailText = new SC_SiteView(); 
     219            $objMailText->assignobj($this); 
     220            $mailHelper = new SC_Helper_Mail_Ex(); 
     221 
     222            $arrRet = $objQuery->select("name01, name02, secret_key, email", "dtb_customer","customer_id = ? AND del_flg <> 1 AND status = 1", array($_POST["edit_customer_id"])); 
     223 
     224            $this->name01 = $arrRet[0]['name01']; 
     225            $this->name02 = $arrRet[0]['name02']; 
     226            $this->uniqid = $arrRet[0]['secret_key']; 
     227 
     228 
     229            $subject = $mailHelper->sfMakesubject($objQuery, $objMailText, $this, '会員登録のご確認'); 
     230            $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl"); 
     231 
     232            $objMail = new SC_SendMail(); 
     233            $objMail->setItem( 
     234                                ''                  // 宛先 
     235                                , $subject              // サブジェクト 
     236                                , $toCustomerMail         // 本文 
     237                                , $CONF["email03"]          // 配送元アドレス 
     238                                , $CONF["shop_name"]        // 配送元 名前 
     239                                , $CONF["email03"]          // reply_to 
     240                                , $CONF["email04"]          // return_path 
     241                                , $CONF["email04"]          //  Errors_to 
     242                            ); 
     243            // 宛先の設定 
     244            $name = $this->name01 . $this->name02 ." 様"; 
     245            $objMail->setTo($arrRet[0]["email"], $name); 
     246            $objMail->sendMail(); 
     247 
     248        } 
     249 
     250        if ($_POST['mode'] == "search" || $_POST['mode'] == "csv"  || $_POST['mode'] == "delete" || $_POST['mode'] == "delete_all" || $_POST['mode'] == "resend_mail") { 
    211251            // 入力文字の強制変換 
    212252            $this->lfConvertParam(); 
Note: See TracChangeset for help on using the changeset viewer.