Changeset 17971


Ignore:
Timestamp:
2009/04/11 05:37:09 (15 years ago)
Author:
Seasoft
Message:

全商品の合計送料に関わるリファクタリング

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/helper/SC_Helper_DB.php

    r17970 r17971  
    16821682     */ 
    16831683    function lfAddAllProductsDelivFee(&$arrData, &$objPage, &$objCartSess) { 
    1684         $objQuery = new SC_Query(); 
     1684        $arrData['deliv_fee'] += $this->lfCalcAllProductsDelivFee($arrData, $objCartSess); 
     1685    } 
     1686 
     1687    /** 
     1688     * 全商品の合計送料を計算する 
     1689     */ 
     1690    function lfCalcAllProductsDelivFee(&$arrData, &$objCartSess) { 
     1691        $objQuery = new SC_Query(); 
     1692        $deliv_fee_total = 0; 
    16851693        $max = $objCartSess->getMax(); 
    16861694        for ($i = 0; $i <= $max; $i++) { 
     
    16891697            // 数量 
    16901698            $quantity = $_SESSION[$objCartSess->key][$i]['quantity']; 
    1691             // 合算 
    1692             $arrData['deliv_fee'] += $deliv_fee * $quantity; 
    1693         } 
     1699            // 累積 
     1700            $deliv_fee_total += $deliv_fee * $quantity; 
     1701        } 
     1702        return $deliv_fee_total; 
    16941703    } 
    16951704 
Note: See TracChangeset for help on using the changeset viewer.