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/SC_CartSession.php

    r17465 r18609  
    9090    } 
    9191 
    92     // 商品ごとの合計価格 
    93     function getProductTotal($arrInfo, $id) { 
     92    /** 
     93     * 商品ごとの合計価格 
     94     * XXX 実際には、「商品」ではなく、「カートの明細行(≒商品規格)」のような気がします。 
     95     * 
     96     * @param integer $id 
     97     * @return string 商品ごとの合計価格(税込み) 
     98     */ 
     99    function getProductTotal($id) { 
    94100        $max = $this->getMax(); 
    95101        for($i = 0; $i <= $max; $i++) { 
     
    100106                $price = $_SESSION[$this->key][$i]['price']; 
    101107                $quantity = $_SESSION[$this->key][$i]['quantity']; 
    102                 $pre_tax = SC_Utils_Ex::sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']); 
     108                $pre_tax = SC_Helper_DB_Ex::sfPreTax($price); 
    103109                $total = $pre_tax * $quantity; 
    104110                return $total; 
     
    148154 
    149155    // 全商品の合計価格 
    150     function getAllProductsTotal($arrInfo) { 
     156    function getAllProductsTotal() { 
    151157        // 税込み合計 
    152158        $total = 0; 
     
    164170            $quantity = $_SESSION[$this->key][$i]['quantity']; 
    165171 
    166             $pre_tax = SC_Utils::sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']); 
     172            $pre_tax = SC_Helper_DB_Ex::sfPreTax($price); 
    167173            $total+= ($pre_tax * $quantity); 
    168174        } 
     
    171177 
    172178    // 全商品の合計税金 
    173     function getAllProductsTax($arrInfo) { 
     179    function getAllProductsTax() { 
    174180        // 税合計 
    175181        $total = 0; 
     
    178184            $price = $_SESSION[$this->key][$i]['price']; 
    179185            $quantity = $_SESSION[$this->key][$i]['quantity']; 
    180             $tax = SC_Utils_Ex::sfTax($price, $arrInfo['tax'], $arrInfo['tax_rule']); 
     186            $tax = SC_Helper_DB_Ex::sfTax($price); 
    181187            $total+= ($tax * $quantity); 
    182188        } 
     
    188194        // ポイント合計 
    189195        $total = 0; 
    190         $max = $this->getMax(); 
    191         for($i = 0; $i <= $max; $i++) { 
    192             $price = $_SESSION[$this->key][$i]['price']; 
    193             $quantity = $_SESSION[$this->key][$i]['quantity']; 
    194  
    195             if (!isset($_SESSION[$this->key][$i]['point_rate'])) { 
    196                 $_SESSION[$this->key][$i]['point_rate'] = ""; 
    197             } 
    198             $point_rate = $_SESSION[$this->key][$i]['point_rate']; 
    199  
    200             if (!isset($_SESSION[$this->key][$i]['id'][0])) { 
    201                 $_SESSION[$this->key][$i]['id'][0] = ""; 
    202             } 
    203             $id = $_SESSION[$this->key][$i]['id'][0]; 
    204             $point = SC_Utils_Ex::sfPrePoint($price, $point_rate, POINT_RULE, $id); 
    205             $total+= ($point * $quantity); 
     196        if (USE_POINT !== false) { 
     197            $max = $this->getMax(); 
     198            for($i = 0; $i <= $max; $i++) { 
     199                $price = $_SESSION[$this->key][$i]['price']; 
     200                $quantity = $_SESSION[$this->key][$i]['quantity']; 
     201 
     202                if (!isset($_SESSION[$this->key][$i]['point_rate'])) { 
     203                    $_SESSION[$this->key][$i]['point_rate'] = ""; 
     204                } 
     205                $point_rate = $_SESSION[$this->key][$i]['point_rate']; 
     206 
     207                if (!isset($_SESSION[$this->key][$i]['id'][0])) { 
     208                    $_SESSION[$this->key][$i]['id'][0] = ""; 
     209                } 
     210                $id = $_SESSION[$this->key][$i]['id'][0]; 
     211                $point = SC_Utils_Ex::sfPrePoint($price, $point_rate, POINT_RULE, $id); 
     212                $total+= ($point * $quantity); 
     213            } 
    206214        } 
    207215        return $total; 
     
    241249        // 前頁として記録しないページを指定する。 
    242250        $arrExclude = array( 
    243             "detail_image.php", 
    244251            "/shopping/" 
    245252        ); 
     
    322329    } 
    323330 
    324     // 個数の増加 
     331    // 数量の増加 
    325332    function upQuantity($cart_no) { 
    326333        $max = $this->getMax(); 
     
    334341    } 
    335342 
    336     // 個数の減少 
     343    // 数量の減少 
    337344    function downQuantity($cart_no) { 
    338345        $max = $this->getMax(); 
     
    342349                    $_SESSION[$this->key][$i]['quantity']--; 
    343350                } 
    344             } 
    345         } 
    346     } 
    347  
    348     // 全商品の合計送料 
    349     function getAllProductsDelivFee() { 
    350         // ポイント合計 
    351         $total = 0; 
    352         $max = $this->getMax(); 
    353         for($i = 0; $i <= $max; $i++) { 
    354             $deliv_fee = $_SESSION[$this->key][$i]['deliv_fee']; 
    355             $quantity = $_SESSION[$this->key][$i]['quantity']; 
    356             $total+= ($deliv_fee * $quantity); 
    357         } 
    358         return $total; 
    359     } 
    360  
    361     // カートの中の売り切れチェック 
    362     function chkSoldOut($arrCartList, $is_mobile = false){ 
    363         foreach($arrCartList as $key => $val){ 
    364             if($val['quantity'] == 0){ 
    365                 // 売り切れ商品をカートから削除する 
    366                 $this->delProduct($val['cart_no']); 
    367                 SC_Utils_Ex::sfDispSiteError(SOLD_OUT, "", true, "", $is_mobile); 
    368351            } 
    369352        } 
Note: See TracChangeset for help on using the changeset viewer.