Ignore:
Timestamp:
2009/02/17 13:50:52 (15 years ago)
Author:
zeniya
Message:

EC-CUBE2.4改修 #376

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4/data/class/helper/SC_Helper_DB.php

    r17766 r17785  
    294294        $objPage->tpl_total_pretax = 0;     // 費用合計(税込み) 
    295295        $objPage->tpl_total_tax = 0;        // 消費税合計 
    296         $objPage->tpl_total_point = 0;      // ポイント合計 
     296        if (USE_POINT === true) { 
     297            $objPage->tpl_total_point = 0;      // ポイント合計 
     298        } 
    297299 
    298300        // カート内情報の取得 
     
    370372                } 
    371373                // ポイント付与率の登録 
    372                 $objCartSess->setProductValue($arrCart[$i]['id'], 'point_rate', $arrData['point_rate']); 
     374                if (USE_POINT === true) { 
     375                    $objCartSess->setProductValue($arrCart[$i]['id'], 'point_rate', $arrData['point_rate']); 
     376                } 
    373377                // 商品ごとの合計金額 
    374378                $objPage->arrProductsClass[$cnt]['total_pretax'] = $objCartSess->getProductTotal($arrInfo, $arrCart[$i]['id']); 
     
    387391        $objPage->tpl_total_tax = $objCartSess->getAllProductsTax($arrInfo); 
    388392        // 全商品合計ポイント 
    389         $objPage->tpl_total_point = $objCartSess->getAllProductsPoint(); 
     393        if (USE_POINT === true) { 
     394            $objPage->tpl_total_point = $objCartSess->getAllProductsPoint(); 
     395        } 
    390396 
    391397        return $objPage; 
     
    509515        $customer_id = $arrRet[0]['customer_id']; 
    510516        if($customer_id != "" && $customer_id >= 1) { 
    511             $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); 
    512             $point = $arrRet[0]['point']; 
    513             $total_point = $arrRet[0]['point'] - $use_point + $add_point; 
     517            if (USE_POINT === true) { 
     518                $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); 
     519                $point = $arrRet[0]['point']; 
     520                $total_point = $arrRet[0]['point'] - $use_point + $add_point; 
     521            } else { 
     522                $total_point = ""; 
     523                $point = ""; 
     524            } 
    514525        } else { 
    515             $total_point = ""; 
    516             $point = ""; 
     526            $total_point = 0; 
     527            $point = 0; 
    517528        } 
    518529        return array($point, $total_point); 
     
    14721483        $arrData['payment_total'] = $arrData['total'] - ($arrData['use_point'] * POINT_VALUE); 
    14731484        // 加算ポイントの計算 
    1474         $arrData['add_point'] = SC_Utils::sfGetAddPoint($objPage->tpl_total_point, $arrData['use_point'], $arrInfo); 
    1475  
    1476         if($objCustomer != "") { 
    1477             // 誕生日月であった場合 
    1478             if($objCustomer->isBirthMonth()) { 
    1479                 $arrData['birth_point'] = BIRTH_MONTH_POINT; 
    1480                 $arrData['add_point'] += $arrData['birth_point']; 
     1485        if (USE_POINT === false) { 
     1486            $arrData['add_point'] = 0; 
     1487        } else { 
     1488            $arrData['add_point'] = SC_Utils::sfGetAddPoint($objPage->tpl_total_point, $arrData['use_point'], $arrInfo); 
     1489 
     1490            if($objCustomer != "") { 
     1491                // 誕生日月であった場合 
     1492                if($objCustomer->isBirthMonth()) { 
     1493                    $arrData['birth_point'] = BIRTH_MONTH_POINT; 
     1494                    $arrData['add_point'] += $arrData['birth_point']; 
     1495                } 
    14811496            } 
    14821497        } 
Note: See TracChangeset for help on using the changeset viewer.