Index: branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Confirm.php	(revision 18858)
+++ branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Confirm.php	(revision 18859)
@@ -87,4 +87,5 @@
         $cartItems = $objCartSess->getCartList($this->cartKey);
         $i = 0;
+        // TODO リファクタリング
         foreach (array_keys($cartItems) as $itemKey) {
             $cartItem =& $cartItems[$itemKey];
@@ -109,15 +110,6 @@
 
         // カート集計を元に最終計算
-        $arrData = $objDb->sfTotalConfirm($this->cartItems, $this, $objCartSess, null, $objCustomer, $this->cartKey);
-        $arrData = array_merge($tmpData, $arrData);
-        // キャンペーンからの遷移で送料が無料だった場合の処理
-        if($objCampaignSess->getIsCampaign()) {
-            $deliv_free_flg = $objQuery->get("dtb_campaign", "deliv_free_flg", "campaign_id = ?", array($objCampaignSess->getCampaignId()));
-            // 送料無料が設定されていた場合
-            if($deliv_free_flg) {
-                $arrData['payment_total'] -= $arrData['deliv_fee'];
-                $arrData['deliv_fee'] = 0;
-            }
-        }
+        // FIXME 使用ポイント, 配送都道府県, 支払い方法, 手数料の扱い
+        $arrData = array_merge($tmpData, $objCartSess->calculate($this->cartKey, $objCustomer));
 
         // 会員ログインチェック
Index: branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php	(revision 18851)
+++ branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php	(revision 18859)
@@ -113,10 +113,22 @@
 
         // カート内商品の集計処理を行う
-        $objDb->sfTotalCart($this, $objCartSess);
+        $this->cartKey = $_SESSION['cartKey'];
+        $cartItems = $objCartSess->getCartList($this->cartKey);
+        $i = 0;
+        // TODO リファクタリング
+        foreach (array_keys($cartItems) as $itemKey) {
+            $cartItem =& $cartItems[$itemKey];
+            if (!SC_Utils_Ex::isBlank($cartItem)) {
+                $this->cartItems[$i] =& $cartItem;
+                $i++;
+            }
+        }
+        $this->tpl_message = $objCartSess->checkProducts($this->cartKey);
+
         if (strlen($this->tpl_message) >= 1) {
             SC_Utils_Ex::sfDispSiteError(SOLD_OUT, '', true);
         }
-
-        $this->arrData = $objDb->sfTotalConfirm(array(), $this, $objCartSess);
+        // FIXME 使用ポイント, 配送都道府県, 支払い方法, 手数料の扱い
+        $this->arrData = $objCartSess->calculate($this->cartKey, $objCustomer);
 
         if (!isset($_POST['mode'])) $_POST['mode'] = "";
Index: branches/version-2_5-dev/data/class/pages/cart/LC_Page_Cart.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/cart/LC_Page_Cart.php	(revision 18852)
+++ branches/version-2_5-dev/data/class/pages/cart/LC_Page_Cart.php	(revision 18859)
@@ -86,15 +86,6 @@
                 $this->tpl_message = "商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。";
             }
-
-            // カートの商品規格を取得
-            $cartItems = $objCartSess->getCartList($key);
-            foreach (array_keys($cartItems) as $itemKey) {
-                $cartItem =& $cartItems[$itemKey];
-                if (!SC_Utils_Ex::isBlank($cartItem)) {
-                    $this->cartItems[$key][$i] =& $cartItem;
-                    $i++;
-                }
-            }
-        }
+        }
+        $this->cartItems =& $objCartSess->getAllCartList();
 
         if (!isset($_POST['mode'])) $_POST['mode'] = "";
@@ -152,6 +143,6 @@
             // ポイント合計
             $this->tpl_total_point[$key] = $objCartSess->getAllProductsPoint($key);
-
-            $this->arrData = $objDb->sfTotalConfirm($this->cartItems[$key], $this, $objCartSess, null, $objCustomer, $key);
+            $this->arrData = $objCartSess->calculate($key, $objCustomer);
+
             // 送料無料までの金額を計算
             $this->tpl_deliv_free[$key] = $this->arrInfo['free_rule'] - $this->tpl_total_pretax[$key];
Index: branches/version-2_5-dev/data/class/util/SC_Utils.php
===================================================================
--- branches/version-2_5-dev/data/class/util/SC_Utils.php	(revision 18856)
+++ branches/version-2_5-dev/data/class/util/SC_Utils.php	(revision 18859)
@@ -310,4 +310,7 @@
     }
 
+    /**
+     * @deprecated SC_CartSession クラスを使用してください
+     */
     function sfCheckNormalAccess(&$objSiteSess, &$objCartSess) {
         // ユーザユニークIDの取得
Index: branches/version-2_5-dev/data/class/SC_CartSession.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_CartSession.php	(revision 18852)
+++ branches/version-2_5-dev/data/class/SC_CartSession.php	(revision 18859)
@@ -318,4 +318,24 @@
     }
 
+    /**
+     * すべてのカートの内容を取得する.
+     *
+     * @return array すべてのカートの内容
+     */
+    function getAllCartList() {
+        $results = array();
+        $cartKeys = $this->getKeys();
+        $i = 0;
+        foreach ($cartKeys as $key) {
+            $cartItems = $this->getCartList($key);
+            foreach (array_keys($cartItems) as $itemKey) {
+                $cartItem =& $cartItems[$itemKey];
+                $results[$key][$i] =& $cartItem;
+                $i++;
+            }
+        }
+        return $results;
+    }
+
     // カート内にある商品ＩＤを全て取得する
     function getAllProductID($productTypeId) {
@@ -436,4 +456,96 @@
     }
 
+    /**
+     * カートの内容を計算する.
+     *
+     * カートの内容を計算し, 下記のキーを保持する連想配列を返す.
+     *
+     * - tax: 税額
+     * - subtotal: カート内商品の小計
+     * - deliv_fee: カート内商品の合計送料
+     * - total: 合計金額
+     * - payment_total: お支払い合計
+     * - add_point: 加算ポイント
+     *
+     *  TODO ダウンロード商品のみの場合の送料を検討する
+     *  TODO 使用ポイント, 配送都道府県, 支払い方法, 手数料の扱いを検討
+     *
+     * @param integer $productTypeId 商品種別ID
+     * @param SC_Customer $objCustomer ログイン中の SC_Customer インスタンス
+     * @param integer $use_point 今回使用ポイント
+     * @param integer $deliv_pref 配送先都道府県ID
+     * @param integer $payment_id 支払い方法ID
+     * @param integer $charge 手数料
+     * @return array カートの計算結果の配列
+     */
+    function calculate($productTypeId, &$objCustomer = null, $use_point = 0,
+                       $deliv_pref = "", $payment_id = "", $charge = 0) {
+        $objDb = new SC_Helper_DB_Ex();
+
+        $total_point = $this->getAllProductsPoint($productTypeId);
+        $results['tax'] = $this->getAllProductsTax($productTypeId);
+        $results['subtotal'] = $this->getAllProductsTotal($productTypeId);
+        $results['deliv_fee'] = 0;
+
+        // 商品ごとの送料を加算
+        if (OPTION_PRODUCT_DELIV_FEE == 1) {
+            $cartItems = $this->getCartList($productTypeId);
+            foreach ($cartItems as $item) {
+                $results['deliv_fee'] += $item['deliv_fee'] * $item['quantity'];
+            }
+        }
+
+        // 配送業者の送料を加算
+        if (OPTION_DELIV_FEE == 1) {
+            $results['deliv_fee'] += $objDb->sfGetDelivFee(
+                                             array('deliv_pref' => $deliv_pref,
+                                                   'payment_id' => $payment_id));
+        }
+
+        // 送料無料の購入数が設定されている場合
+        if (DELIV_FREE_AMOUNT > 0) {
+            // 商品の合計数量
+            $total_quantity = $this->getTotalQuantity($productTypeId);
+
+            if($total_quantity >= DELIV_FREE_AMOUNT) {
+                $results['deliv_fee'] = 0;
+            }
+        }
+
+        // 送料無料条件が設定されている場合
+        $arrInfo = $objDb->sf_getBasisData();
+        if($arrInfo['free_rule'] > 0) {
+            // 小計が無料条件を超えている場合
+            if($results['subtotal'] >= $arrInfo['free_rule']) {
+                $results['deliv_fee'] = 0;
+            }
+        }
+
+        // 合計を計算
+        $results['total'] = $results['subtotal'];
+        $results['total'] += $results['deliv_fee'];
+        $results['total'] += $charge;
+
+        // お支払い合計
+        $results['payment_total'] = $results['total'] - $use_point * POINT_VALUE;
+
+        // 加算ポイントの計算
+        if (USE_POINT !== false) {
+            $results['add_point'] = SC_Helper_DB_Ex::sfGetAddPoint($total_point,
+                                                                   $use_point);
+            if($objCustomer != "") {
+                // 誕生日月であった場合
+                if($objCustomer->isBirthMonth()) {
+                    $results['birth_point'] = BIRTH_MONTH_POINT;
+                    $results['add_point'] += $results['birth_point'];
+                }
+            }
+            if($results['add_point'] < 0) {
+                $results['add_point'] = 0;
+            }
+        }
+        return $results;
+    }
+
     function getKeys() {
         return array_keys($this->cartSession);
Index: branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
===================================================================
--- branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php	(revision 18852)
+++ branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php	(revision 18859)
@@ -244,5 +244,9 @@
      * @param null $dummy1 互換性確保用(決済モジュール互換のため)
      * @return LC_Page 集計処理後のページクラスインスタンス
-     * @deprecated SC_CartSession クラスを使用して下さい
+     *
+     * @deprecated SC_CartSession::checkProducts(),
+     *             SC_CartSession::getAllProductsTotal(),
+     *             SC_CartSession::getAllProductsTax(),
+     *             SC_CartSession::getAllProductsPoint() を使用して下さい
      */
     function sfTotalCart(&$objPage, $objCartSess, $dummy1 = null, $key = "") {
@@ -1442,4 +1446,5 @@
      * @param SC_Customer $objCustomer SC_Customer インスタンス
      * @return array 最終計算後の配列
+     * @deprecated SC_CartSession::calculate() を使用して下さい
      */
     function sfTotalConfirm($arrData, &$objPage, &$objCartSess, $dummy1 = null, $objCustomer = "", $key = "") {
@@ -1471,4 +1476,5 @@
         if (OPTION_DELIV_FEE == 1) {
             // 都道府県、支払い方法から配送料金を加算する
+            // FIXME ここでしか使ってない
             $this->lfAddDelivFee($arrData);
         }
