Ignore:
Timestamp:
2010/08/06 14:52:59 (14 years ago)
Author:
eccuore
Message:

#792(ダウンロード販売機能) 機能追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping.php

    r18772 r18777  
    7777        $objCustomer = new SC_Customer(); 
    7878        $objCookie = new SC_Cookie(); 
     79        $objDb = new SC_Helper_DB_Ex(); 
    7980        $this->objFormParam = new SC_FormParam();            // フォーム用 
    8081        $this->lfInitParam();                                // パラメータ情報の初期化 
     
    8586        $this->tpl_uniqid = $uniqid; 
    8687 
     88        //ダウンロード商品判定 
     89        $this->cartdown = $objDb->chkCartDown($objCartSess); 
     90 
    8791        // ログインチェック 
    8892        if($objCustomer->isLoginSuccess()) { 
    89             // すでにログインされている場合は、お届け先設定画面に転送 
    90             $this->sendRedirect($this->getLocation("./deliv.php"), array()); 
     93            // すでにログインされている場合 
     94            if ($this->cartdown == 2) { 
     95                // 会員情報の住所を受注一時テーブルに書き込む 
     96                $objDb->sfRegistDelivData($uniqid, $objCustomer); 
     97                // 正常に登録されたことを記録しておく 
     98                $objSiteSess->setRegistFlag(); 
     99                //カート内が全てダウンロード商品の場合は支払方法設定画面に転送 
     100                $this->sendRedirect($this->getLocation("./payment.php"), array()); 
     101            } else { 
     102                // お届け先設定画面に転送 
     103                $this->sendRedirect($this->getLocation("./deliv.php"), array()); 
     104            } 
    91105            exit; 
    92106        } 
     
    103117        case 'nonmember_confirm': 
    104118            $this->lfSetNonMember($this); 
     119            //非会員のダウンロード商品を含んだ買い物はNG 
     120            if($this->cartdown != 0){ 
     121                SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, "ダウンロード商品を含むお買い物は、会員登録が必要です。<br/>お手数ですが、会員登録をお願いします。"); 
     122            } 
    105123            // ※breakなし 
    106124        case 'confirm': 
     
    133151        case 'nonmember': 
    134152            $this->lfSetNonMember($this); 
     153            //非会員のダウンロード商品を含んだ買い物はNG 
     154            if($this->cartdown != 0){ 
     155                SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, "ダウンロード商品を含むお買い物は、会員登録が必要です。<br/>お手数ですが、会員登録をお願いします。"); 
     156            } 
    135157            // ※breakなし 
    136158        default: 
     
    198220        $this->objFormParam = new SC_FormParam();            // フォーム用 
    199221        $helperMobile = new SC_Helper_Mobile_Ex(); 
     222        $objDb = new SC_Helper_DB_Ex(); 
    200223        $this->lfInitParam();                                // パラメータ情報の初期化 
    201224        $this->objFormParam->setParam($_POST);            // POST値の取得 
     
    206229        $this->tpl_uniqid = $uniqid; 
    207230 
     231        //ダウンロード商品判定 
     232        $this->cartdown = $objDb->chkCartDown($objCartSess); 
     233 
    208234        // ログインチェック 
    209235        if($objCustomer->isLoginSuccess(true)) { 
    210             // すでにログインされている場合は、お届け先設定画面に転送 
    211             $this->sendRedirect($this->getLocation('./deliv.php'), true); 
     236            // すでにログインされている場合 
     237            if ($this->cartdown == 2) { 
     238                // 会員情報の住所を受注一時テーブルに書き込む 
     239                $objDb->sfRegistDelivData($uniqid, $objCustomer); 
     240                // 正常に登録されたことを記録しておく 
     241                $objSiteSess->setRegistFlag(); 
     242                //カート内が全てダウンロード商品の場合は支払方法設定画面に転送 
     243                $this->sendRedirect($this->getLocation("./payment.php"), array()); 
     244            } else { 
     245                // お届け先設定画面に転送 
     246                $this->sendRedirect($this->getLocation("./deliv.php"), array()); 
     247            } 
    212248            exit; 
    213249        } 
Note: See TracChangeset for help on using the changeset viewer.