Ignore:
Timestamp:
2010/03/11 10:35:11 (14 years ago)
Author:
kajiwara
Message:

正式版にナイトリービルド版をマージしてみるテスト

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tmp/version-2_5-test/data/class/pages/cart/LC_Page_Cart.php

    r18562 r18609  
    6060        $this->tpl_mainpage = 'cart/index.tpl'; 
    6161        $this->tpl_column_num = 1; 
    62         $this->tpl_title = "カゴの中を見る"; 
     62        $this->tpl_title = "現在のカゴの中"; 
    6363    } 
    6464 
     
    7777        $objSiteInfo = $objView->objSiteInfo; 
    7878        $objCustomer = new SC_Customer(); 
    79         $db = new SC_Helper_DB_Ex(); 
    80         // 基本情報の取得 
    81         $arrInfo = $objSiteInfo->data; 
     79        $objDb = new SC_Helper_DB_Ex(); 
    8280 
    8381        // 商品購入中にカート内容が変更された。 
     
    8886        if (!isset($_POST['mode'])) $_POST['mode'] = ""; 
    8987 
    90         /* 
    91          * FIXME reload() を使った方が良いが無限ループしてしまう... 
    92          */ 
    9388        switch($_POST['mode']) { 
    9489        case 'up': 
    9590            $objCartSess->upQuantity($_POST['cart_no']); 
    96             SC_Utils_Ex::sfReload(); 
     91            $this->reload(); // PRG pattern 
    9792            break; 
    9893        case 'down': 
    9994            $objCartSess->downQuantity($_POST['cart_no']); 
    100             SC_Utils_Ex::sfReload(); 
     95            $this->reload(); // PRG pattern 
    10196            break; 
    10297        case 'delete': 
    10398            $objCartSess->delProduct($_POST['cart_no']); 
    104             SC_Utils_Ex::sfReload(); 
     99            $this->reload(); // PRG pattern 
    105100            break; 
    106101        case 'confirm': 
     
    111106            for ($i = 0; $i < $max; $i++) { 
    112107                // 商品規格情報の取得 
    113                 $this->arrData = $db->sfGetProductsClass($arrRet[$i]['id']); 
     108                $this->arrData = $objDb->sfGetProductsClass($arrRet[$i]['id']); 
    114109                // DBに存在する商品 
    115110                if($this->arrData != "") { 
     
    144139 
    145140        // カート集計処理 
    146         $db->sfTotalCart($this, $objCartSess, $arrInfo); 
    147         $this->arrData = $db->sfTotalConfirm($this->arrData, $this, $objCartSess, $arrInfo, $objCustomer); 
    148  
    149         $this->arrInfo = $arrInfo; 
     141        $objDb->sfTotalCart($this, $objCartSess); 
     142        $this->arrData = $objDb->sfTotalConfirm($this->arrData, $this, $objCartSess, null, $objCustomer); 
     143 
     144        // 基本情報の取得 
     145        $this->arrInfo = $objSiteInfo->data; 
    150146 
    151147        // ログイン判定 
     
    184180 
    185181        // 買い物を続ける場合 
    186         if (!isset($_REQUEST['continue'])) $_REQUEST['continue'] = ""; 
    187         if($_REQUEST['continue']) { 
     182        if ($_REQUEST['mode'] == 'continue') { 
    188183            $this->sendRedirect($this->getLocation(MOBILE_URL_SITE_TOP), true); 
    189184            exit; 
     
    197192        $objDb = new SC_Helper_DB_Ex(); 
    198193 
    199         // 基本情報の取得 
    200         $arrInfo = $objSiteInfo->data; 
    201  
    202194        // 商品購入中にカート内容が変更された。 
    203195        if($objCartSess->getCancelPurchase()) { 
    204196            $this->tpl_message = "商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。"; 
    205197        } 
    206  
    207         if (!isset($_POST['mode'])) $_POST['mode'] = ""; 
    208198 
    209199        switch($_POST['mode']) { 
     
    271261            $arrData = array(); 
    272262        } 
    273         $objDb->sfTotalCart($this, $objCartSess, $arrInfo); 
    274         $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer); 
    275  
    276         $this->arrInfo = $arrInfo; 
     263        $objDb->sfTotalCart($this, $objCartSess); 
     264        $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, null, $objCustomer); 
     265 
     266        // 基本情報の取得 
     267        $this->arrInfo = $objSiteInfo->data; 
    277268 
    278269        // ログイン判定 
Note: See TracChangeset for help on using the changeset viewer.